Data processing method and data processing device
Embodiments of this application disclose a data processing method and device. The method includes: receiving, through a first bearer between a MAC layer and a user-plane functional entity of layer 3, a MAC SDU sent by the user-plane functional entity of layer 3 and a sequence number assigned to the MAC SDU, wherein all MAC SDUs sent by the first bearer last time correspond to the same sequence number; and generating a MAC PDU according to the received MAC SDU and the sequence number corresponding to the MAC SDU and sending it to a physical layer. The MAC PDU comprises at least one of: an ID of the first bearer, the sequence number, and at least one MAC SDU corresponding to the sequence number.
1 . A data processing method, comprising:
receiving, through a first bearer between a medium access control (MAC) layer and a user-plane functional entity of layer 3, one or more medium access control service data units (MAC SDUs) sent by the user-plane functional entity of layer 3 and one or more sequence numbers assigned to the one or more MAC SDUs, wherein all MAC SDUs sent on the first bearer use the same sequence number; and
generating a medium access control protocol data unit (MAC PDU) according to the one or more received MAC SDUs and the one or more sequence numbers corresponding to the one or more MAC SDUs and sending the MAC PDU to a physical layer, wherein the MAC PDU comprises at least one of the following: an identification (ID) of the first bearer, the one or more sequence numbers, and at least one MAC SDU corresponding to the one or more sequence numbers.
2 . The method according to claim 1 , wherein the generating the MAC PDU according to the one or more received MAC SDU and the one or more sequence numbers corresponding to the one or more MAC SDUs and sending the MAC PDU to the physical layer comprises:
constructing the one or more MAC SDUs into the MAC PDU according to a receiving sequence of the one or more MAC SDUs, and carrying the one or more sequence numbers corresponding to the one or more MAC SDUs in the MAC PDU; and
sending, according to the receiving sequence of the one or more MAC SDUs, each of the generated MAC PDU to the physical layer.
3 . The method according to claim 1 , wherein sequence numbers of the one or more MAC SDUs are allocated according to a sending sequence of the one or more MAC SDUs on the first bearer, and sequence numbers of the one or more MAC SDUs sent on different first bearers are allocated independently.
4 . The method according to claim 1 , wherein the MAC PDU comprises at least one PDU part, each of the at least one PDU part comprises a MAC sub-header and at least one MAC SDU corresponding to the same sequence number, wherein each MAC SDU comprises at least one of the following information: a first field used to indicate a length of the each MAC SDU, a second field used to indicate whether there is a MAC SDU after the each MAC SDU, and a data part.
5 . The method according to claim 1 , wherein the MAC PDU comprises a MAC header part and a MAC SDU part, wherein the MAC header part comprises a MAC sub-header of at least one PDU part; the MAC SDU part comprises the one or more MAC SDUs of the at least one PDU part, wherein each MAC SDU comprises: a first field used to indicate a length of the each MAC SDU, a second field used to indicate whether there is a MAC SDU after the each MAC SDU, and a data part.
6 . The method according to claim 4 , wherein the MAC sub-header comprises at least one of the following fields:
a third field indicating a length of the first field;
a fourth field indicating the identification (ID) of the first bearer;
a fifth field indicating the one or more sequence numbers of the one or more MAC SDUs carried in the PDU part;
a reserved field.
7 . A data processing method, comprising:
receiving a MAC PDU from a physical layer, wherein the MAC PDU comprises at least one of the following: an ID of a first bearer, one or more MAC SDUs, and one or more sequence numbers corresponding to the one or more MAC SDUs; the same sequence number corresponds to at least one MAC SDU, and the first bearer is a bearer for transmitting the at least one MAC SDU between a MAC layer and a user-plane functional entity of layer 3;
parsing the MAC PDU to obtain the ID of the first bearer and all the MAC SDUs corresponding to the same sequence number, wherein all MAC SDUs sent on the first bearer use the same sequence number; and
sending the at least one MAC SDU corresponding to the same sequence number to the user-plane functional entity of layer 3 through the first bearer according to ordering of the at least one MAC SDU in the MAC PDU.
8 . The method according to claim 7 , wherein the one or more sequence numbers of the one or more MAC SDUs are allocated according to a sending sequence of the one or more MAC SDUs on the first bearer, and sequence numbers of the one or more MAC SDUs sent on different first bearers are allocated independently.
9 . The method according to claim 7 , wherein the MAC PDU comprises at least one PDU part, each of the at least one PDU part comprises a MAC sub-header and at least one MAC SDU corresponding to the same sequence number, wherein each MAC SDU comprises at least one of the following information: a first field used to indicate a length of the each MAC SDU, a second field used to indicate whether there is a MAC SDU after the each MAC SDU, and a data part.
10 . The method according to claim 7 , wherein the MAC PDU comprises a MAC header part and a MAC SDU part, wherein the MAC header part comprises a MAC sub-header of at least one PDU part; the MAC SDU part comprises the one or more MAC SDUs of the at least one PDU part, wherein each MAC SDU comprises: a first field used to indicate a length of the each MAC SDU, a second field used to indicate whether there is a MAC SDU after the each MAC SDU, and a data part.
11 . The method according to claim 9 , wherein the MAC sub-header comprises at least one of the following fields:
a third field indicating a length of the first field;
a fourth field indicating the identification (ID) of the first bearer;
a fifth field indicating the one or more sequence numbers of the one or more MAC SDUs carried in the PDU part;
a reserved field.
12 . The method according to claim 11 , wherein the parsing the MAC PDU to obtain the ID of the first bearer and all the MAC SDUs corresponding to the same sequence number comprises:
parsing the MAC sub-header in the MAC PDU to obtain the ID of the first bearer carried in the MAC sub-header;
performing parse, starting from a first MAC SDU corresponding to the MAC sub-header, to obtain data of a current MAC SDU according to a first field in the current MAC SDU as parsed, and determining, according to a second field in the current MAC SDU, whether there is still any remaining MAC SDU after the current MAC SDU, until all the MAC SDUs are parsed.
13 . A first device, comprising: a processor, a memory, and a program that is stored on the memory and executable on the processor, wherein the program, when executed by the processor, causes the processor to:
receive, through a first bearer between a medium access control (MAC) layer and a user-plane functional entity of layer 3, one or more medium access control service data units (MAC SDUs) sent by the user-plane functional entity of layer 3 and one or more sequence numbers assigned to the one or more MAC SDUs, wherein all MAC SDUs sent on the first bearer use the same sequence number; and
generating a medium access control protocol data unit (MAC PDU) according to the one or more received MAC SDUs and the one or more sequence numbers corresponding to the one or more MAC SDUs and sending the MAC PDU to a physical layer, wherein the MAC PDU comprises at least one of the following: an identification (ID) of the first bearer, the one or more sequence numbers, and at least one MAC SDU corresponding to the one or more sequence numbers.
14 . The first device according to claim 13 , wherein the processor is further configured to:
construct the one or more MAC SDUs into the MAC PDU according to a receiving sequence of the one or more MAC SDUs, and carrying the one or more sequence numbers corresponding to the one or more MAC SDUs in the MAC PDU; and
send, according to the receiving sequence of the one or more MAC SDUs, each of the generated MAC PDU to the physical layer.
15 . The first device according to claim 13 , wherein the one or more sequence numbers of the one or more MAC SDUs are allocated according to a sending sequence of the one or more MAC SDUs on the first bearer, and sequence numbers of the one or more MAC SDUs sent on different first bearers are allocated independently.
16 . The first device according to claim 13 , wherein the MAC PDU comprises at least one PDU part, each of the at least one PDU part comprises a MAC sub-header and at least one MAC SDU corresponding to the same sequence number, wherein each MAC SDU comprises at least one of the following information: a first field used to indicate a length of the each MAC SDU, a second field used to indicate whether there is a MAC SDU after the each MAC SDU, and a data part; or
wherein the MAC PDU comprises a MAC header part and a MAC SDU part, wherein the MAC header part comprises a MAC sub-header of at least one PDU part; the MAC SDU part comprises the one or more MAC SDUs of the at least one PDU part, wherein each MAC SDU comprises: a first field used to indicate a length of the each MAC SDU, a second field used to indicate whether there is a MAC SDU after the each MAC SDU, and a data part.
17 . A second device, comprising: a processor, a memory, and a program that is stored on the memory and executable on the processor, wherein the program, when executed by the processor, causes the processor to implement steps of the method according to claim 7 .
18 . The second device according to claim 17 , wherein the one or more sequence numbers of the one or more MAC SDUs are allocated according to a sending sequence of the one or more MAC SDUs on the first bearer, and the one or more sequence numbers of the one or more MAC SDUs sent on different first bearers are allocated independently.
19 . The second device according to claim 17 , wherein the MAC PDU comprises at least one PDU part, each of the at least one PDU part comprises a MAC sub-header and at least one MAC SDU corresponding to the same sequence number, wherein each MAC SDU comprises at least one of the following information: a first field used to indicate a length of the each MAC SDU, a second field used to indicate whether there is a MAC SDU after the each MAC SDU, and a data part; or
wherein the MAC PDU comprises a MAC header part and a MAC SDU part, wherein the MAC header part comprises a MAC sub-header of at least one PDU part; the MAC SDU part comprises the one or more MAC SDUs of the at least one PDU part, wherein each MAC SDU comprises: a first field used to indicate a length of the each MAC SDU, a second field used to indicate whether there is a MAC SDU after the each MAC SDU, and a data part;
wherein the MAC sub-header comprises at least one of the following fields:
a third field indicating a length of the first field;
a fourth field indicating the identification (ID) of the first bearer;
a fifth field indicating the one or more sequence numbers of the one or more MAC SDUs carried in the PDU part;
a reserved field.
20 . The second device according to claim 19 , wherein the processor is further configured to:
parse the MAC sub-header in the MAC PDU to obtain the ID of the first bearer carried in the MAC sub-header;
perform parse, starting from a first MAC SDU corresponding to the MAC sub-header, to obtain data of a current MAC SDU according to a first field in the current MAC SDU as parsed, and determining, according to a second field in the current MAC SDU, whether there is still any remaining MAC SDU after the current MAC SDU, until all the MAC SDUs are parsed.