Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The first embodiment,
An embodiment of the present invention provides a data receiving method, as shown in fig. 1, including:
step 101: receiving a protocol data unit, and extracting a super sequence number and a sequence number from the protocol data unit;
step 102: determining a first protocol data unit group to which the protocol data unit belongs based on the super sequence number;
step 103: if the serial number of the protocol data unit is the maximum serial number in the first protocol data unit group, controlling to start a first super serial number timer and acquiring corresponding timing duration;
step 104: and determining whether all protocol data units in the first protocol data unit group are received according to the timing duration of the first super serial number timer.
The above scheme is particularly suitable for use in Unacknowledged Mode (UM).
By introducing the scheme into UM, the loss problem of the RLC PDU in a Protocol Data Unit (PDU) group or a PDU cluster (cluster) can be found in time, so that the timeliness of data transmission and data delivery is guaranteed.
In this embodiment, the determining, based on the super sequence number, a first protocol data unit group to which the protocol data unit belongs includes: and searching the protocol data unit group with the same super serial number according to the super serial number, and taking the protocol data unit group as the first protocol data unit group.
Specifically, as shown in fig. 2, each received PDU includes a Sequence Number (SN) and a super sequence number (HSN); the HSN is used to divide the PDU groups, that is, the PDUs with the same HSN number belong to the same PDU group, for example, in fig. 2, the PDUs with the same HSN 1 all belong to the same PDU group 21.
Further, if the serial number of the protocol data unit is the largest serial number in the first protocol data unit group, controlling to start a first super serial number timer and obtain a corresponding timing duration, including:
judging whether the serial number of the protocol data unit is the maximum serial number of the first protocol data unit group;
if yes, checking whether the first super serial number timer is started or not, and if yes, controlling to restart the first super serial number timer and acquiring the timing duration corresponding to the first super serial number timer; if not, controlling to start the first super serial number timer and obtaining the timing duration corresponding to the first super serial number timer;
if not, controlling the first super serial number timer to keep the current timing state to acquire the timing duration.
The controlling to restart the first super sequence number timer may be to reset the first super sequence number timer corresponding to the current first protocol data unit group to start timing from zero. That is, no matter how long the current timing duration of the first super sequence number timer is, once it is determined that the protocol data unit with the larger sequence number occurs, the first super sequence number timer is restarted to reacquire the timing duration.
For example, referring to fig. 3, if the largest sequence number in the first protocol data unit group with all HSNs being 2 currently received at time t1 is SN10, then at time t1, a first super sequence number timer may be started, and then timing is started; then, as time goes to time t2, if a larger SN number, that is, SN 13, is detected, the first super sequence number timer is restarted at time t2, that is, the timing process from zero is restarted.
In addition, for different sets of protocol data units, corresponding super sequence number timers may be set, that is, it is assumed that a super sequence number timer-1 is set for the set of protocol data units corresponding to which HSN is 1; then the protocol data unit group corresponding to HSN-2 will set super sequence number timer-2; and the different protocol data unit groups all maintain to judge whether the protocol data units in the group are received completely, so that the problem of interference among the groups can be avoided.
For example, referring to fig. 4, it is assumed that in the protocol data unit group corresponding to HSN 1, if the super sequence number timer is started at SN 6, and in the case where EM 1 in HSN 1 is not received, the operation of starting the corresponding super sequence number timer at HSN 2 is not affected.
In the above scenario, how to determine whether the data unit in each protocol data unit group is completely received is described below, which may specifically be as follows:
determining whether all protocol data units in the first protocol data unit group complete receiving according to the timing duration of the first super sequence number timer includes:
judging whether the timing duration of the first super serial number timer is greater than a preset threshold value or not and judging whether an ending flag bit aiming at the first protocol data unit group is received or not;
if the timing duration of the first super sequence number timer is greater than the preset threshold value and the ending flag bit is not received, determining that all protocol data units in the first protocol data unit group are completely received;
and if the timing duration of the first super sequence number timer is not greater than the preset threshold value and the ending flag bit is received, determining that all protocol data units in the first protocol data unit group are completely received.
That is, the determination criteria for determining that all the protocol data units of the first protocol data unit group have been received may be two: firstly, the timing duration of the first super sequence number timer is greater than the preset threshold value, and an end marker bit is not detected in the period; the other receives the end flag bit.
Also referring to fig. 4, when the HSN 1 receives the EM 1, it may determine that all data units in the group are completely received, sequence all protocol data units in the HSN 1 based on the SN number, and send the sequenced units in the group to a central radio link control (C-RLC) unit;
still referring to fig. 4, assuming that the corresponding super sequence number timer is started at the protocol data unit corresponding to the SN 15HSN 2, and no protocol data unit greater than the sequence number is received and no end flag is received thereafter, it is determined that the receiving of the data unit of the HSN 2 is completed when the timing duration of the super sequence number timer is greater than the threshold value. And when all the protocol data units in the first protocol data unit group are determined to be received, controlling all the protocol data units in the first protocol data unit group to be sequenced and sent out.
The scheme provided by the embodiment mainly comprises the following steps: adding a super sequence number timer (t-HSN-Reordering) for UM; the super sequence number timer t-HSN-Reordering is added to assist in judging whether the PDU cluster is sent out. The scheme can be mainly used for the condition that the last packet of the PDU cluster is lost.
If the super sequence number timer t-HSN-Reordering exceeds the preset threshold, it means that whether a packet with EM 1 is received or not, the PDU cluster data is considered to have been received, and the ordering between HSNs can be performed.
In addition, the super sequence number timer needs to be set at least larger than the reordering timer.
If the timer is set too small, for example, smaller than the Reordering timer t-Reordering, there is a case that PDU cluster ordering in HSN will be performed if SN ordering is not completed, and thus, the direct result is the problem of data packet Reordering.
Thus, the super sequence number timer t-HSN-Reordering is set to be greater than the Reordering timer t-Reordering. At the receiving end RLC remote each HSN number maintains a super sequence number timer t-HSN-Reordering separately.
When the receiving end receives a new RLC PDU in the HSN, if the SN number of the RLC PDU is larger than the maximum SN number already received in the HSN, t-HSN-Reordering is started, if the RLC PDU with a larger SN number is not received within the timeout of the t-HSN-Reordering, the PDU Cluster corresponding to the current HSN is considered to be received completely, and then the PDU Cluster is submitted to C _ RLC to carry out sequencing among HSNs.
Finally, in this embodiment, since the maximum SN number may be 1023, 0 may be set to an SN number greater than 1023.
Therefore, by adopting the scheme, a super serial number timer can be set for each protocol data unit group, whether the timer is started to obtain the timing duration is determined according to whether the currently received protocol data unit is the unit with the maximum serial number, and whether all protocol data units in the protocol data unit group in which the timer is located are completely received is determined according to the timing duration. Therefore, under the condition of poor channel environment, especially under the scene that the ending flag bit cannot be received, the problem that the data packets cannot be sequenced correctly is avoided, and the time for reordering the protocol data units of the RLC is shortened.
Example II,
An embodiment of the present invention provides a data receiving apparatus, as shown in fig. 5, including:
a receiving unit 51, configured to receive a protocol data unit, and extract a super sequence number and a sequence number from the protocol data unit;
a timer management unit 52, configured to determine, based on the super sequence number, a first protocol data unit group to which the protocol data unit belongs; if the serial number of the protocol data unit is the maximum serial number in the first protocol data unit group, controlling to start a first super serial number timer and acquiring corresponding timing duration;
and the processing unit 53 is configured to determine whether all protocol data units in the first protocol data unit group complete receiving according to the timing duration of the first super sequence number timer.
The above scheme is particularly suitable for use in Unacknowledged Mode (UM). In addition, the above-mentioned apparatus may be a certain network device on the network side, that is, a terminal device, and in this embodiment, specific implementation devices are not exhaustive and are not limited thereto.
By introducing the scheme into UM, the loss problem of the RLC PDU in a Protocol Data Unit (PDU) group or a PDU cluster (cluster) can be found in time, so that the timeliness of data transmission and data delivery is guaranteed.
In this embodiment, the timer management unit is configured to search the protocol data unit groups with the same super serial number according to the super serial number, and use the protocol data unit group as the first protocol data unit group.
Specifically, as shown in fig. 2, each received PDU includes a Sequence Number (SN) and a super sequence number (HSN); the HSN is used to divide the PDU groups, that is, the PDUs with the same HSN number belong to the same PDU group, for example, in fig. 2, the PDUs with the same HSN 1 all belong to the same PDU group 21.
Further, the timer management unit is configured to determine whether a sequence number of the pdu is a maximum sequence number of the first pdu;
if yes, checking whether the first super serial number timer is started or not, and if yes, controlling to restart the first super serial number timer and acquiring the timing duration corresponding to the first super serial number timer; if not, controlling to start the first super serial number timer and obtaining the timing duration corresponding to the first super serial number timer;
if not, controlling the first super serial number timer to keep the current timing state to acquire the timing duration.
The controlling to restart the first super sequence number timer may be to reset the first super sequence number timer corresponding to the current first protocol data unit group to start timing from zero. That is, no matter how long the current timing duration of the first super sequence number timer is, once it is determined that the protocol data unit with the larger sequence number occurs, the first super sequence number timer is restarted to reacquire the timing duration.
For example, referring to fig. 3, if the largest sequence number in the first protocol data unit group with all HSNs being 2 currently received at time t1 is SN10, then at time t1, a first super sequence number timer may be started, and then timing is started; then, as time goes to time t2, if a larger SN number, that is, SN 13, is detected, the first super sequence number timer is restarted at time t2, that is, the timing process from zero is restarted.
In addition, for different sets of protocol data units, corresponding super sequence number timers may be set, that is, it is assumed that a super sequence number timer-1 is set for the set of protocol data units corresponding to which HSN is 1; then the protocol data unit group corresponding to HSN-2 will set super sequence number timer-2; and the different protocol data unit groups all maintain to judge whether the protocol data units in the group are received completely, so that the problem of interference among the groups can be avoided.
For example, referring to fig. 4, it is assumed that in the protocol data unit group corresponding to HSN 1, if the super sequence number timer is started at SN 6, and in the case where EM 1 in HSN 1 is not received, the operation of starting the corresponding super sequence number timer at HSN 2 is not affected.
In the above scenario, how to determine whether the data unit in each protocol data unit group is completely received is described below, which may specifically be as follows:
the processing unit is configured to determine whether a timing duration of the first super sequence number timer is greater than a preset threshold and determine whether an end flag bit for the first protocol data unit group is received;
if the timing duration of the first super sequence number timer is greater than the preset threshold value and the ending flag bit is not received, determining that all protocol data units in the first protocol data unit group are completely received;
and if the timing duration of the first super sequence number timer is not greater than the preset threshold value and the ending flag bit is received, determining that all protocol data units in the first protocol data unit group are completely received.
That is, the determination criteria for determining that all the protocol data units of the first protocol data unit group have been received may be two: firstly, the timing duration of the first super sequence number timer is greater than the preset threshold value, and an end marker bit is not detected in the period; the other receives the end flag bit.
Also referring to fig. 4, when the HSN 1 receives the EM 1, it may determine that all data units in the group are completely received, sequence all protocol data units in the HSN 1 based on the SN number, and send the sequenced units in the group to a central radio link control (C-RLC) unit;
still referring to fig. 4, assuming that the corresponding super sequence number timer is started at the protocol data unit corresponding to the SN 15HSN 2, and no protocol data unit greater than the sequence number is received and no end flag is received thereafter, it is determined that the receiving of the data unit of the HSN 2 is completed when the timing duration of the super sequence number timer is greater than the threshold value. And when all the protocol data units in the first protocol data unit group are determined to be received, controlling all the protocol data units in the first protocol data unit group to be sequenced and sent out.
The scheme provided by the embodiment mainly comprises the following steps: adding a super sequence number timer (t-HSN-Reordering) for UM; the super sequence number timer t-HSN-Reordering is added to assist in judging whether the PDU cluster is sent out. The scheme can be mainly used for the condition that the last packet of the PDU cluster is lost.
If the super sequence number timer t-HSN-Reordering exceeds the preset threshold, it means that whether a packet with EM 1 is received or not, the PDU cluster data is considered to have been received, and the ordering between HSNs can be performed.
In addition, the super sequence number timer needs to be set at least larger than the reordering timer.
If the timer is set too small, for example, smaller than the Reordering timer t-Reordering, there is a case that PDU cluster ordering in HSN will be performed if SN ordering is not completed, and thus, the direct result is the problem of data packet Reordering.
Thus, the super sequence number timer t-HSN-Reordering is set to be greater than the Reordering timer t-Reordering. At the receiving end RLC remote each HSN number maintains a super sequence number timer t-HSN-Reordering separately.
When the receiving end receives a new RLC PDU in the HSN, if the SN number of the RLC PDU is larger than the maximum SN number already received in the HSN, t-HSN-Reordering is started, if the RLC PDU with a larger SN number is not received within the timeout of the t-HSN-Reordering, the PDU Cluster corresponding to the current HSN is considered to be received completely, and then the PDU Cluster is submitted to C _ RLC to carry out sequencing among HSNs.
Finally, in this embodiment, since the maximum SN number may be 1023, 0 may be set to an SN number greater than 1023.
Therefore, by adopting the scheme, a super serial number timer can be set for each protocol data unit group, whether the timer is started to obtain the timing duration is determined according to whether the currently received protocol data unit is the unit with the maximum serial number, and whether all protocol data units in the protocol data unit group in which the timer is located are completely received is determined according to the timing duration. Therefore, under the condition of poor channel environment, especially under the scene that the ending flag bit cannot be received, the problem that the data packets cannot be sequenced correctly is avoided, and the time for reordering the protocol data units of the RLC is shortened.
The integrated module according to the embodiment of the present invention may also be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as an independent product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for enabling a computer device (which may be a personal computer, a network device, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.