Data transmission method and apparatus, and terminal
This application discloses a data transmission method and apparatus, and a terminal. The data transmission method includes: in a case that a first data unit or a terminal meets a preset discarding condition, discarding, by the terminal, a target data unit, or discarding or reserving the target data unit based on at least one of a priority of the target data unit and a corresponding requirement, where the target data unit includes a first data unit and/or a data unit associated with the first data unit. The technical solutions of embodiments of this application can reduce invalid data transmission, improve system resource utilization, and reduce a transmission delay of a data packet.
1 . A data transmission method, comprising:
in a case that a first data unit meets a preset discarding condition, discarding, by a terminal, a target data unit, wherein
the first data unit is a first data packet, and the target data unit is a data packet within a first target-type group;
wherein the preset discarding condition comprises both a discard timer corresponding to the first data packet expiring and a priority of the first target-type group associated with the first data packet being lower than a preset priority; and
wherein the first data packet is a data packet associated with a first target-type data packet, and the first target-type group is a data packet set to which the first target-type data packet belongs.
2 . The data transmission method according to claim 1 , wherein the preset discarding condition is configured by a network side device or indicated by a first protocol layer on a terminal side, wherein the first protocol layer comprises at least one of the following: an application layer, an IP layer, an RRC layer, an SDAP layer, a PDCP layer, an RLC layer, a MAC layer, or a physical (PHY) layer.
3 . The data transmission method according to claim 1 , wherein the first data packet comprises
a PDCP SDU.
4 . A terminal, comprising a processor, a memory, and a program or an instruction stored in the memory and executable on the processor, wherein the program or the instruction, when executed by the processor, causes the terminal to perform:
in a case that a first data unit meets a preset discarding condition, discarding a target data unit, wherein
the first data unit is a first data packet, and the target data unit is a data packet within a first target-type group;
wherein the preset discarding condition comprises both a discard timer corresponding to the first data packet expiring and a priority of the first target-type group associated with the first data packet being lower than a preset priority; and
wherein the first data packet is a data packet associated with a first target-type data packet, and the first target-type group is a data packet set to which the first target-type data packet belongs.
5 . A non-transitory readable storage medium, wherein the non-transitory readable storage medium stores a program or an instruction, wherein the program or the instruction, when executed by a processor of a terminal, causes the terminal to perform:
in a case that a first data unit meets a preset discarding condition, discarding a target data unit, wherein
the first data unit is a first data packet, and the target data unit is a data packet within a first target-type group;
wherein the preset discarding condition comprises both a discard timer corresponding to the first data packet expiring and a priority of the first target-type group associated with the first data packet being lower than a preset priority; and
wherein the first data packet is a data packet associated with a first target-type data packet, and the first target-type group is a data packet set to which the first target-type data packet belongs.
6 . The terminal according to claim 4 , wherein the preset discarding condition is configured by a network side device or indicated by a first protocol layer on a terminal side, wherein the first protocol layer comprises at least one of the following: an application layer, an IP layer, an RRC layer, an SDAP layer, a PDCP layer, an RLC layer, a MAC layer, or a physical (PHY) layer.
7 . The terminal according to claim 4 , the first data packet comprises a PDCP SDU.
8 . The non-transitory readable storage medium according to claim 5 , wherein the preset discarding condition is configured by a network side device or indicated by a first protocol layer on a terminal side, wherein the first protocol layer comprises at least one of the following: an application layer, an IP layer, an RRC layer, an SDAP layer, a PDCP layer, an RLC layer, a MAC layer, or a physical (PHY) layer.
9 . The non-transitory readable storage medium according to claim 5 , the first data packet comprises a PDCP SDU.