Method and device for processing data packet

By adjusting the status and variable values ​​of the timer during PDCP entity reconstruction or data recovery, the timer is delayed, the packet loss problem caused by the premature timer is solved, and the accuracy and efficiency of data transmission are improved.

CN111567000BActive Publication Date: 2025-04-11HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201880085767.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-11-16
Filing Date
2018-10-28
Publication Date
2025-04-11
Estimated Expiration
2038-10-28

AI Technical Summary

Technical Problem

After PDCP reconstruction or data recovery, packet loss problems that may be caused by the reordering timer being turned on too early affect the accuracy and efficiency of data transmission and reduce the user experience.

Method used

During the PDCP entity rebuilding or data recovery, stop and reset or only stop the first timer, and set the value of the first variable to the value of the second variable to delay the opening of the timer and avoid packet loss caused by the premature opening of the timer.

Benefits of technology

It effectively avoids packet loss caused by premature opening of timer after PDCP reconstruction or data recovery, improves the accuracy and efficiency of data transmission, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111567000B_ABST
    Figure CN111567000B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for processing data packets, the method comprising: when a packet data convergence protocol PDCP entity is reestablished or data is restored, if a first timer is running, the receiving device stops and resets the first timer, the first timer is used to detect the loss of received data packets, or is used to detect whether received data packets are out of order; the receiving device sets the value of a first variable to the value of a second variable, the first variable indicates the count value of the next received data packet expected by the receiving device, and the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer. The method for processing data packets provided in the present application can solve the problem of packet loss caused by the reordering timer being turned on too early after PDCP reconstruction or data recovery, improve the accuracy and efficiency of data transmission, and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and more specifically, to a method and device for processing data packets. Background Art

[0002] In air interface transmission, although data packets are sent out in order at the transmitting end air interface, the order received at the receiving end is likely to be out of order due to the parallel operation of multiple Hybrid Automatic Repeat request (HARQ) processes. In the Long Term Evolution (LTE) system, the Radio Link Control (RLC) in the Layer 2 protocol stack is responsible for reordering the received out-of-order data packets and submitting them to the upper layer Packet Data Convergence Protocol (PDCP) layer. In the 5th Generation (5G) New Radio (NR), the RLC layer in the Layer 2 protocol stack no longer has the reordering function, and the PDCP layer in the Layer 2 protocol stack is responsible for reordering the received out-of-order data packets.

[0003] The Data Radio Bearer (DRB) in Acknowledge Mode (AM) needs to ensure that there is no packet loss during PDCP reestablishment or data recovery. Since in-order delivery is required, the currently received out-of-order data packets and data packet numbers will be retained during reestablishment. When NR PDCP is reestablished, packet loss may occur, which seriously affects the accuracy of data transmission, reduces the efficiency of data transmission, and poor user experience. Summary of the invention

[0004] The present application provides a method and device for processing data packets, which can solve the problem of packet loss caused by the reordering timer being started too early after PDCP reconstruction or data recovery, improve the accuracy and efficiency of data transmission, and improve user experience.

[0005] In a first aspect, a method for processing data packets is provided, comprising: a receiving device stops and resets a first timer, or only stops the first timer, when a Packet Data Convergence Protocol (PDCP) entity is reestablished or data is recovered, and the first timer is used to detect the loss of received data packets or to detect whether received data packets are out of order; the receiving device sets the value of a first variable to the value of a second variable, the first variable indicating the count value of the next received data packet expected by the receiving device, and the second variable indicating the count value of the first data packet that is still waiting and has not been delivered to an upper layer.

[0006] The first aspect provides a method for processing data packets. When the PDCP entity is rebuilt or the data is restored, if the first timer is running, the first timer is stopped and reset (or reset to zero), or only the first timer is stopped, and the value of the first variable is set to the value of the second variable. Alternatively, when the PDCP entity is rebuilt or the data is restored, if the first timer is running, the first timer is stopped and reset, or only the first timer is stopped, and when the PDCP entity is rebuilt or the data is restored, the value of the first variable is set to the value of the second variable. In this way, after the reconstruction or data recovery, the start time of the first timer is delayed, and the packet loss problem caused by the premature start of the first timer is avoided. At the same time, packet loss during the PDCP entity reconstruction or data recovery is avoided, that is, the packet loss problem of data packets that are not sent after reconstruction is avoided. The accuracy of data transmission and the efficiency of data transmission are improved, and the user experience is improved.

[0007] In a possible implementation of the first aspect, the method further includes: the receiving device receives a data packet; when the value of the third variable is greater than or equal to the value of the first variable, the receiving device updates the value of the first variable to the value of the fourth variable, wherein the third variable indicates the count value of the data packets received by the receiving device, the fourth variable indicates the count value of the first unreceived data packet that is greater than the value of the third variable, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and adding one to the largest count value. In this implementation, the value of the first variable can be updated according to the data packet actually received by the receiving device, so that the first variable can be more consistent with its physical definition, that is, the next data packet that the receiving device expects to receive. At the same time, the accuracy and efficiency of data packet transmission and delivery are improved, and the user experience is improved.

[0008] In a possible implementation of the first aspect, the method also includes: when the PDCP entity is rebuilt or data is restored, the receiving device sets the value of the fifth variable to the value of the second variable when the first timer is stopped and reset, or sets the value of the fifth variable to the value of the second variable when the first timer is stopped, or sets the value of the first variable when the first timer is stopped and reset, or sets the value of the first variable when the first timer is stopped, or sets the value of the first variable when the first timer is stopped, or sets the value of the first variable when the first timer is stopped, or sets the initial value of the fifth variable, or remains unchanged, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0009] In a possible implementation of the first aspect, the method also includes: if the receiving device is configured by an upper layer to send a PDCP status report, generating the PDCP status report before the receiving device sets the value of the first variable to the value of the second variable; or, if the receiving device is configured by an upper layer to send a PDCP status report, generating the PDCP status report based on the value of the first variable and the value of the second variable before the PDCP entity is reconstructed or before data is recovered.

[0010] In a possible implementation of the first aspect, the method also includes: if the receiving device is configured by an upper layer to send a PDCP status report, before the receiving device sets the value of the first variable to the value of the second variable, generating a bit map in the PDCP status report; or, if the receiving device is configured by an upper layer to send a PDCP status report, generating a bit map in the PDCP status report according to the value of the first variable and the value of the second variable before the PDCP entity is reconstructed or before data is recovered.

[0011] In a possible implementation manner of the first aspect, the method further includes: when the first timer is not running and the value of the second variable is less than the value of the first variable, the receiving device starts the first timer.

[0012] In a possible implementation of the first aspect, the method further includes: when the first timer is not running and the value of the second variable is less than the value of the first variable, the receiving device updates the value of the fifth variable to the value of the first variable, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0013] In a possible implementation manner of the first aspect, the first timer is a reordering timer.

[0014] In a possible implementation manner of the first aspect, the method further includes: when the first timer times out, the receiving device delivers the data packet.

[0015] In a possible implementation manner of the first aspect, the method further includes: when the value of the third variable is equal to the value of the second variable, the receiving device submits the data packet.

[0016] In a possible implementation manner of the first aspect, the receiving device receives a data packet, including: a Packet Data Convergence Protocol (PDCP) entity of the receiving device receives the data packet.

[0017] In a possible implementation manner of the first aspect, the first variable is RX_NEXT, the second variable is RX_DELIV, the third variable is RCVD_COUNT, the fifth variable is RX_REORD, and the first timer is t-Reordering.

[0018] In a second aspect, a method for processing a data packet is provided, comprising: a receiving device receives a data packet; when the value of a third variable is greater than or equal to the value of a first variable, the receiving device updates the value of the first variable to the value of a fourth variable, wherein the first variable indicates a count value of the next received data packet expected by the receiving device, the third variable indicates a count value of the data packet received by the receiving device, the fourth variable indicates a count value that is greater than the value of the third variable and is the first unreceived data packet, or the fourth variable indicates a count value of the data packets received by the receiving device, starting from the value of the third variable, continuous and the largest count value plus one.

[0019] The method for processing data packets provided in the second aspect can update the value of the first variable according to the data packets actually received by the receiving device, so that the first variable is more consistent with its physical definition, that is, the first variable is updated to the count value of the next data packet that the receiving device expects to receive. At the same time, the accuracy and efficiency of data packet transmission and delivery are improved, and the user experience is improved.

[0020] In a possible implementation of the second aspect, the method also includes: when the packet data convergence protocol PDCP entity is rebuilt or data is restored, if the first timer is running, the receiving device stops and resets the first timer, or only stops the first timer, and the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order.

[0021] In a possible implementation of the second aspect, the method also includes: when the Packet Data Convergence Protocol PDCP entity is rebuilt or when data is restored, the receiving device sets the value of the first variable to the value of the second variable, and the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer.

[0022] In a possible implementation of the second aspect, the method also includes: if the receiving device is configured by an upper layer to send a PDCP status report, generating the PDCP status report before the receiving device sets the value of the first variable to the value of the second variable; or, if the receiving device is configured by an upper layer to send a PDCP status report, generating the PDCP status report based on the value of the first variable and the value of the second variable before the PDCP entity is reconstructed or before data is recovered.

[0023] In a possible implementation of the second aspect, the method also includes: if the receiving device is configured by an upper layer to send a PDCP status report, before the receiving device sets the value of the first variable to the value of the second variable, generating a bit map in the PDCP status report; or, if the receiving device is configured by an upper layer to send a PDCP status report, generating a bit map in the PDCP status report according to the value of the first variable and the value of the second variable before the PDCP entity is reconstructed or before data is recovered.

[0024] In a possible implementation of the second aspect, the method further includes: when the first timer is not running and the value of the second variable is less than the value of the first variable, the receiving device updates the value of the fifth variable to the value of the first variable, wherein the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order, the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer, and the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0025] In a possible implementation of the second aspect, the method also includes: the method also includes: when the first timer is not running and the value of the second variable is less than the value of the first variable, the receiving device starts the first timer, wherein the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer.

[0026] In a possible implementation manner of the second aspect, the receiving device receives the data packet, including: a Packet Data Convergence Protocol (PDCP) entity of the receiving device receives the data packet.

[0027] In a possible implementation manner of the second aspect, the first timer is a reordering timer.

[0028] In a possible implementation manner of the second aspect, the method further includes: when the first timer times out, the receiving device delivers the data packet.

[0029] In a possible implementation manner of the second aspect, the method further includes: when the value of the third variable is equal to the value of the second variable, the receiving device submits the data packet.

[0030] In a possible implementation manner of the second aspect, the first variable is RX_NEXT, the second variable is RX_DELIV, the third variable is RCVD_COUNT, and the fifth variable is RX_REORD, indicating that the first timer is t-Reordering.

[0031] According to a third aspect, a method for processing a data packet is provided, comprising: a receiving device receives a data packet; when a first timer is not running due to a Packet Data Convergence Protocol (PDCP) entity reconstruction or data recovery, and the value of a second variable is less than the value of the first variable, the receiving device starts the first timer; or, when the first timer is not running due to a Packet Data Convergence Protocol (PDCP) entity reconstruction or data recovery, and the value of the second variable is less than the value of the first variable, the receiving device starts the first timer; wherein the first timer is used to detect the loss of received data packets, or to detect whether received data packets are out of order, the first variable indicates the count value of the next data packet that the receiving device expects to receive, and the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to an upper layer.

[0032] The method for processing data packets provided in the third aspect delays the start time of the first timer by changing the start condition of the first timer, thereby avoiding the packet loss problem caused by the premature start of the first timer. At the same time, the packet loss problem caused by the reconstruction of the PDCP entity or data recovery can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0033] In a possible implementation manner of the third aspect, the method further includes: when the PDCP entity is reestablished or data is restored, if the first timer is running, stopping and resetting the first timer, or only stopping the first timer.

[0034] In a possible implementation manner of the third aspect, the method further includes: the receiving device updates the value of a fifth variable to the value of the first variable, wherein the fifth variable indicates a count value of the data packet when triggering the start of the first timer.

[0035] In a possible implementation of the third aspect, the method also includes: when the value of the third variable is greater than or equal to the value of the first variable, the receiving device updates the value of the first variable to the value of a fourth variable, wherein the third variable indicates a count value of data packets received by the receiving device, the fourth variable indicates a count value that is greater than the value of the third variable and is the first unreceived data packet, or the fourth variable indicates a count value of data packets received by the PDCP entity, starting from the value of the third variable, continuously and adding one to the largest count value.

[0036] In a possible implementation of the third aspect, the method also includes: when the PDCP entity is rebuilt or data is restored, the receiving device updates the value of the fifth variable to the value of the second variable when the first timer is stopped and reset, or updates the value of the fifth variable to the value of the second variable when the first timer is stopped, or updates to the value of the first variable when the first timer is stopped and reset, or updates to the value of the first variable when the first timer is stopped, or updates to the value of the first variable when the first timer is stopped, or updates to the initial value of the fifth variable, or remains unchanged, and the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0037] In a possible implementation manner of the third aspect, the first timer is a reordering timer.

[0038] In a possible implementation manner of the third aspect, the method further includes: when the first timer times out, the receiving device delivers the data packet.

[0039] In a possible implementation manner of the third aspect, the method further includes: when the value of the third variable is equal to the value of the second variable, the receiving device submits the data packet.

[0040] In a possible implementation manner of the third aspect, the receiving device receives the data packet, including: a Packet Data Convergence Protocol PDCP entity of the receiving device receives the data packet.

[0041] In a possible implementation manner of the third aspect, the first variable is RX_NEXT, the second variable is RX_DELIV, the third variable is RCVD_COUNT, the fifth variable is RX_REORD, and the first timer is t-Reordering.

[0042] In a fourth aspect, a method for processing a data packet is provided, comprising: a receiving device receives a data packet; when a first timer is not running, a value of a second variable is less than a value of the first variable, and the value of the first variable is equal to a value of a third variable plus one, the receiving device starts the first timer, wherein the first variable indicates a count value of the next received data packet expected by the receiving device, the second variable indicates a count value of a first data packet that is still waiting and has not been delivered to an upper layer, the third variable indicates a count value of a data packet received by the receiving device, and the first timer is used to detect loss of received data packets, or to detect whether received data packets are out of order.

[0043] The method for processing data packets provided in the fourth aspect delays the start time of the first timer by changing the start condition of the first timer after the receiving device receives the data packet, thereby avoiding the packet loss problem caused by the premature start of the first timer. At the same time, the packet loss problem caused by the reconstruction of the PDCP entity or data recovery can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0044] In a possible implementation manner of the fourth aspect, the method further includes: when the PDCP entity is reestablished or the data is restored, if the first timer is running, stopping and resetting the first timer, or only stopping the first timer.

[0045] In a possible implementation of the fourth aspect, when the first timer is not running, the value of the second variable is less than the value of the first variable, and the value of the first variable is equal to the value of the third variable plus one, the receiving device updates the value of the fifth variable to the value of the first variable, and the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0046] In a possible implementation manner of the fourth aspect, the method further includes: when the first timer times out, the receiving device delivers the data packet.

[0047] In a possible implementation manner of the fourth aspect, the method further includes: when the value of the third variable is equal to the value of the second variable, the receiving device submits the data packet.

[0048] In a possible implementation manner of the fourth aspect, the first timer is a reordering timer.

[0049] In a possible implementation manner of the fourth aspect, the receiving device receives the data packet, including: a Packet Data Convergence Protocol (PDCP) entity of the receiving device receives the data packet.

[0050] In a possible implementation manner of the fourth aspect, the first variable is RX_NEXT, the second variable is RX_DELIV, the third variable is RCVD_COUNT, the fifth variable is RX_REORD, and the first timer is t-Reordering.

[0051] In a fifth aspect, a method for processing data packets is provided, comprising: a receiving device stops and resets a first timer, or only stops the first timer, when a packet data convergence protocol PDCP entity is rebuilt or data is restored, and the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order; the receiving device sets the value of a sixth variable to the value of a second variable, and the sixth variable is used to indicate the maximum count value of the data packets received by the receiving device after the PDCP entity is rebuilt or the data is restored plus one, or the sixth variable is used to indicate a count value that is greater than the maximum count value of the data packets received by the receiving device after the PDCP entity is rebuilt or the data is restored, and is the count value of the first data packet not delivered to the upper layer, and the second variable indicates the count value of the first data packet that is still waiting and not delivered to the upper layer.

[0052] The fifth aspect provides a method for processing data packets, which stops and resets (resets to zero) the first timer when the PDCP entity is rebuilt or the data is restored, or only stops the first timer, and introduces a new variable (sixth variable), and sets the value of the sixth variable to the value of the second variable. After the PDCP entity is rebuilt or the data is restored, the sixth variable is used to replace the first variable, that is, the data packet is delivered according to the sixth variable, the second variable and the first timer. After reconstruction or data recovery, the first timer is prevented from being turned on when no out-of-order packets are received, and the packet loss problem caused by the premature activation of the first timer is avoided. At the same time, packet loss during PDCP entity reconstruction or data recovery is avoided, that is, the packet loss problem of data packets that have not been sent after reconstruction can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0053] In a possible implementation manner of the fifth aspect, the method further includes: when the PDCP entity is reestablished or data is restored, if the first timer is running, stopping and resetting the first timer, or only stopping the first timer.

[0054] In a possible implementation manner of the fifth aspect, the method further includes: when the PDCP entity is rebuilt or data is restored, setting the value of the sixth variable to the value of the second variable.

[0055] In a possible implementation of the fifth aspect, the method further includes: the receiving device receives a data packet; when the value of the sixth variable is less than or equal to the value of the first variable, or the value of the sixth variable is less than or equal to the value of the first variable plus the offset value, and when the value of the third variable is greater than or equal to the value of the sixth variable, the receiving device updates the value of the sixth variable to the value of the fourth variable, wherein the first variable indicates the count value of the next data packet that the receiving device expects to receive, the third variable indicates the count value of the data packet received by the receiving device, and the fourth variable indicates the value of the third variable plus one, or the fourth variable indicates the count value of the first data packet that is greater than the value of the third variable and is not received, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and adding one to the largest count value. In this implementation, after the PDCP entity is reestablished or data is recovered, when the value of the sixth variable is less than or equal to the value of the first variable, or the value of the sixth variable is less than or equal to the value of the first variable plus the offset value, the sixth variable is used to replace the function of the first variable, that is, the data packet is delivered according to the sixth variable, the second variable and the first timer. When the value of the sixth variable is greater than the value of the first variable, or the value of the sixth variable is greater than the value of the first variable plus the offset value, the first variable, the second variable and the first timer are continued to be used to deliver the data packet. After reconstruction or data recovery, it is ensured that the first timer is not started when no out-of-order packets are received, avoiding packet loss caused by the timeout of the first timer after PDCP entity reconstruction or data recovery, thereby improving user experience.

[0056] In a possible implementation of the fifth aspect, the method also includes: the receiving device receives a data packet; when the value of the sixth variable is greater than the value of the first variable, or the value of the sixth variable is greater than the value of the first variable plus the offset value, and when the value of the third variable is greater than or equal to the value of the first variable, the receiving device updates the value of the first variable to the value of the fourth variable, wherein the first variable indicates the count value of the next data packet that the receiving device expects to receive, the third variable indicates the count value of the data packet received by the receiving device, the fourth variable indicates the value of the third variable plus one, or the fourth variable indicates a count value that is greater than the value of the third variable and is the first data packet that has not been received, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and plus one to the largest count value.

[0057] In a possible implementation of the fifth aspect, the method also includes: when the PDCP entity is rebuilt or data is restored, the receiving device sets the value of the fifth variable to the value of the second variable when the first timer is stopped and reset, or sets the value of the fifth variable to the value of the second variable when the first timer is stopped, or sets the value of the first variable when the first timer is stopped and reset, or sets the value of the first variable when the first timer is stopped and reset, or sets the value of the first variable when the first timer is stopped, or sets the value of the sixth variable when the first timer is stopped and reset, or sets the value of the sixth variable when the first timer is stopped and reset, or sets the value of the sixth variable when the first timer is stopped and reset, or sets the initial value of the fifth variable, or remains unchanged, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0058] In a possible implementation of the fifth aspect, the method also includes: when the value of the sixth variable is less than or equal to the value of the first variable, or the value of the sixth variable is less than or equal to the value of the first variable plus the offset value, and when the first timer is not running and the value of the second variable is less than the value of the sixth variable, the receiving device starts the first timer.

[0059] In a possible implementation of the fifth aspect, the method also includes: when the value of the sixth variable is less than or equal to the value of the first variable, or the value of the sixth variable is less than or equal to the value of the first variable plus an offset value, and when the first timer is not running and the value of the second variable is less than the value of the sixth variable, the receiving device updates the value of the fifth variable to the value of the sixth variable, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0060] In a possible implementation manner of the fifth aspect, the method further includes: when the first timer times out, the receiving device delivers the data packet.

[0061] In a possible implementation manner of the fifth aspect, the method further includes: when the value of the third variable is equal to the value of the second variable, the receiving device submits the data packet.

[0062] In a possible implementation manner of the fifth aspect, the first timer is a reordering timer.

[0063] In a possible implementation manner of the fifth aspect, the receiving device receives the data packet, including: a Packet Data Convergence Protocol PDCP entity of the receiving device receives the data packet.

[0064] In a possible implementation manner of the fifth aspect, the first variable is RX_NEXT, the second variable is RX_DELIV, the third variable is RCVD_COUNT, the fifth variable is RX_REORD, and the first timer is t-Reordering.

[0065] In a possible implementation manner of the fifth aspect, the bias value is zero or a positive value.

[0066] In a sixth aspect, a method for processing data packets is provided, comprising: when a packet data convergence protocol PDCP entity is rebuilt or data is restored, if a first timer is running, the receiving device stops and resets the first timer or only stops the first timer, and the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order.

[0067] The method for processing data packets provided in the sixth aspect is to stop and reset (or return to zero) the first timer if it is running when the PDCP entity is reestablished or when data is restored, or to stop the first timer only, so as to avoid packet loss due to timer timeout during PDCP reestablishment. This improves the accuracy and efficiency of data transmission and improves user experience.

[0068] In a possible implementation of the sixth aspect, the method also includes: the receiving device sets the value of the first variable to the value of the second variable, the first variable indicating the count value or sequence number of the next data packet that the receiving device expects to receive, the second variable indicating the count value or sequence number of the first data packet that is still waiting and has not been delivered to the upper layer, or the second variable indicating the count value or sequence number of the most recent data packet delivered to the upper layer plus one.

[0069] In a possible implementation of the sixth aspect, before the PDCP entity is rebuilt or before data is recovered, the PDCP entity uses a reordering function, and after the PDCP entity is rebuilt or after data is recovered, when the PDCP connects two radio link control RLC entities in confirmation mode AM, the terminal device stops and resets the first timer or only stops the first timer.

[0070] In a possible implementation manner of the sixth aspect, the first timer is a reordering timer.

[0071] In a seventh aspect, a receiving device is provided, comprising a processor, a memory and a transceiver, for supporting the receiving device to perform corresponding functions in the above method. The processor, the memory and the transceiver are connected by communication, the memory stores instructions, the transceiver is used to perform specific signal transmission and reception under the drive of the processor, and the processor is used to call the instructions to implement the method for data packet processing in the above first aspect and various implementations thereof.

[0072] In the eighth aspect, a receiving device is provided, including a processing module, a storage module and a transceiver module, which are used to support the receiving device to perform the functions of the receiving device in the above-mentioned first aspect or any possible implementation method of the first aspect. The functions can be implemented by hardware, or the corresponding software can be implemented by hardware. The hardware or software includes one or more modules corresponding to the above-mentioned functions.

[0073] In a ninth aspect, a receiving device is provided, comprising a processor, a memory and a transceiver, for supporting the receiving device to perform corresponding functions in the above method. The processor, the memory and the transceiver are connected by communication, the memory stores instructions, the transceiver is used to perform specific signal transmission and reception under the drive of the processor, and the processor is used to call the instructions to implement the method for data packet processing in the above second aspect and various implementations thereof.

[0074] In the tenth aspect, a receiving device is provided, including a processing module, a storage module and a transceiver module, which are used to support the receiving device to perform the functions of the receiving device in the above-mentioned second aspect or any possible implementation of the second aspect. The functions can be implemented by hardware, or the corresponding software can be implemented by hardware. The hardware or software includes one or more modules corresponding to the above-mentioned functions.

[0075] In an eleventh aspect, a receiving device is provided, comprising a processor, a memory and a transceiver, for supporting the receiving device to perform the corresponding functions in the above method. The processor, the memory and the transceiver are connected by communication, the memory stores instructions, the transceiver is used to perform specific signal transmission and reception under the drive of the processor, and the processor is used to call the instructions to implement the method for data packet processing in the third aspect and various implementations thereof.

[0076] In the twelfth aspect, a receiving device is provided, including a processing module, a storage module and a transceiver module, which are used to support the receiving device to perform the functions of the receiving device in the above-mentioned third aspect or any possible implementation method of the third aspect. The functions can be implemented by hardware, or the corresponding software can be implemented by hardware. The hardware or software includes one or more modules corresponding to the above-mentioned functions.

[0077] In the thirteenth aspect, a receiving device is provided, comprising a processor, a memory and a transceiver, which are used to support the receiving device to perform the corresponding functions in the above method. The processor, the memory and the transceiver are connected by communication, the memory stores instructions, the transceiver is used to perform specific signal transmission and reception under the drive of the processor, and the processor is used to call the instruction to implement the method for data packet processing in the fourth aspect and various implementations thereof.

[0078] In the fourteenth aspect, a receiving device is provided, including a processing module, a storage module and a transceiver module, which are used to support the receiving device to perform the functions of the receiving device in the above-mentioned fourth aspect or any possible implementation method of the fourth aspect. The functions can be implemented by hardware, or the corresponding software can be implemented by hardware. The hardware or software includes one or more modules corresponding to the above-mentioned functions.

[0079] In a fifteenth aspect, a receiving device is provided, comprising a processor, a memory and a transceiver, for supporting the receiving device to perform corresponding functions in the above method. The processor, the memory and the transceiver are connected by communication, the memory stores instructions, the transceiver is used to perform specific signal transmission and reception under the drive of the processor, and the processor is used to call the instructions to implement the method for data packet processing in the fifth aspect and various implementations thereof.

[0080] In the sixteenth aspect, a receiving device is provided, including a processing module, a storage module and a transceiver module, which are used to support the receiving device to perform the functions of the receiving device in the above-mentioned fifth aspect or any possible implementation method of the fifth aspect. The functions can be implemented through hardware, or the corresponding software can be implemented through hardware. The hardware or software includes one or more modules corresponding to the above-mentioned functions.

[0081] In the seventeenth aspect, a receiving device is provided, comprising a processor, a memory and a transceiver, which are used to support the receiving device to perform the corresponding functions in the above method. The processor, the memory and the transceiver are connected by communication, the memory stores instructions, the transceiver is used to perform specific signal transmission and reception under the drive of the processor, and the processor is used to call the instructions to implement the method for data packet processing in the sixth aspect and various implementations thereof.

[0082] In the eighteenth aspect, a receiving device is provided, including a processing module, a storage module and a transceiver module, which are used to support the receiving device to perform the functions of the receiving device in the sixth aspect or any possible implementation of the sixth aspect. The functions can be implemented through hardware or through hardware executing corresponding software implementations. The hardware or software includes one or more modules corresponding to the above functions.

[0083] In the nineteenth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program includes instructions for executing the method of any possible implementation of the above-mentioned first to sixth aspects, or the first to sixth aspects.

[0084] In the twentieth aspect, a system chip is provided, including: a processing unit and a communication unit, the processing unit can execute computer instructions to enable the chip in the terminal to execute the method of any possible implementation method of the above-mentioned first to sixth aspects, or the first to sixth aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 It is a schematic diagram of a communication system suitable for the method of data packet processing of the present application.

[0086] Figure 2 It is a schematic structural diagram of the count value (COUNT) structure of a data packet.

[0087] Figure 3 It is a schematic diagram of the data packet submission and the update process of each variable.

[0088] Figure 4 It is a schematic diagram of a data packet received before PDCP re-establishment according to an embodiment of the present application.

[0089] Figure 5 It is a schematic flowchart of a method for processing data packets according to an embodiment of the present application.

[0090] Figure 6 It is a schematic flowchart of a method for processing data packets according to another embodiment of the present application.

[0091] Figure 7 It is a schematic flowchart of a method for processing data packets according to an embodiment of the present application.

[0092] Figure 8 It is a schematic flowchart of a method for processing data packets according to another embodiment of the present application.

[0093] Fig. 9 It is a schematic flowchart of a method for processing data packets according to an embodiment of the present application.

[0094] Fig.10 It is a schematic flowchart of a method for processing data packets according to another embodiment of the present application.

[0095] Fig.11 It is a schematic flowchart of a method for processing data packets according to an embodiment of the present application.

[0096] Fig.12 It is a schematic flowchart of a method for processing data packets according to another embodiment of the present application.

[0097] Fig.13 It is a schematic flowchart of a method for processing data packets according to yet another embodiment of the present application.

[0098] Fig.14 It is a schematic flowchart of a method for processing data packets according to yet another embodiment of the present application.

[0099] Fig.15 It is a schematic block diagram of a receiving device according to another embodiment of the present application.

[0100] Fig.16 It is a schematic block diagram of a receiving device according to an embodiment of the present application.

[0101] Fig.17 It is a schematic block diagram of a receiving device according to another embodiment of the present application.

[0102] Fig.18 It is a schematic block diagram of a receiving device according to an embodiment of the present application.

[0103] Fig.19 It is a schematic block diagram of a receiving device according to another embodiment of the present application.

[0104] Fig. 20 It is a schematic block diagram of a receiving device according to an embodiment of the present application.

[0105] Fig.21 It is a schematic block diagram of a receiving device according to another embodiment of the present application.

[0106] Fig. 22 It is a schematic block diagram of a receiving device according to an embodiment of the present application.

[0107] Fig.23 It is a schematic block diagram of a receiving device according to another embodiment of the present application.

[0108] Fig.24 It is a schematic block diagram of a receiving device according to an embodiment of the present application.

[0109] Fig.25 It is a schematic block diagram of a receiving device according to another embodiment of the present application.

[0110] Fig.26 It is a schematic block diagram of a receiving device according to another embodiment of the present application. DETAILED DESCRIPTION

[0111] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0112] The technical solutions of the embodiments of the present application can be applied to various communication systems, for example: Global System of Mobile communication (GSM) system, Code Division Multiple Access (CDMA) system, Wideband Code Division Multiple Access (WCDMA) system, General Packet Radio Service (GPRS), Long Term Evolution (LTE) system, LTE Frequency Division Duplex (FDD) system, LTE Time Division Duplex (TDD), Universal Mobile Telecommunication System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) communication system, future fifth generation (5G) system or new radio (NR), etc.

[0113] The receiving device in the embodiment of the present application may be a terminal device, which may refer to a user device, an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent or a user device. The terminal device may also be a cellular phone, a cordless phone, a Session Initiation Protocol (Session Initiation Protocol, SIP) phone, a Wireless Local Loop (Wireless Local Loop, WLL) station, a Personal Digital Assistant (Personal Digital Assistant, PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a future 5G network or a terminal device in a future evolved Public Land Mobile Network (Public Land Mobile Network, PLMN), etc., and the embodiment of the present application is not limited to this.

[0114] The receiving device in the embodiment of the present application may also be a network device, and the network device may be a device for communicating with a terminal device. The network device may be a base station (Base Transceiver Station, BTS) in a Global System of Mobilecommunication (GSM) system or a Code Division Multiple Access (CDMA), or a base station (NodeB, NB) in a Wideband Code Division Multiple Access (WCDMA) system, or an evolved base station (Evolutional NodeB, eNB or eNodeB) in an LTE system, or a wireless controller in a Cloud Radio Access Network (CRAN) scenario, or the network device may be a relay station, an access point, a vehicle-mounted device, a wearable device, a network device in a future 5G network, or a network device in a future evolved PLMN network, etc., and the embodiments of the present application are not limited.

[0115] Figure 1 Schematic diagram of a communication system applicable to the method of data packet submission of the present application. Figure 1 As shown, the communication system 100 includes a network device 102, which may include multiple antennas, for example, antennas 104, 106, 108, 110, 112, and 114. In addition, the network device 102 may additionally include a transmitter chain and a receiver chain, and those skilled in the art will appreciate that they may include multiple components related to signal transmission and reception (for example, processors, modulators, multiplexers, encoders, demultiplexers, or antennas, etc.).

[0116] Network device 102 can communicate with a plurality of end devices, such as end device 116 and end device 122. However, it is understood that network device 102 can communicate with any number of end devices similar to end devices 116 or 122. End devices 116 and 122 can be, for example, cellular phones, smart phones, laptops, handheld communication devices, handheld computing devices, satellite radios, global positioning systems, PDAs, and / or any other suitable devices for communicating over wireless communication system 100.

[0117] like Figure 1As shown, terminal device 116 is in communication with antennas 112 and 114, where antennas 112 and 114 transmit information to terminal device 116 via forward link 118 and receive information from terminal device 116 via reverse link 120. In addition, terminal device 122 is in communication with antennas 104 and 106, where antennas 104 and 106 transmit information to terminal device 122 via forward link 124 and receive information from terminal device 122 via reverse link 126.

[0118] For example, in an FDD system, forward link 118 may utilize a different frequency band than that used by reverse link 120 and forward link 124 may utilize a different frequency band than that used by reverse link 126, for example.

[0119] As another example, in a TDD system and a full duplex system, forward link 118 and reverse link 120 may utilize a common frequency band, and forward link 124 and reverse link 126 may utilize a common frequency band.

[0120] Each antenna (or antenna group consisting of multiple antennas) and / or area designed for communication is referred to as a sector of the network device 102. For example, the antenna group may be designed to communicate with terminal devices in a sector of the coverage area of ​​the network device 102. During the communication between the network device 102 and the terminal devices 116 and 122 via the forward links 118 and 124, respectively, the transmit antenna of the network device 102 may utilize beamforming to improve the signal-to-noise ratio of the forward links 118 and 124. In addition, compared to the way in which the network device 102 transmits signals to the randomly dispersed terminal devices 116 and 122 in the relevant coverage area using beamforming, mobile devices in adjacent cells may experience less interference.

[0121] At a given time, the network device 102, the terminal device 116, or the terminal device 122 may be a wireless communication transmitting device and / or a wireless communication receiving device. When transmitting data, the wireless communication transmitting device may encode the data for transmission. Specifically, the wireless communication transmitting device may obtain (e.g., generate, receive from other communication devices, or store in a memory, etc.) a certain number of data bits to be sent to the wireless communication receiving device through a channel. Such data bits may be included in a transmission block (or multiple transmission blocks) of data, and the transmission block may be segmented to generate multiple code blocks.

[0122] In addition, the communication system 100 may be a PLMN network or a device-to-device (D2D) network or a machine-to-machine (M2M) network or other networks. Figure 1This is just a simplified diagram for example. The network may also include other network devices. Figure 1 Not drawn in.

[0123] In air interface transmission, although data packets (service data units) are sent out in order at the transmitting end (sending device) air interface, due to the parallel operation of multiple HARQ processes, the order received at the receiving end (receiving device) is likely to be out of order. The data packets are added with sequence numbers (Sequence Number, SN) at the PDCP layer of the transmitting end. The PDCP receiving entity will use the SN to reorder and detect duplicate packets to ensure sequential submission and detect duplicate packets. The transmitting end and the receiving end also need to maintain the same hyperframe number (Hyper Frame Number, HFN). The purpose of using HFN is to limit the number of bits of the sequence number transmitted on the air interface. SN and HFN together constitute the count (COUNT) value of the data packet. Each data packet has a COUNT value, and the transmitting end (sending device) air interface sends the data packets in order from the smallest to the largest COUNT value. The transmitting end needs to maintain that the SN sent does not exceed half of the total SN number to avoid confusion in the frame number. Similarly, the receiving end will also use half of the SN number as the receiving window. At the receiving end, the received data packets may also be out of order, but when the received data packets are submitted to the upper layer, they are submitted in order according to the COUNT value.

[0124] Figure 2 This is a schematic diagram of the structure of the count value (COUNT) of a data packet. Figure 2 It can be seen that the COUNT value of the data packet is composed of the SN field and the HFN field, wherein the sum of the number of bits (bit) of the HFN field part and the number of bits (bit) of the SN field part is 32 bits, that is, the COUNT field in the data packet is 32 bits.

[0125] In 5G NR, the PDCP entity of the receiving device reorders the received data packets according to the COUNT value of the data packets (service data units). The ordering and delivery process is as follows:

[0126] After receiving a data packet, the currently received COUNT value (RCVD_COUNT) is first inferred based on its SN number and the current HFN.

[0127] Determine whether the COUNT value of the received data packet is within the valid receiving window: that is, whether it is greater than or equal to the next COUNT value to be delivered (received deliver, RX_DELIV), and less than RX_DELIV + total number of SNs / 2. If it is not within the valid receiving window, the received data packet will be discarded. If it is within the valid receiving window, the valid data packet will be stored in the PDCP layer and then delivered in sequence.

[0128] Among them, there are four variables involved in sorting:

[0129] RCVD_COUNT: COUNT value of the currently received service data unit (SDU) or protocol data unit (PDU).

[0130] RX_DELIV: COUNT value of the first SDU or PDU that is still waiting and has not been delivered to the upper layer.

[0131] RX_NEXT (receive next, RX_NEXT): COUNT value of the next PDCP SDU or PDU currently expected to be received (the current maximum COUNT value received plus one).

[0132] RX_REORD (receive reorder, RX_REORD): RX_NEXT value when the reordering timer (t-reordering) is turned on. The reordering timer is used by the RLC entity under AM on the receiving side to check whether the RLC protocol data unit (PDU) or data packet transmitted by the lower layer is lost.

[0133] The specific submission process and variable update process are as follows:

[0134] If RCVD_COUNT of the currently received SDU is ≥ RX_NEXT, the value of RX_NEXT is updated to RCVD_COUNT+1.

[0135] If out of order delivery is configured, the SDU already stored in the PDCP layer is delivered to the upper layer.

[0136] If the RCVD_COUNT of the currently received SDU is equal to RX_DELIV, the relevant data packets are delivered upward in ascending order. That is, the COUNT values ​​of all stored SDUs starting from the RX_DELIV and the consecutive SDUs are delivered to the upper layer. RX_DELIV is updated to the COUNT of the first undelivered SDU, and the COUNT ≥ RX_DELIV.

[0137] If t-Reordering is running and RX_DELIV ≥ RX_REORD, stop and reset t-Reordering.

[0138] If t-Reordering is not running (including stopping due to the above situation), and RX_DELIV<RX_NEXT, update RX_REORD to RX_NEXT and start t-Reordering.

[0139] The following will Figure 3 Take this as an example to illustrate. Figure 3 It is a schematic diagram of the delivery of data packets and the update process of various variables during the reception process of data packets (for example, PDU or SDU). In Figure 3, each small rectangle represents a data packet, and the data above represents the count value of the data packet. From the first row to the eighth row, it is in the order of time (the order in which the data packets are received). Figure 3 The order of received data packets shown is: 0, 3, 5, 6, 1, 2.

[0140] exist Figure 3 In the figure, the COUNT value of the data packet (service data unit) is 0 to 7, assuming that the COUNT value from 0 to 7 is a valid receive window. First, in the first row, the receiving device has not received the data packet, so RCVD_COUNT is 0, RX_DELIV is 0, RX_REORD is 0, and RX_NEXT is also 0. Since there is no disorder, the reordering timer is in the stopped state.

[0141] In the second line, the receiving device receives data packet 0, that is, RCVD_COUNT is 0 and RX_REORD is 0. Since it is necessary to ensure in-order delivery and packet 0 is the first data packet, packet 0 is delivered to the upper layer. At this time, RX_DELIV is updated to 1 and RX_NEXT is also updated to 1.

[0142] In the third row, when the receiving device receives packet 3, RCVD_COUNT is updated to 3. Since the packets are sent in ascending order of packet count value, it proves that packets 1 and 2 have been sent, but the receiving device has not received them yet. At this time, since packets 1 and 2 before packet 3 have not been received, it proves that there is a disorder. At this time, RX_DELIV is still 1, and RX_NEXT is also updated to 4, which meets the conditions for the reordering timer to start (RX_DELIV<RX_NEXT), so the reordering timer starts. The value of RX_REORD is 4.

[0143] In the fourth row, when the receiving device receives packet No. 5, RX_DELIV is still 1, the value of RX_REORD is still 4, RCVD_COUNT is updated to 5, and RX_NEXT is also updated to 6. RX_DELIV ≥ RX_REORD is not satisfied, so the reordering timer continues to run (assuming that the reordering timer has not timed out).

[0144] In the fifth row, when the receiving device receives packet No. 6, RX_DELIV is still 1, the value of RX_REORD is still 4, RCVD_COUNT is updated to 6, and RX_NEXT is also updated to 7. RX_DELIV ≥ RX_REORD is also not satisfied, so the reordering timer continues to run (assuming that the reordering timer has not timed out).

[0145] In the sixth row, when the receiving device receives packet 1, RCVD_COUNT is updated to 1. Since packet 0 has been delivered and packet 1 is the second to be delivered in order, packet 1 will be delivered. At this time, RX_DELIV is updated to 2, the value of RX_REORD is still 4, and RX_NEXT is still 7. RX_DELIV ≥ RX_REORD is not satisfied, so the reordering timer continues to run (assuming the reordering timer has not timed out).

[0146] In the seventh row, when the receiving device receives packet 2, RCVD_COUNT is updated to 2. Since packets 0 and 1 have been delivered, and packets 2 and 3 are the third and fourth packets delivered in order, packets 2 and 3 will be delivered. Since the reordering timer is turned on when the first out-of-order packet (packet 3) is received, when all packets before the first out-of-order packet are received, it is proved that all packets before the first out-of-order packet can be delivered in order. Therefore, the reordering timer will be turned off. After that, RX_DELIV is updated to 4.

[0147] At this time, as shown in the eighth row, RX_DELIV is updated to 4, while RX_NEXT is still 7. RX_DELIV<RX_NEXT is satisfied, so the reordering timer is started. The value of RX_REORD is 7. In fact, packets 4 to 6 have not been delivered, but packets 6 and 5 have been received before packet 4, which is equivalent to receiving out-of-order packets again. Therefore, the reordering timer will be started again.

[0148] The reordering timer will be turned on when the first out-of-order packet arrives, and will be turned off when all the packets before the out-of-order packet are received (delivered to the upper layer) (assuming the reordering timer does not time out during this period). Figure 3 In the process shown, after data packet 0, data packet 3 arrives and the reordering timer is turned on, and after data packets 1 and 2 arrive, the reordering timer is stopped. The reordering timer is set to wait for packets that have been sent. After a period of time after the data packet has been sent, the receiving device still has not received it (i.e., the reordering timer times out), the PDCP entity that receives the data packet will submit the data packet received when the reordering timer is turned on and all previous data packets, even if there are still data packets that have not been received before. For example, Figure 3 As shown in the fifth row, when the receiving device receives data packet No. 6, the reordering timer times out, and the receiving device will deliver all data packets before data packet No. 3 (including data packet No. 3) to the upper layer, even if data packets No. 1 and No. 2 have not been received at this time. This means that data packets No. 1 and No. 2 will be lost.

[0149] DRB in AM mode needs to ensure that there is no packet loss during PDCP reconstruction. Since it is necessary to ensure in-order delivery, the currently received out-of-order data packets and their numbers (count values) will be retained during reconstruction. During the reconstruction process of NR PDCP, for example, for a terminal device, when switching from the source base station to the target base station, if the reordering timer is not stopped, it may time out before the end of PDCP reconstruction, which will directly lead to packet loss after the reconstruction. Even if the reordering timer is stopped and reset during PDCP reconstruction, if the reordering timer is in the running state before PDCP reconstruction, after PDCP reconstruction, it may be turned on when the first data packet is received, depending on how the reordering timer is turned on. The data recovery process is mainly the process of retransmitting data packets that have been sent but not received by the PDCP at the sending end. For the PDCP at the receiving end, when data recovery occurs at the sending end, the receiving end will receive the data packets that were not received before. If the reordering timer is turned on and times out, packet loss will result in the following problems:

[0150] If the received data packets are not out of order, the start of the reordering timer will result in the subsequent untransmitted (sent) data packets to be transmitted before the timer times out, otherwise packet loss will occur.

[0151] If the received data packets are out of order, but the arriving data packets are not after RX_NEXT when the reordering timer is stopped, the start of the reordering timer will cause the data packets that have not been transmitted (sent) after the out-of-order data packets to be transmitted before the timer times out, otherwise packet loss will occur.

[0152] by Figure 4 Take this as an example to illustrate. Figure 4 FIG. 1 is a schematic diagram of a data packet received before PDCP reestablishment in an embodiment of the present application. Figure 4 As shown, before PDCP reestablishment, if the receiving device has received data packets 0, 6, and 4. RX_DELIV is 1, RX_NEXT is 7, and RX_REORD is 7, the reordering timer is stopped and reset when PDCP is reestablished. After PDCP reestablishment, if the first data packet received is data packet 1 (not out of order), RX_DELIV is updated to 2. Since the current RX_DELIV=2<RX_NEXT=7, the reordering timer will be started. Since the target base station has not yet sent data packets 2, 3, and 5, but requires the transmission to be completed before the reordering timer times out (data packets 2, 3, and 5 are received), data packets 2, 3, and 5 will be lost.

[0153] After PDCP reestablishment or data recovery, if the first packet received is data packet No. 3 (out of order), the value of RX_DELIV is still 1, and the value of RX_NEXT is still 7. Since RX_DELIV=1<RX_NEXT=7, the reordering timer will be started, and although data packet No. 5 has not been sent, it is required to be transmitted before the timer expires. Therefore, if the transmission cannot be completed before the timer expires, data packet No. 5 will be lost.

[0154] Based on the above problems, the present application provides a method for data packet processing, which can solve the problem of packet loss caused by the reordering timer being started too early after PDCP reconstruction or data recovery, improve the accuracy and efficiency of data transmission, and improve user experience.

[0155] Combine the following Figure 5 The method for processing data packets provided by this application is described in detail. Figure 5 is a schematic flow chart of a method 200 for processing a data packet according to an embodiment of the present application. The method 200 can be applied in Figure 1 The scenario shown can of course also be applied to other communication scenarios, and the embodiments of the present application are not limited here.

[0156] like Figure 5 As shown, the method 200 includes:

[0157] S210, when a packet data convergence protocol PDCP entity is reestablished or data is recovered, if a first timer is running, the receiving device stops and resets the first timer, or only stops the first timer. The first timer is used to detect the loss of received data packets, or to detect whether received data packets are out of order.

[0158] S220, the receiving device sets the value of the first variable to the value of the second variable, the first variable indicating the count value of the next data packet that the receiving device expects to receive, and the second variable indicating the count value of the first data packet that is still waiting and has not been delivered to the upper layer.

[0159] The method for processing data packets provided in the embodiment of the present application, since the DRB in the AM mode needs to ensure that there is no packet loss when the PDCP is rebuilt, therefore, when the PDCP entity is rebuilt or the data is restored, if the first timer is running, the first timer is stopped and reset, or only the first timer is stopped, and the value of the first variable is set to the value of the second variable. Or, when the PDCP entity is rebuilt or the data is restored, if the first timer is running, the first timer is stopped and reset, or only the first timer is stopped, and when the PDCP entity is rebuilt or the data is restored, the value of the first variable is set to the value of the second variable. The first variable indicates the count value of the next data packet that the receiving device expects to receive, and the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer. In this way, after the reconstruction or data recovery, the time for the first timer to start is delayed, and the packet loss problem caused by the premature start of the first timer is avoided. At the same time, the packet loss during the PDCP entity reconstruction or data recovery is avoided, that is, the packet loss problem of the data packet that has not been sent after the reconstruction is avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0160] The following will be combined Figure 4 The example shown is used to illustrate the method 200 of the embodiment of the present application.

[0161] In S210, it is assumed that before the Packet Data Convergence Protocol PDCP entity is rebuilt or before data is restored, the data packets that the receiving device has received are data packets 0, 6, and 4. At this time, the first timer is in operation. The first timer (explained by taking the reordering timer as an example) is used to detect the loss of received data packets, or to detect whether the received data packets are out of order. At this time, when the Packet Data Convergence Protocol PDCP entity is rebuilt or data is restored, the first timer is stopped and reset, that is, the first timer is stopped and the value of the timer is reset to zero. Or only the first timer is stopped. At this time, the first variable (explained by taking RX_NEXT as an example below) is 7, and the second variable (explained by taking RX_DELIV as an example below) is 1.

[0162] It should be understood that when the Packet Data Convergence Protocol PDCP entity is reestablished or data is restored, even if the first timer is not running, the value of the first variable will be set to the value of the second variable.

[0163] In S220, the receiving device sets the value of the first variable to the value of the second variable, that is, sets the value of RX_NEXT to 1. That is, after the variable values ​​are set, both the first variable and the second variable are 1, that is, RX_NEXT=1, RX_DELIV=1.

[0164] After the PDCP entity is reestablished or data is recovered, if the first data packet received is data packet No. 1 (not out of order), at this time, RX_NEXT is updated to 2, and RX_DELIV is updated to 2. The condition for starting the first timer is: RX_DELIV<RX_NEXT, so the first timer will not be started. That is, the receiving device will continue to receive data packets No. 2, 3 and 5. Data packets No. 2, 3 and 5 do not need to be delivered together with data packets No. 1 and 2, that is, they do not need to be transmitted until the first timer expires (the first timer is not started) as in the prior art (the prior art will cause the first timer to be started). The possibility of packet loss of data packets No. 2, 3 and 5 is significantly reduced.

[0165] After PDCP reconstruction or data recovery, if the first packet received is data packet No. 3 (out of order), and the second variable (RX_DELIV) is still 1, then RX_NEXT will be updated to 5, which meets the conditions for starting the first timer, so the first timer will be started. Since data packet No. 3 is received, it proves that data packets No. 1 and No. 2 have been sent (sent in order), but the receiving device has not received them. Therefore, before the first timer times out, if data packets No. 1 and No. 2 are received, data packets No. 1 to No. 3 will be delivered, and no packet loss will occur. Unlike the prior art, although data packet No. 5 has not been sent yet, it is required to be transmitted before the first timer times out. There is no need to wait for the arrival of data packet No. 5 that has not yet been sent. That is, before the first timer times out, only the data packets that have been sent need to be delivered, and the data packets that have not yet been sent do not need to be delivered. This avoids the problem of packet loss caused by data packets that have not yet been sent.

[0166] Optionally, as an embodiment, Figure 6 As shown, the method 200 also includes:

[0167] S230: The receiving device receives a data packet.

[0168] S240, when the value of the third variable is greater than or equal to the value of the first variable, the receiving device updates the value of the first variable to the value of the fourth variable, wherein the third variable indicates the count value of the data packets received by the receiving device, and the fourth variable indicates the count value of the first unreceived data packet that is greater than the value of the third variable, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and adding one to the largest count value.

[0169] Specifically, the receiving device may receive the data packet before the Packet Data Convergence Protocol PDCP entity is reestablished or before data is restored, or after the Packet Data Convergence Protocol PDCP entity is reestablished or after data is restored.

[0170] If the receiving device receives a data packet after the PDCP entity is reestablished or data is restored, combined with Figure 4In the example shown, it is assumed that the count value (COUNT) of the first received data packet is 2, that is, the value of the third variable (hereinafter, RCVD_COUNT is used as an example for explanation) is 2. At this time, the value of the first variable (RX_NEXT) is 1, so the value of the third variable is greater than the value of the first variable. At this time, the value of the first variable will be updated to 3, that is, the value of the third variable will be updated to the value of the fourth variable, and the fourth variable indicates the count value of the first unreceived data packet that is greater than the value of the third variable, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and the largest count value plus one. For example, after receiving data packet No. 2, the data packets that have been received are data packets No. 0, 2, 4 and 6, and the value of the third variable is 2, then the count value of the first unreceived data packet that is greater than the value of the third variable is 3, that is, the value of the fourth variable is 3, so the value of the first variable will be updated from 1 to the value of the fourth variable 3.

[0171] For example, combining Figure 4 Example shown. Assume that before the PDCP entity is reestablished or data is restored, the count value (COUNT) of the first data packet received is 3, that is, the value of the third variable (equivalent to RCVD_COUNT) is 3. At this time, the value of the first variable (RX_NEXT) is 1, so the value of the third variable is greater than the value of the first variable. At this time, the value of the first variable will be updated to 5. After receiving data packet No. 3, the data packets that have been received are data packets No. 0, 3, 4 and 6, that is, the count value of the first data packet that is greater than the value of the third variable and is not received is 5, that is, the value of the fourth variable is 5. Therefore, the value of the first variable will be updated from 1 to the value of the fourth variable 5.

[0172] Alternatively, the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, and continuing and being the largest count value plus one. Figure 4 Example shown. For example, after the PDCP entity is reestablished or data is recovered, assume that the count value (COUNT) of the first data packet received is 2, that is, the value of the third variable (equivalent to RCVD_COUNT) is 2. At this time, the value of the first variable (RX_NEXT) is 1. Therefore, the value of the third variable is greater than the value of the first variable. The count values ​​of the data packets received by the PDCP entity are 0, 2, 4, and 6. Among the count values ​​of the received data packets, starting from 2, there are no consecutive ones with 2, so 2 is the largest one. Add one to 2 and you get 3, that is, the value of the first variable is updated from 1 to the value of the fourth variable 3.

[0173] For example, combining Figure 4Example shown. After the PDCP entity is rebuilt or data is restored, assume that the count value (COUNT) of the first received data packet is 3, that is, the value of the third variable (equivalent to RCVD_COUNT) is 3. At this time, the value of the first variable (RX_NEXT) is 1. Therefore, the value of the third variable is greater than the value of the first variable. The count values ​​of the data packets that the PDCP entity has received are 0, 3, 4, and 6. Among the count values ​​of the received data packets, starting from 3, 4 is continuous with 3, and 4 is the largest count value that is continuous with 3. Therefore, adding one to 4 gives 5, that is, the value of the first variable is updated from 1 to the value of the fourth variable 5.

[0174] The method for processing data packets provided in the embodiment of the present application can update the value of the first variable (RX_NEXT) according to the data packets actually received by the receiving device, so that the first variable is more consistent with its physical definition, that is, the next data packet that the receiving device expects to receive. At the same time, the accuracy and efficiency of data packet transmission and delivery are improved, and the user experience is improved.

[0175] Optionally, as an embodiment, the method 200 further includes:

[0176] S250, if the receiving device is configured by an upper layer to send a PDCP status report, before the receiving device sets the value of the first variable to the value of the second variable, generating a bit map in the PDCP status report; or,

[0177] If the receiving device is configured by an upper layer to send a PDCP status report, a bit map in the PDCP status report is generated according to the value of the first variable and the value of the second variable before the PDCP entity is reestablished or before data is recovered.

[0178] Specifically, for DRB in AM mode, a PDCP status report may need to be sent when the PDCP entity is reestablished or data is recovered. The PDCP status report includes two parts. The first part is the count value of the first missed data packet (first missed count). If the receiving device is configured by the upper layer to send a PDCP status report, the PDCP status report always includes the content of the first part. The second part is a bit map. Each bit in the bit map represents the status of a data packet. For example, 0 represents not received and 1 represents received. The judgment condition for whether the PDCP status report includes the second part is: when the value of the first variable (RX_NEXT) is greater than the value of the second variable (RX_DELIV), the PDCP status report includes the second part. If this condition is met, a PDCP status report (including the first part and the second part) is generated and sent to the upper layer. Since the value of RX_NEXT is changed when the PDCP is reestablished or when the data is recovered, it is necessary to compare the RX_NEXT and RX_DELIV values ​​before the PDCP entity is reestablished or before the data is recovered, or before the value of the first variable is set to the value of the second variable. A judgment is made using the value of the first variable before setting and the value of the second variable to determine whether the generated PDCP status report includes the content of the second part.

[0179] by Figure 4The example shown is illustrative. Before the PDCP entity is rebuilt or before data is restored, the receiving device has received data packets 0, 6, and 4. At this time, RX_DELIV is 1 and RX_NEXT is 7. The receiving device is configured by the upper layer to send a PDCP status report. The receiving device stops and resets the first timer, or only stops the first timer. And the value of the first variable is set to the value of the second variable, that is, the value of RX_NEXT is set to 1. After the variable values ​​are set, both the first variable and the second variable are 1, that is, RX_NEXT=1, RX_DELIV=1. In this case, it is necessary to use the values ​​of the first variable and the second variable before the receiving device sets the value of the first variable to the value of the second variable, or before the PDCP entity is rebuilt or before data is restored, to determine whether the PDCP status report includes the content of the second part (bit map). Before the receiving device sets the value of the first variable to the value of the second variable, or before the PDCP entity is rebuilt or before data is restored, the value of the first variable (RX_DELIV) is 1 and the value of the second variable (RX_NEXT) is 7. RX_NEXT>RX_DELIV, the condition is met, that is, the generated PDCP status report includes the content of the second part (bit map), and the bit map can be: 10001010, 1 represents received, 0 represents not received. It also includes the content of the first part, that is, the count value of the first lost data packet is 1.

[0180] Optionally, as an embodiment, the method 200 further includes:

[0181] S260, when the PDCP entity is rebuilt or data is restored, the receiving device sets the value of the fifth variable to the value of the second variable when the first timer is stopped and reset, or to the value of the second variable when the first timer is stopped, or to the value of the first variable when the first timer is stopped and reset, or to the value of the first variable when the first timer is stopped, or to the initial value of the fifth variable, or remains unchanged, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0182] Specifically, when the PDCP entity is rebuilt or data is restored, since the first timer needs to be stopped and reset, or only the first timer needs to be stopped, after the first timer is stopped and reset, or after the first timer is stopped, the value of the fifth variable (RX_REORD is used as an example below) is set to the value of the second variable (RX_DELIV) when the first timer is stopped and reset, or to the value of the second variable when the first timer is stopped, or to the value of the first variable (RX_NEXT) when the first timer is stopped and reset, or to the value of the first variable when the first timer is stopped, or to the initial value of the fifth variable 0, or remains unchanged.

[0183] The following will Figure 4 The following is an example for explanation.

[0184] Assume that before the Packet Data Convergence Protocol PDCP entity is reestablished or before data is restored, the data packets received by the receiving device are data packets 0, 6, and 4, and the first timer is in a running state. At this time, RX_REORD = RX_NEXT = 7, RX_DELIV = 1. After the first timer is stopped and reset, or only the first timer is stopped, and the value of the first variable is set to the value of the second variable, the value of the first variable RX_NEXT is 1, so the value of the fifth variable RX_REORD is set to the value of the second variable RX_DELIV when the first timer is stopped and reset (or only the first timer is stopped), that is, 1, or the value of the fifth variable RX_REORD is set to the value of the first variable RX_NEXT when the first timer is stopped and reset (or only the first timer is stopped), that is, 7, or set to the initial value 0 of the fifth variable, or remain unchanged, that is, keep the original 7. By setting the value of the fifth variable RX_REORD when the PDCP entity is reestablished or when data is recovered, the receiving device is equivalent to returning the value of the fifth variable RX_REORD before the timer is started to zero when the timer is started again next time, that is, no out-of-order data packets are received. The value of RX_REORD can be set flexibly.

[0185] It should be understood that in an embodiment of the present application, when the PDCP entity is rebuilt or when data is restored, the receiving device may also set the value of the fifth variable to other values, and the embodiment of the present application is not limited here.

[0186] Optionally, as an embodiment, the method 200 further includes:

[0187] S270: When the first timer is not running and the value of the second variable is less than the value of the first variable, the receiving device starts the first timer.

[0188] Specifically, when the first timer is not running and the value of the second variable (RX_DELIV) is less than the value of the first variable (RX_NEXT), it proves that out-of-order packets are received, for example, Figure 4 Take the example shown for illustration, that is, the data packets received before reconstruction or data recovery are data packets 0, 6, and 4. Assume that the first timer is stopped due to PDCP reconstruction or data recovery, that is, RX_NEXT=1, RX_DELIV=1. Assume that data packet 3 is received after reconstruction, at this time, the first variable is updated to 5, and the second variable is still 1, which satisfies the value of the second variable less than the value of the first variable, that is, data packets 1 and 2 should have been received first, but now data packet 3 is received first, so there is a disorder. At this time, the first timer will be turned on, and the first timer is turned on to wait for data packets 1 and 2 to be received. And the value of RX_REORD will be updated to the value of RX_NEXT, that is, the value of RX_REORD will be updated to 5. Assuming that data packets 1 and 2 have been received before the first timer times out, then the data packets before data packet 5 (data packets 1 to 4) are delivered to the upper layer. Assuming that data packets 1 and / or 2 have not been received before the first timer times out, then when the first timer times out, the data packet before data packet 5 (data packet 3) will be delivered, which means that data packets 1 and / or 2 are lost.

[0189] Optionally, as an embodiment, the method 200 further includes:

[0190] S280, when the first timer is not running and the value of the second variable is less than the value of the first variable, the receiving device updates the value of the fifth variable to the value of the first variable, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0191] Specifically, when the first timer is not running and the value of the second variable (RX_DELIV) is less than the value of the first variable (RX_NEXT), it proves that out-of-order data packets are received. At this time, the first timer will be started, and the value of the fifth variable (equivalent to RX_REORD) will be updated to the value of the first variable, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0192] For example, suppose that the received data packet is data packet 0, that is, RX_NEXT=1, RX_DELIV=1, and RX_REORD is 0. Suppose that data packet 3 is received first, then the first variable RX_NEXT is updated to 4, and the second variable RX_DELIV is still 1, which satisfies that the value of the second variable is less than the value of the first variable, that is, data packets 1 and 2 should be received first, but now data packet 3 is received first, so there is a disorder. At this time, the first timer will be turned on. The first timer is turned on to wait for data packets 1 and 2 to be received. At this time, the value of RX_REORD is updated to the value of RX_NEXT, that is, the value of RX_REORD is updated to 4. Suppose that data packets 1 and 2 have been received before the first timer times out, then the receiving device delivers the data packets before data packet 4 (data packets 1 to 3) to the upper layer. Suppose that data packets 1 and / or 2 have not been received before the first timer times out, then when the first timer times out, the receiving device delivers the data packet before data packet 4 (data packet 3), which means that data packets 1 and 2 are lost.

[0193] Optionally, the first timer is a reordering timer, or the first timer may be other timers for detecting loss of received data packets, or for detecting whether received data packets are out of order, which is not limited in the embodiments of the present application.

[0194] Optionally, as an embodiment, the method 200 further includes:

[0195] S290: When the first timer times out, the receiving device delivers the data packet.

[0196] Specifically, since the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order. The first timer will be turned on when the first out-of-order data packet arrives, and will be turned off when all the data packets before the out-of-order data packet are received (delivered to the upper layer) when it is turned on (assuming that the reordering timer has not timed out in this time period). In the event that the first timer times out, the PDCP entity that receives the data packets will hand in the data packets received when the reordering timer is turned on and all previous data packets, even if there are still data packets that have not been received before. For example, Figure 3 As shown in the fifth row, when the receiving device receives data packet No. 6, the first timer times out, and the receiving device will deliver all data packets before data packet No. 3 (including data packet No. 3) to the upper layer, even if data packets No. 1 and No. 2 have not been received at this time. This means that data packets No. 1 and No. 2 will be lost.

[0197] For another example, suppose that the data packet that has been received is data packet No. 0, and suppose that data packet No. 3 is received first afterwards, at this time, the first timer will be turned on, and the first timer is turned on to wait for data packets No. 1 and No. 2 to be received. Assuming that data packets No. 1 and No. 2 have been received before the first timer times out, then the receiving device delivers the data packet before data packet No. 3 (data packets No. 1 to No. 3) to the upper layer. Assuming that data packets No. 1 and / or No. 2 have not been received before the first timer times out, then, when the first timer times out, the receiving device delivers the data packet before data packet No. 3 (data packet No. 3), which means that data packets No. 1 and No. 2 are lost. Optionally, as an embodiment, the method 200 also includes:

[0198] Optionally, as an embodiment, the method 200 further includes:

[0199] When the value of the third variable is equal to the value of the second variable, the receiving device delivers the data packet.

[0200] Specifically, when the value of the third variable (RCVD_COUNT) is equal to the value of the second variable (RX_DELIV), it is proved that the currently received data packet is not out of order, and the data packet can be delivered to the upper layer.

[0201] For example, assuming that the received data packet is data packet No. 0, that is, RX_NEXT=1, RX_DELIV=1, and assuming that data packet No. 1 is received first, that is, RCVD_COUNT=RX_DELIV=1, then data packet No. 1 can be delivered.

[0202] For example, Figure 3 In the eighth row shown, RX_DELIV is 4, and RX_NEXT is 7. RX_DELIV<RX_NEXT, so the reordering timer is turned on. The value of RX_REORD is 7. In fact, data packets 4 to 6 have not been delivered yet, but data packets 6 and 5 have been received before data packet 4, which is equivalent to receiving out-of-order data packets again. Therefore, the first timer will be started again. Assuming that data packet 4 is received later, that is, RCVD_COUNT=RX_DELIV=4, since data packets 5 and 6 have been received, data packets 4 to 6 can be delivered to the upper layer.

[0203] The method for processing data packets provided in the embodiment of the present application stops and resets the first timer, or only stops the first timer, and sets the value of the first variable to the value of the second variable when the packet data convergence protocol PDCP entity is rebuilt or the data is restored. In this way, after the reconstruction or data recovery, the time for starting the first timer is delayed, and the packet loss problem caused by the premature start of the first timer is avoided. At the same time, the packet loss problem of the data packet that is not sent after the reconstruction can be avoided. After the data packet is subsequently received, the data packet can be delivered according to the first timer, the third variable and the second variable. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0204] It should be understood that in various embodiments of the present application, the receiving device receiving the data packet may include: the Packet Data Convergence Protocol PDCP entity of the receiving device receiving the data packet, or other entities or units of the receiving device receiving the data packet, and the embodiments of the present application are not limited here.

[0205] It should also be understood that in various embodiments of the present application, the first variable, the second variable, the third variable, the fourth variable and the fifth variable are only used to distinguish different types of variables. Their names may also be other names, and should not cause any limitation to the embodiments of the present application.

[0206] The present application also provides a method for processing a data packet. Figure 7 As shown, the method 300 includes:

[0207] S310, a receiving device receives a data packet.

[0208] S320, when the value of the third variable is greater than or equal to the value of the first variable, the receiving device updates the value of the first variable to the value of the fourth variable, wherein the first variable indicates the count value of the next data packet that the receiving device expects to receive, the third variable indicates the count value of the data packet received by the receiving device, and the fourth variable indicates the count value of the first data packet that is greater than the value of the third variable and is not received, or the fourth variable indicates the count value of the data packets received by the receiving device, starting from the value of the third variable, continuously and with the largest count value plus one.

[0209] Specifically, during the normal reception of data packets by the receiving device, including before the Packet Data Convergence Protocol PDCP entity is rebuilt or before data is recovered, or after the Packet Data Convergence Protocol PDCP entity is rebuilt or after data is recovered, although the data packets are sent in sequence (in ascending order of COUNT values) at the transmitting end (sending device) air interface, due to the parallel operation of multiple HARQ processes, the order of reception at the receiving device is likely to be out of order. After the receiving device receives the data packet. Combined with Figure 4In the example shown, after the PDCP entity is reestablished or data is restored, it is assumed that the count value (COUNT) of the first data packet received is 2, that is, the value of the third variable (equivalent to RCVD_COUNT) is 2. At this time, since the value of the first variable is set to the value of the first variable, that is, the value of the first variable (RX_NEXT) is 1, the value of the third variable is greater than the value of the first variable. At this time, the value of the first variable is updated to 3, that is, the value of the third variable is updated to the value of the fourth variable, and the fourth variable indicates the count value of the first data packet that is greater than the value of the third variable and is not received, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and the largest count value plus one. For example, after receiving data packet No. 2, the data packets that have been received are data packets No. 0, 2, 4 and 6, and the value of the third variable is 2, then the count value of the first data packet that is greater than the value of the third variable and is not received is 3, that is, the value of the fourth variable is 3, so the value of the first variable is updated from 1 to the value of the fourth variable 3.

[0210] For another example, suppose that the data packets that have been received are data packets 0 and 3. At this time, RX_NEXT is updated to 4, and the value of RX_DELIV is 1. Suppose that data packet 5 is received at this time, that is, the value of the third variable (equivalent to RCVD_COUNT) is 5. Since the value of the first variable (RX_NEXT) is 4 before receiving the data packet, the value of the third variable is greater than the value of the first variable. At this time, the value of the first variable will be updated to 6. That is, after receiving data packet 5, the data packets that have been received are data packets 0, 3, and 5, that is, the count value that is greater than the value of the third variable and is the first data packet that has not been received is 6, that is, the value of the fourth variable is 6, therefore, the value of the first variable will be updated from 4 to the value of the fourth variable 6.

[0211] Alternatively, the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, and continuing and being the largest count value plus one. Figure 4 Example shown. For example, after the PDCP entity is reestablished or data is recovered, assume that the count value (COUNT) of the first data packet received is 2, that is, the value of the third variable (equivalent to RCVD_COUNT) is 2. At this time, the value of the first variable (RX_NEXT) is 1. Therefore, the value of the third variable is greater than the value of the first variable. The count values ​​of the data packets received by the PDCP entity are 0, 2, 4, and 6. Among the count values ​​of the received data packets, starting from 2, there are no consecutive ones with 2, so 2 is the largest one. Add one to 2 and you get 3, that is, the value of the first variable is updated from 1 to the value of the fourth variable 3.

[0212] For another example, suppose that the data packets received are data packets No. 0 and No. 3. At this time, RX_NEXT is 4, RX_DELIV is 1, and the first timer is in the running state. Suppose that data packet No. 5 is received at this time, that is, the value of the third variable (equivalent to RCVD_COUNT) is 5. At this time, the value of the first variable (RX_NEXT) is 4, so the value of the third variable is greater than the value of the first variable. At this time, the value of the first variable will be updated to 6. That is, after receiving data packet No. 5, the count values ​​of the data packets received by the terminal device (the data packets stored in the PDCP entity) are 0, 3, and 5. Among the count values ​​of the received data packets, starting from 5, there are no consecutive values ​​with 5, so 5 is the largest one. Add one to 6 to get 6, that is, the value of the first variable is updated from 4 to the value of the fourth variable 6.

[0213] The method for processing data packets provided in the embodiment of the present application can update the value of the first variable (RX_NEXT) according to the data packets actually received by the receiving device, so that the first variable is more consistent with its physical definition, that is, the first variable is updated to the count value of the next data packet that the receiving device expects to receive. At the same time, the accuracy and efficiency of data packet transmission and delivery are improved, and the user experience is improved.

[0214] Optionally, as an embodiment, Figure 8 As shown, the method 300 also includes:

[0215] S330, when the first timer is not running and the value of the second variable is less than the value of the first variable, the receiving device updates the value of the fifth variable to the value of the first variable, wherein the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order, the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer, and the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0216] Specifically, when the first timer is not running, and the value of the second variable (RX_DELIV) is less than the value of the first variable (RX_NEXT), it proves that an out-of-order data packet is received. At this time, the first timer will be started, and the value of the fifth variable (equivalent to RX_REORD) will be updated to the value of the first variable, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered.

[0217] For example, assume that the data packet that has been received is data packet 0, that is, RX_NEXT=1, RX_DELIV=1, RX_REORD is 0, and the first timer is in a stopped state. Assume that data packet 3 is received first, at this time, the first variable RX_NEXT is updated to 4, and the second variable RX_DELIV is still 1, which satisfies that the value of the second variable is less than the value of the first variable, that is, data packets 1 and 2 should have been received first, but now data packet 3 has been received first, so there is a disorder. At this time, the first timer will be turned on. The first timer is turned on to wait for data packets 1 and 2 to be received. At this time, the value of RX_REORD is updated to the value of RX_NEXT, that is, the value of RX_REORD is updated to 4. Assuming that data packets 1 and 2 have been received before the first timer times out, the receiving device delivers the data packets before data packet 4 (data packets 1 to 3) to the upper layer. Assuming that data packets 1 and / or 2 have not been received before the first timer times out, when the first timer times out, the receiving device delivers the data packet before data packet 4 (data packet 3), which means that data packets 1 and 2 are lost.

[0218] Optionally, the first timer is a reordering timer, or the first timer may be other timers for detecting loss of received data packets, or for detecting whether received data packets are out of order, which is not limited in the embodiments of the present application.

[0219] Optionally, as an embodiment, the method 300 further includes:

[0220] S340, the receiving device stops and resets the first timer, or stops the first timer when the packet data convergence protocol PDCP entity is reestablished or data is restored. The first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order.

[0221] S350: The receiving device sets the value of the first variable to the value of the second variable, where the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer.

[0222] Specifically, since the DRB in the AM mode needs to ensure that there is no packet loss when the PDCP is rebuilt, when the PDCP entity is rebuilt or the data is restored, if the first timer is running, the first timer is stopped and reset, or the first timer is stopped, and the value of the first variable is set to the value of the second variable. Alternatively, when the PDCP entity is rebuilt or the data is restored, if the first timer is running, the first timer is stopped and reset, or the first timer is stopped, and the value of the first variable is set to the value of the second variable when the PDCP entity is rebuilt or the data is restored. The first variable indicates the count value of the next data packet that the receiving device expects to receive, and the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer. In this way, after the reconstruction or data recovery, the time for the first timer to start is delayed, and the packet loss problem caused by the premature start of the first timer is avoided. At the same time, packet loss during the PDCP entity reconstruction or data recovery is avoided, that is, the packet loss problem of the data packet that was not sent after the reconstruction is avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0223] Optionally, as an embodiment, the method 300 further includes:

[0224] S360, if the receiving device is configured by an upper layer to send a PDCP status report, before the receiving device sets the value of the first variable to the value of the second variable, generating a bit map in the PDCP status report; or,

[0225] If the receiving device is configured by an upper layer to send a PDCP status report, a bit map in the PDCP status report is generated according to the value of the first variable and the value of the second variable before the PDCP entity is reestablished or before data is recovered.

[0226] Optionally, as an embodiment, the method 300 further includes:

[0227] S370: When the first timer is not running and the value of the second variable is less than the value of the first variable, the receiving device starts the first timer.

[0228] Specifically, when the first timer is not running and the value of the second variable (RX_DELIV) is less than the value of the first variable (RX_NEXT), it proves that out-of-order packets are received, for example, Figure 4The example shown is used for explanation, that is, the data packets received before reconstruction or data recovery are data packets 0, 6, and 4. It is assumed that the first timer is stopped due to PDCP reconstruction or data recovery, and RX_NEXT is set to the value of RX_DELIV during the reconstruction process. That is, RX_NEXT=1, RX_DELIV=1, and it is assumed that data packet 3 is received after reconstruction. At this time, the first variable is updated to 5, and the second variable is still 1, which satisfies the value of the second variable less than the value of the first variable, that is, data packets 1 and 2 should have been received first, but now data packet 3 is received first, so there is a disorder. At this time, the first timer will be started, and the first timer is started to wait for data packets 1 and 2 to be received. And the value of RX_REORD will be updated to the value of RX_NEXT, that is, the value of RX_REORD will be updated to 5. Assuming that data packets 1 and 2 have been received before the first timer times out, then the data packets before data packet 5 (data packets 1 to 4) are delivered to the upper layer. Assuming that data packets 1 and / or 2 have not been received before the first timer times out, then when the first timer times out, the data packet before data packet 5 (data packet 3) will be delivered, which means that data packets 1 and / or 2 are lost.

[0229] Optionally, as an embodiment, the method 300 further includes:

[0230] S380: When the first timer times out, the receiving device delivers the data packet.

[0231] Optionally, as an embodiment, the method 300 further includes:

[0232] S390: When the value of the third variable is equal to the value of the second variable, the receiving device submits the data packet.

[0233] It should be understood that steps S350 to S390 are similar to the corresponding steps in method 200 and will not be repeated here.

[0234] The method for data packet processing provided by the embodiment of the present application, after receiving the data packet, according to the count value of the data packet. The value of the first variable (RX_NEXT) can be updated according to the situation of the data packet actually received by the receiving device, that is, when the value of the third variable (RCVD_COUNT) is greater than or equal to the value of the first variable (RX_NEXT), the receiving device updates the value of the first variable to be greater than the value of the third variable and the count value of the first data packet not received, or the value of the first variable is updated to the count value of the data packet received by the receiving device, starting from the value of the third variable, continuously and adding one to the maximum count value. The first variable can be made more consistent with its physical definition, that is, the first variable is updated to the count value of the next data packet that the receiving device expects to receive. After the subsequent data packet is received, the data packet can be submitted according to the first timer, the third variable and the first variable. The accuracy of data transmission and the efficiency of data transmission are improved, and the user experience is improved.

[0235] It should be understood that in various embodiments of the present application, the receiving device receiving the data packet may include: the Packet Data Convergence Protocol PDCP entity of the receiving device receiving the data packet, or other entities or units of the receiving device receiving the data packet, and the embodiments of the present application are not limited here.

[0236] The present application also provides a method for processing a data packet. Fig. 9 As shown, the method 400 includes:

[0237] S410, a receiving device receives a data packet.

[0238] S420, when the first timer is not running due to the reestablishment or data recovery of the Packet Data Convergence Protocol PDCP entity, the value of the second variable is less than the value of the first variable, and the value of the first variable is different from the value of the first variable before the PDCP entity is reestablished or before the data is recovered, the receiving device starts the first timer;

[0239] Alternatively, when the first timer is not running due to a Packet Data Convergence Protocol PDCP entity reestablishment or data recovery, and the value of the second variable is less than the value of the first variable, the receiving device starts the first timer;

[0240] Among them, the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order, the first variable indicates the count value of the next data packet that the receiving device expects to receive, and the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer.

[0241] The method for processing data packets provided in the embodiment of the present application delays the start time of the first timer by changing the start condition of the first timer, thereby avoiding the packet loss problem caused by the premature start of the first timer. At the same time, the packet loss problem caused by the reconstruction of the PDCP entity or data recovery can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0242] The following will be combined Figure 4 The example shown is used to illustrate the method 400 of the embodiment of the present application.

[0243] In S410, a receiving device receives a data packet. The receiving device may receive the data packet before a Packet Data Convergence Protocol PDCP entity is reestablished or before data is restored, or after a Packet Data Convergence Protocol PDCP entity is reestablished or after data is restored.

[0244] Assume that before the Packet Data Convergence Protocol PDCP entity is rebuilt or data is restored, the data packets that the receiving device has received are data packets 0, 6, and 4, and the first timer is in operation. The first timer (equivalent to the reordering timer) is used to detect the loss of received data packets, or to detect whether the received data packets are out of order. At this time, the Packet Data Convergence Protocol PDCP entity is rebuilt or data is restored. Therefore, if the first timer is stopped and reset, the first timer is stopped and the timer value is reset to zero. Or only the first timer is stopped. At this time, the first variable (equivalent to RX_NEXT) is 7, and the second variable (equivalent to RX_DELIV) is 1.

[0245] In S420, assuming that after the PDCP entity is reestablished or data is recovered, the first data packet received is data packet No. 1 (not out of order), RX_NEXT is still 7, and RX_DELIV is updated to 2, or if the first data packet received is data packet No. 3, at this time, RX_NEXT is still 7, and RX_DELIV is restored to 1. The conditions for starting the first timer are: when the first timer is stopped due to the PDCP entity reestablishment or data recovery, the value of the second variable is less than the value of the first variable, and the value of the first variable is different from the value of the first variable before the PDCP entity is reestablished or data is recovered. First, the first timer is not running due to the PDCP entity reestablishment or data recovery, and the first condition is met. Secondly, the value of the second variable (RX_DELIV) is less than the value of the first variable (RX_NEXT), and the second condition is met. Finally, the value of the first variable (RX_NEXT) is the same as the value of the first variable before the PDCP entity is rebuilt or before data is recovered, both of which are 7. Therefore, the third condition is not met. Therefore, the first timer will not be turned on, that is, the first timer will not be turned on until the count value (COUNT) of the first data packet arriving is greater than or equal to 7. In essence, the first timer will not be turned on for any data packet before receiving data packet No. 7. That is, the first timer will not be turned on until all the out-of-order data packets before the maximum count value packet received before reconstruction are completed. Instead of turning on the first timer after receiving data packet No. 3 as in the prior art, which causes the problem of packet loss of data packet No. 5, the packet loss problem caused by data packets that have not yet been sent is avoided.

[0246] For another example, in S420, after the PDCP entity is rebuilt or after the data is recovered or after the PDCP entity is rebuilt or before the data is recovered, the receiving device receives a data packet. Assuming that the data packets that have been received by the receiving device are data packets 0 and 1, the first timer (equivalent to the reordering timer) is in a closed state. At this time, the first variable (equivalent to RX_NEXT) is 2, and the second variable (equivalent to RX_DELIV) is 2. If the first data packet received is data packet 4, RX_NEXT is updated to 5, and RX_DELIV is 2. In this case, the first timer is not running due to the PDCP entity reconstruction or data recovery, and the value of the second variable (RX_DELIV) is less than the value of the first variable (RX_NEXT), and the conditions for starting the first timer are met. Therefore, the first timer is turned on. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0247] Optionally, as an embodiment, the method 400 further includes:

[0248] S430: The receiving device updates the value of a fifth variable to the value of the first variable, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0249] Specifically, when the first timer is started, it is proved that an out-of-order data packet is received. The value of the fifth variable (equivalent to RX_REORD) is updated to the value of the first variable (RX_NEXT), wherein the fifth variable indicates the count value of the data packet when the first timer is triggered.

[0250] Combination Figure 4 Assume that the first data packet received after reconstruction or data recovery is data packet No. 7, that is, RX_NEXT=8, RX_DELIV=1, which meets the conditions for starting the first timer, and the first timer is started. At this time, the value of RX_REORD is updated to the value of RX_NEXT, that is, the value of RX_REORD is updated to 8. Assuming that all data packets before data packet No. 8 have been received before the first timer times out, then the receiving device submits all data packets before data packet No. 8 to the upper layer. Assuming that some receipt packets before data packet No. 8 have not been received before the first timer times out, then when the first timer times out, the receiving device submits the data packets before data packet No. 8, which means that the data packets that have not been received will be lost.

[0251] Optionally, the first timer is a reordering timer, or the first timer may be other timers for detecting loss of received data packets, or for detecting whether received data packets are out of order, which is not limited in the embodiments of the present application.

[0252] Optionally, as an embodiment, the method 400 further includes:

[0253] S440, when the value of the third variable is greater than or equal to the value of the first variable, the receiving device updates the value of the first variable to the value of the fourth variable, wherein the third variable indicates the count value of the data packets received by the receiving device, and the fourth variable indicates the count value of the first unreceived data packet that is greater than the value of the third variable, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and adding one to the largest count value.

[0254] Optionally, as an embodiment, the method 400 further includes:

[0255] S450, when the PDCP entity is rebuilt or data is restored, the receiving device updates the value of the fifth variable to the value of the second variable when the first timer is stopped and reset, or updates to the value of the second variable when the first timer is stopped, or updates to the value of the first variable when the first timer is stopped and reset, or updates to the value of the first variable when the first timer is stopped, or updates to the initial value of the fifth variable, or remains unchanged, and the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0256] Optionally, as an embodiment, the method 400 further includes:

[0257] When the PDCP entity is reestablished or data is restored, if the first timer is running, the receiving device stops and resets the first timer, or only stops the first timer.

[0258] Optionally, as an embodiment, the method 400 further includes:

[0259] S460: When the first timer times out, the receiving device delivers the data packet.

[0260] Optionally, as an embodiment, the method 400 further includes:

[0261] S470: When the value of the third variable is equal to the value of the second variable, the receiving device submits the data packet.

[0262] Optionally, as an embodiment, the receiving device receives a data packet, including: a Packet Data Convergence Protocol PDCP entity of the receiving device receives the data packet.

[0263] It should be understood that the above steps S440 to S470 are similar to the corresponding steps in method 300 or method 200, and the corresponding descriptions can refer to the above descriptions.

[0264] It should also be understood that in various embodiments of the present application, the receiving device receiving the data packet may include: the Packet Data Convergence Protocol PDCP entity of the receiving device receiving the data packet, or other entities or units of the receiving device receiving the data packet, and the embodiments of the present application are not limited here.

[0265] The method for processing data packets provided in the embodiment of the present application, since the DRB in the AM mode needs to ensure that there is no packet loss during PDCP reconstruction, the first timer is stopped and reset, or only the first timer is stopped when the PDCP entity is reconstructed or the data is recovered. By changing the start condition of the first timer, the start time of the first timer is delayed after reconstruction or data recovery, thereby avoiding the packet loss problem caused by the premature start of the first timer. At the same time, the packet loss problem caused by the reconstruction of the PDCP entity or data recovery can be avoided. After the data packet is subsequently received, the data packet can be delivered according to the first timer, the third variable and the first variable. The accuracy of data transmission and the efficiency of data transmission are improved, and the user experience is improved.

[0266] The present application also provides a method for processing a data packet. Fig.10 As shown, the method 500 includes:

[0267] S510, a receiving device receives a data packet.

[0268] S520, when the first timer is not running, the value of the second variable is less than the value of the first variable, and the value of the first variable is equal to the value of the third variable plus one, the receiving device starts the first timer, wherein the first variable indicates the count value of the next data packet that the receiving device expects to receive, the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer, and the third variable indicates the count value of the data packets received by the receiving device, and the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order.

[0269] The method for processing data packets provided in the embodiment of the present application delays the start time of the first timer by changing the start condition of the first timer after the receiving device receives the data packet, thereby avoiding the packet loss problem caused by the premature start of the first timer. At the same time, the packet loss problem caused by the reconstruction of the PDCP entity or data recovery can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0270] Specifically, during the normal process of receiving data packets by the receiving device, combined with Figure 4In the example shown, it is assumed that the first timer is stopped due to the reestablishment of the PDCP entity or data recovery. The first variable (equivalent to RX_NEXT) is 7, and the second variable (equivalent to RX_DELIV) is 1. After the PDCP entity is reestablished or data is recovered, it is assumed that the count value (COUNT) of the first received data packet is 3, that is, the value of the third variable (equivalent to RCVD_COUNT) is 3. The conditions for starting the first timer are: the first timer is not running, the value of the second variable is less than the value of the first variable, and the value of the first variable is equal to the value of the third variable plus one. First, the first timer is not running, and the first condition is satisfied. Secondly, the value of the second variable (RX_DELIV) is less than the value of the first variable (RX_NEXT), and the second condition is satisfied. Finally, the value of the first variable (RX_NEXT) 7 is not equal to the value of the third variable 3 plus one. Therefore, the third condition is not satisfied, and therefore, the first timer will not be started, that is, the first timer will not be started until the count value (COUNT) of the first incoming data packet is greater than or equal to 7. In essence, the first timer will not be started for data packets before receiving data packet No. 6. That is, the first timer will not be started before all out-of-order data packets before the maximum count value packet received before reconstruction are completed, instead of starting the first timer after receiving data packet No. 3 as in the prior art, thus causing the problem of data packet No. 5 being lost.

[0271] For another example, the data packets that the receiving device has received are data packets 0 and 1, and the first timer (equivalent to the reordering timer) is in the off state. At this time, the first variable (equivalent to RX_NEXT) is 2, and the second variable (equivalent to RX_DELIV) is 2. If the first data packet received later is data packet 4, that is, the value of the third variable (equivalent to RCVD_COUNT) is 4, then RX_NEXT is updated to 5, and RX_DELIV is 2. In this case, since the first timer is in the stopped state, the value of the second variable (RX_DELIV) is less than the value of the first variable (RX_NEXT), and the value of the first variable 5 is equal to the value of the third variable 4 plus one, which meets the conditions for starting the first timer. Therefore, the first timer is turned on. The problem of packet loss caused by out-of-order reception of data packets can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0272] Optionally, as an embodiment, the method 500 further includes:

[0273] S530, when the first timer is not running, the value of the second variable is less than the value of the first variable, and the value of the first variable is equal to the value of the third variable plus one, the receiving device updates the value of the fifth variable to the value of the first variable, and the fifth variable indicates the count value of the data packet when the first timer is triggered to start. The fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0274] Optionally, as an embodiment, the method 500 further includes:

[0275] S540: When the first timer times out, the receiving device delivers the data packet.

[0276] Optionally, as an embodiment, the method 500 further includes:

[0277] S550: When the value of the third variable is equal to the value of the second variable, the receiving device submits the data packet.

[0278] Optionally, as an embodiment, the method 500 further includes:

[0279] S560, when the PDCP entity is reestablished or data is restored, if the first timer is running, the first timer is stopped and reset, or only the first timer is stopped.

[0280] Optionally, as an embodiment, the receiving device receives a data packet, including: a Packet Data Convergence Protocol PDCP entity of the receiving device receives the data packet.

[0281] Optionally, the first timer is a reordering timer, or the first timer may be other timers for detecting loss of received data packets, or for detecting whether received data packets are out of order, which is not limited in the embodiments of the present application.

[0282] It should be understood that the above steps S530 to S560 are similar to the corresponding steps in method 400 or method 300 or method 200, and the corresponding descriptions can refer to the above descriptions.

[0283] It should also be understood that in various embodiments of the present application, the receiving device receiving the data packet may include: the Packet Data Convergence Protocol PDCP entity of the receiving device receiving the data packet, or other entities or units of the receiving device receiving the data packet, and the embodiments of the present application are not limited here.

[0284] The method for processing data packets provided in the embodiment of the present application delays the start time of the first timer by changing the start condition of the first timer after the receiving device receives the data packet, thereby avoiding the packet loss problem caused by the premature start of the first timer. At the same time, the packet loss problem caused by the reconstruction of the PDCP entity or data recovery can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0285] The present application also provides a method for processing a data packet. Fig.11 As shown, the method 600 includes:

[0286] S610, the receiving device stops and resets the first timer, or only stops the first timer, when the packet data convergence protocol PDCP entity is reestablished or the data is restored. The first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order.

[0287] S620, the receiving device sets the value of the sixth variable to the value of the second variable, the sixth variable is used to indicate the maximum count value of the data packets received by the receiving device after the PDCP entity is rebuilt or the data is recovered plus one, or the sixth variable is used to indicate a count value that is greater than the maximum count value of the data packets received by the receiving device after the PDCP entity is rebuilt or the data is recovered and is the first data packet not delivered to the upper layer, and the second variable indicates the count value of the first data packet that is still waiting and not delivered to the upper layer.

[0288] The following will be combined Figure 4 The example shown is used to illustrate the method 600 of the embodiment of the present application.

[0289] In S610, it is assumed that before the Packet Data Convergence Protocol PDCP entity is rebuilt or before data is restored, the data packets that the receiving device has received are data packets 0, 6, and 4, and the first timer is in operation. The first timer (equivalent to the reordering timer) is used to detect the loss of received data packets, or to detect whether the received data packets are out of order. At this time, when the Packet Data Convergence Protocol PDCP entity is rebuilt or data is restored, the first timer is stopped and reset, that is, the first timer is stopped and the value of the timer is reset to zero. Or only the first timer is stopped. At this time, the first variable (equivalent to RX_NEXT) is 7, and the second variable (equivalent to RX_DELIV) is 1.

[0290] In S620, the value of the sixth variable of the receiving device is set to the value of the second variable, and the sixth variable is used to indicate the maximum count value of the data packets received by the receiving device after the PDCP entity is reestablished or the data is recovered plus one, and the count value of the largest data packet received is 6, that is, the value of the sixth variable is 7. Alternatively, the sixth variable is used to indicate the count value of the data packet that is greater than the maximum count value of the data packets received by the receiving device after the PDCP entity is reestablished or the data is recovered and is the first data packet not delivered to the upper layer, and the maximum count value of the data packets received after the PDCP entity is reestablished or the data is recovered is 6, and the count value greater than 6 and is the first data packet not delivered is 7, that is, the value of the sixth variable is 7. The value of the sixth variable is set to the value of the second variable, and the value of the sixth variable is set to 1.

[0291] The method for processing data packets provided in the embodiment of the present application, since the DRB in AM mode needs to ensure that there is no packet loss during PDCP reconstruction, therefore, when the PDCP entity is reconstructed or the data is restored, the first timer is stopped and reset (reset to zero), or only the first timer is stopped. A new variable (sixth variable) is introduced, and the value of the sixth variable is set to the value of the second variable. After the PDCP entity is reconstructed or the data is restored, the sixth variable is used to replace the role of the first variable, that is, the data packet is delivered according to the sixth variable, the second variable and the first timer. After reconstruction or data recovery, the first timer is prevented from starting when no out-of-order data packets are received, thereby avoiding the packet loss problem caused by the premature start of the first timer. At the same time, packet loss during PDCP entity reconstruction or data recovery is avoided, that is, the packet loss problem of data packets not sent after reconstruction can be avoided. The accuracy of data transmission and the efficiency of data transmission are improved, and the user experience is improved.

[0292] Optionally, as an embodiment, Fig.12 As shown, the method 600 further includes:

[0293] S630: After the PDCP entity is reestablished or the data is restored, the receiving device receives a data packet.

[0294] S640, when the value of the sixth variable is less than or equal to the value of the first variable, or the value of the sixth variable is less than or equal to the value of the first variable plus the offset value, and when the value of the third variable is greater than or equal to the value of the sixth variable, the receiving device updates the value of the sixth variable to the value of the fourth variable, wherein the first variable indicates the count value of the next data packet that the receiving device expects to receive, the third variable indicates the count value of the data packets received by the receiving device, the fourth variable indicates the value of the third variable plus one, or the fourth variable indicates the count value of the first data packet that is greater than the value of the third variable and is not received, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and adding one to the largest count value, and the offset value is zero or a positive value.

[0295] Specifically, after the PDCP entity is rebuilt or the data is recovered, the receiving device receives a data packet, assuming that the count value (COUNT) of the first received data packet is 2, that is, the value of the third variable (equivalent to RCVD_COUNT) is 2. At this time, the value of the sixth variable is 1, and the first variable (RX_NEXT) is 7. The value of the sixth variable is less than the value of the first variable. And, the value of the third variable is greater than the value of the sixth variable. At this time, the value of the sixth variable is updated to 3, that is, the value of the third variable is updated to the value of the fourth variable, and the fourth variable indicates that the value of the third variable is increased by one, or the fourth variable indicates a count value that is greater than the value of the third variable and is the first data packet that has not been received, or the fourth variable indicates that the count value of the data packets received by the PDCP entity is increased by one starting from the value of the third variable, continuously and continuously. For example, after receiving data packet No. 2, the data packets that have been received are data packets No. 0, 2, 4, and 6, and the value of the third variable is 2. Then, the count value of the first data packet that is greater than the value of the third variable and is not received is 3, that is, the value of the fourth variable is 3, and therefore, the value of the first variable is updated from 1 to the value of the fourth variable 3. Alternatively, the count values ​​of the data packets that the PDCP entity has received are 0, 2, 4, and 6. Among the count values ​​of the received data packets, starting from 2, there is no continuous count value with 2, so 2 is the largest one, and 1 is added to 2 to get 3, that is, the value of the sixth variable is updated from 1 to the value of the fourth variable 3.

[0296] It should be understood that the bias value is zero or a positive value. Specifically, the bias value can be 0, that is, the value of the sixth variable is less than or equal to the value of the first variable 7. Alternatively, the bias value can be a positive number greater than 0, for example, assuming it is 2, combined with Figure 4In the example shown, when the sixth variable is less than or equal to 9, the sixth variable, the second variable and the third variable are used to control the switch of the first timer. The data packet is submitted in combination with the first timer. When the value of the sixth variable is greater than the value of the first variable, or the value of the sixth variable is greater than the value of the first variable plus the offset value, the first variable, the second variable and the third variable are used to control the switch of the first timer. The data packet is submitted in combination with the first timer.

[0297] The method for processing data packets provided in the embodiment of the present application stops and resets (resets to zero) the first timer when the PDCP entity is rebuilt or the data is restored, or only stops the first timer, and introduces a new variable (sixth variable), and sets the value of the sixth variable to the value of the second variable. After the PDCP entity is rebuilt or the data is restored, when the value of the sixth variable is less than or equal to the value of the first variable, or the value of the sixth variable is less than or equal to the value of the first variable plus the offset value, the sixth variable is used to replace the role of the first variable, that is, the data packet is delivered according to the sixth variable, the second variable and the first timer. When the value of the sixth variable is greater than the value of the first variable, or the value of the sixth variable is greater than the value of the first variable plus the offset value, the first variable, the second variable and the first timer are continued to be used to deliver the data packet. After reconstruction or data recovery, the time for the first timer to start is delayed, and packet loss during PDCP entity reconstruction or data recovery is avoided, that is, the packet loss problem of data packets not sent after reconstruction can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0298] Optionally, as an embodiment, Fig.13 As shown, the method 600 further includes:

[0299] S650, when the value of the sixth variable is greater than the value of the first variable, or the value of the sixth variable is greater than the value of the first variable plus the offset value, and when the value of the third variable is greater than or equal to the value of the first variable, the receiving device updates the value of the first variable to the value of the fourth variable, wherein the first variable indicates the count value of the next data packet that the receiving device expects to receive, the third variable indicates the count value of the data packets received by the receiving device, the fourth variable indicates the value of the third variable plus one, or the fourth variable indicates the count value of the first data packet that is greater than the value of the third variable and is not received, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and plus one to the largest count value.

[0300] The method for processing data packets provided in the embodiment of the present application, after the PDCP entity is rebuilt or data is recovered, when the value of the sixth variable is less than or equal to the value of the first variable, or the value of the sixth variable is less than or equal to the value of the first variable plus the offset value, the sixth variable is used to replace the function of the first variable, that is, the data packet is delivered according to the sixth variable, the second variable and the first timer. When the value of the sixth variable is greater than the value of the first variable, or the sixth variable is greater than the value of the first variable plus the offset value, the first variable, the second variable and the first timer continue to be used to deliver the data packet. After reconstruction or data recovery, it is ensured that the first timer is not started without receiving an out-of-order packet, thereby avoiding packet loss caused by the timeout of the first timer after the PDCP entity is rebuilt or data is recovered, thereby improving user experience.

[0301] Optionally, as an embodiment, the method 600 further includes:

[0302] S660, when the PDCP entity is rebuilt or data is restored, the receiving device sets the value of the fifth variable to the value of the second variable when the first timer is stopped and reset, or to the value of the second variable when the first timer is stopped, or to the value of the first variable when the first timer is stopped and reset, or to the value of the first variable when the first timer is stopped, or to the value of the first variable when the first timer is stopped, or to the value of the sixth variable when the first timer is stopped and reset, or to the value of the sixth variable when the first timer is stopped, or to the initial value of the fifth variable, or remains unchanged, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0303] Optionally, as an embodiment, the method 600 further includes:

[0304] S670, when the value of the sixth variable is less than or equal to the value of the first variable, or the value of the sixth variable is less than or equal to the value of the first variable plus the offset, and when the first timer is not running and the value of the second variable is less than the value of the sixth variable, the receiving device starts the first timer.

[0305] Optionally, as an embodiment, the method 600 further includes:

[0306] S680 When the value of the sixth variable is less than or equal to the value of the first variable, or the value of the sixth variable is less than or equal to the value of the first variable plus the offset value, and when the first timer is not running and the value of the second variable is less than the value of the sixth variable, the receiving device updates the value of the fifth variable to the value of the sixth variable, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0307] Optionally, as an embodiment, the method 600 further includes:

[0308] S690: When the first timer times out, the receiving device delivers the data packet.

[0309] Optionally, as an embodiment, the method 600 further includes:

[0310] When the value of the third variable is equal to the value of the second variable, the receiving device delivers the data packet.

[0311] Optionally, as an embodiment, the receiving device receives a data packet, including: a Packet Data Convergence Protocol PDCP entity of the receiving device receives the data packet.

[0312] Optionally, the first timer is a reordering timer, or the first timer may be other timers for detecting loss of received data packets, or for detecting whether received data packets are out of order, which is not limited in the embodiments of the present application.

[0313] It should be understood that in various embodiments of the present application, the receiving device receiving the data packet may include: the Packet Data Convergence Protocol PDCP entity of the receiving device receiving the data packet, or other entities or units of the receiving device receiving the data packet, and the embodiments of the present application are not limited here.

[0314] It should also be understood that the above steps 650 to S690 are similar to the corresponding steps in method 500, or method 400, or method 300, or method 200, and the corresponding descriptions can refer to the above descriptions.

[0315] The present application also provides a method for processing a data packet, such as Fig.14 As shown, the method 700 includes:

[0316] S710, when the packet data convergence protocol PDCP entity is reestablished or data is restored, if the first timer is running, the receiving device stops and resets the first timer or only stops the first timer, wherein the first timer is used to detect the loss of received data packets or to detect whether the received data packets are out of order.

[0317] The method for processing data packets provided by the present application, when the PDCP entity is reestablished or data is restored, if the first timer is running, the first timer is stopped and reset (or reset to zero), or only the first timer is stopped, to avoid packet loss due to timer timeout during PDCP reestablishment. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0318] Optionally, as an embodiment, the method also includes: the receiving device sets the value of the first variable to the value of the second variable, the first variable indicating the count value or sequence number of the next data packet that the receiving device expects to receive, the second variable indicating the count value or sequence number of the first data packet that is still waiting and has not been delivered to the upper layer, or the second variable indicating the count value or sequence number of the most recent data packet delivered to the upper layer plus one.

[0319] Optionally, as an embodiment: before the PDCP entity is rebuilt or before data is recovered, the PDCP entity uses a reordering function, and after the PDCP entity is rebuilt or after data is recovered, when the PDCP connects two radio link control RLC entities in confirmation mode AM, the terminal device stops and resets the first timer or only stops the first timer.

[0320] Optionally, as an embodiment, the first timer is a reordering timer.

[0321] It should be understood that the corresponding steps in this method are similar to the corresponding steps in the above-mentioned methods 200 to 600, and for the sake of brevity, they are not repeated here.

[0322] It should also be understood that in various embodiments of the present application, all conditions regarding RX_NEXT>RX_DELIV can be replaced by the condition of "at least one stored PDCP SDU". That is, when there is at least one stored PDCP SDU, the condition of RX_NEXT>RX_DELIV is satisfied.

[0323] It should also be understood that in various embodiments of the present application, the first variable, the second variable, the third variable, the fourth variable, the fifth variable, and the sixth variable can be represented by the count value (COUNT) of the data packet, or by the sequence number (sequence number) of the data packet. For example, the first variable can be the sequence number of the next data packet that the receiving device expects to receive (which can be represented by Next_PDCP_RX_SN); the second variable can be the sequence number of the most recent data packet submitted to the upper layer (which can be represented by Last_Submitted_PDCP_RX_SN) plus one; the third variable can be the sequence number of the received data packet, etc. For example, after the PDCP is reestablished, stopping and resetting the first timer, and setting the value of the first variable to the value of the second variable can be: setting Next_PDCP_RX_SN to Last_Submitted_PDCP_RX_SN.

[0324] It should also be understood that in various embodiments of the present application, when reconstruction occurs when PDCP uses the reordering function, and the PDCP entity connects two RLC AM entities after reconstruction, the terminal device stops and resets the first timer, and sets Next_PDCP_RX_SN to Last_Submitted_PDCP_RX_SN.

[0325] It should also be understood that the above is to help those skilled in the art better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples given, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0326] It should also be understood that the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0327] Combination of the above Figures 1 to 14 , describes in detail the method for processing data packets in the embodiment of the present application, and will now be combined with Figures 15 to 26 , describes in detail the receiving device of an embodiment of the present application.

[0328] Fig.15 is a schematic block diagram of a receiving device of an embodiment of the present application. It should be understood that the receiving device may refer to the above-mentioned receiving device, the receiving device embodiment and the method embodiment correspond to each other, and similar descriptions may refer to the method embodiment. Fig.15 The receiving device 800 shown can be used to perform the corresponding Figure 6 and Figure 8 The receiving device 800 includes: a processor 810, a memory 820 and a transceiver 830, wherein the processor 810, the memory 820 and the transceiver 830 are connected by communication, the memory 820 stores instructions, the processor 810 is used to execute the instructions stored in the memory 820, and the transceiver 830 is used to perform specific signal transmission and reception under the drive of the processor 810.

[0329] The processor 810 is configured to stop and reset a first timer, or only stop the first timer, when a packet data convergence protocol PDCP entity is reestablished or data is recovered, wherein the first timer is used to detect loss of received data packets or to detect whether received data packets are out of order;

[0330] The processor 810 is also used to: set the value of the first variable to the value of the second variable, the first variable indicating the count value of the next data packet that the receiving device expects to receive, and the second variable indicating the count value of the first data packet that is still waiting and has not been delivered to the upper layer.

[0331] The receiving device provided by the present application, when the PDCP entity is rebuilt or the data is restored, if the first timer is running, the first timer is stopped and reset (or reset to zero), or only the first timer is stopped, and the value of the first variable is set to the value of the second variable. Alternatively, when the PDCP entity is rebuilt or the data is restored, if the first timer is running, the first timer is stopped and reset, or only the first timer is stopped, and the value of the first variable is set to the value of the second variable when the PDCP entity is rebuilt or the data is restored. In this way, after the reconstruction or data recovery, the start time of the first timer is delayed, and the packet loss problem caused by the premature start of the first timer is avoided. At the same time, packet loss during the PDCP entity reconstruction or data recovery is avoided, that is, the packet loss problem of data packets that are not sent after reconstruction is avoided. The accuracy of data transmission and the efficiency of data transmission are improved, and the user experience is improved.

[0332] The various components in the receiving device 800 are connected by communication, that is, the processor 810, the memory 820 and the transceiver 830 communicate with each other through the internal connection path to transmit control and / or data signals. The above method embodiments of the present application can be applied to the processor, or the steps of the above method embodiments are implemented by the processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method embodiments can be completed by hardware integrated logic circuits in the processor or software instructions. The above processor can be a central processing unit (CPU), a network processor (NP) or a combination of CPU and NP, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in this application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0333] Optionally, in another embodiment of the present application, the transceiver 830 is used to receive data packets; the processor 810 is also used to: when the value of the third variable is greater than or equal to the value of the first variable, update the value of the first variable to the value of a fourth variable, wherein the third variable indicates a count value of data packets received by the receiving device, the fourth variable indicates a count value that is greater than the value of the third variable and is the first unreceived data packet, or the fourth variable indicates a count value of data packets received by the PDCP entity, starting from the value of the third variable, continuously and adding one to the largest count value.

[0334] Optionally, in another embodiment of the present application, the processor 810 is also used to: if the receiving device is configured by an upper layer to send a PDCP status report, generate a bit map in the PDCP status report before the processor sets the value of the first variable to the value of the second variable; or, if the receiving device is configured by an upper layer to send a PDCP status report, generate a bit map in the PDCP status report based on the value of the first variable and the value of the second variable before the PDCP entity is reconstructed or before data is recovered.

[0335] Optionally, in another embodiment of the present application, the processor 810 is also used to: when the PDCP entity is rebuilt or data is restored, set the value of the fifth variable to the value of the second variable when the first timer is stopped and reset, or set the value of the fifth variable to the value of the second variable when the first timer is stopped, or set it to the value of the first variable when the first timer is stopped and reset, or set it to the value of the first variable when the first timer is stopped, or set it to the initial value of the fifth variable, or remain unchanged, wherein the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0336] Optionally, in another embodiment of the present application, the first timer is a reordering timer.

[0337] It should be noted that in the embodiment of the present application, the processor 810 may be implemented by a processing module, the memory 820 may be implemented by a storage module, and the transceiver 830 may be implemented by a transceiver module, such as Fig.16 As shown, the receiving device 900 may include a processing module 910 , a storage module 920 and a transceiver module 930 .

[0338] Fig.15 The receiving device 800 shown or Fig.16 The receiving device 900 shown can implement the aforementioned Figure 5 and Figure 6 The steps performed by the receiving device in the embodiment are not repeated here to avoid repetition.

[0339] Fig.17 FIG. 1 is a schematic block diagram of a receiving device 1000 according to an embodiment of the present application. It should be understood that the receiving device embodiment and the method embodiment correspond to each other, and similar descriptions can refer to the method embodiment, such as Fig.17 As shown, the receiving device 1000 includes: a processor 1010, a memory 1020 and a transceiver 1030. The processor 1010, the memory 1020 and the transceiver 1030 are connected via communication. The memory 1020 stores instructions. The processor 1010 is used to execute the instructions stored in the memory 1020. The transceiver 1030 is used to perform specific signal transmission and reception under the drive of the processor 1010.

[0340] The transceiver 1030 is used to receive data packets;

[0341] The processor 1010 is used to update the value of the first variable to the value of a fourth variable when the value of the third variable is greater than or equal to the value of the first variable, wherein the first variable indicates the count value of the next data packet that the receiving device expects to receive, the third variable indicates the count value of the data packet received by the receiving device, and the fourth variable indicates the count value of the first data packet that is greater than the value of the third variable and is not received, or the fourth variable indicates the count value of the data packets received by the receiving device, starting from the value of the third variable, continuously and adding one to the largest count value.

[0342] The receiving device provided by the present application can update the value of the first variable according to the data packet actually received by the receiving device, so that the first variable is more consistent with its physical definition, that is, the first variable is updated to the count value of the next data packet that the receiving device expects to receive. At the same time, the accuracy and efficiency of data packet transmission and delivery are improved, and the user experience is improved.

[0343] The various components in the receiving device 1000 are connected by communication, that is, the processor 1010, the memory 1020 and the transceiver 1030 communicate with each other through the internal connection path to transmit control and / or data signals. The above method embodiment of the present application can be applied to the processor, or the steps of the above method embodiment can be implemented by the processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method embodiment can be completed by the hardware integrated logic circuit in the processor or the instructions in the form of software. The above processor can be a CPU, a network processor NP or a combination of CPU and NP, a DSP, an ASIC, an FPGA or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The methods, steps and logic block diagrams disclosed in this application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the present application can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0344] Optionally, in another embodiment of the present application, the processor 1010 is further configured to:

[0345] When the first timer is not running and the value of the second variable is less than the value of the first variable, the value of the fifth variable is updated to the value of the first variable, wherein the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order, the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer, and the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0346] Optionally, in another embodiment of the present application, the processor 1010 is also used to: if the receiving device is configured by an upper layer to send a PDCP status report, generate a bit map in the PDCP status report before the processor sets the value of the first variable to the value of the second variable; or, if the receiving device is configured by an upper layer to send a PDCP status report, generate a bit map in the PDCP status report based on the value of the first variable and the value of the second variable before the PDCP entity is reconstructed or before data is recovered.

[0347] Optionally, in another embodiment of the present application, the processor 1010 is further configured to:

[0348] When a Packet Data Convergence Protocol (PDCP) entity is reestablished or data is restored, the first timer is stopped and reset, or only the first timer is stopped, the first timer is used to detect the loss of received data packets, or is used to detect whether the received data packets are out of order; the value of the first variable is set to the value of the second variable, the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer.

[0349] Optionally, in another embodiment of the present application, the first timer is a reordering timer.

[0350] It should be noted that in the embodiment of the present application, the processor 1010 may be implemented by a processing module, the memory 1020 may be implemented by a storage module, and the transceiver 1030 may be implemented by a transceiver module, such as Fig.18 As shown, the receiving device 1100 may include a processing module 1110 , a storage module 1120 and a transceiver module 1130 .

[0351] Fig.17 The receiving device 1000 or Fig.18 The receiving device 1100 shown can implement the aforementioned Figure 7 and Figure 8 The steps performed by the receiving device in the embodiment are not repeated here to avoid repetition.

[0352] Fig.19FIG. 1 is a schematic block diagram of a receiving device 1200 according to an embodiment of the present application. It should be understood that the receiving device embodiment and the method embodiment correspond to each other, and similar descriptions can refer to the method embodiment, such as Fig.19 As shown, the receiving device 1200 includes: a processor 1210, a memory 1220 and a transceiver 1230. The processor 1210, the memory 1220 and the transceiver 1230 are connected via communication. The memory 1220 stores instructions. The processor 1210 is used to execute the instructions stored in the memory 1220. The transceiver 1230 is used to perform specific signal transmission and reception under the drive of the processor 1210.

[0353] The transceiver 1230 is used to receive data packets;

[0354] The processor 1210 is configured to, when the first timer is not running due to the reestablishment or data recovery of a packet data convergence protocol PDCP entity, the value of the second variable is less than the value of the first variable, and the value of the first variable is different from the value of the first variable before the PDCP entity is reestablished or before the data is recovered, the receiving device starts the first timer;

[0355] Alternatively, when the first timer is not running due to reconstruction of the Packet Data Convergence Protocol PDCP entity or data recovery, and the value of the second variable is less than the value of the first variable, the receiving device starts the first timer; wherein the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order, the first variable indicates the count value of the next data packet that the receiving device expects to receive, and the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer.

[0356] The receiving device provided by the present application delays the start time of the first timer by changing the start condition of the first timer, thereby avoiding the packet loss problem caused by the premature start of the first timer. At the same time, the packet loss problem of data packets caused by the reconstruction of the PDCP entity or data recovery can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0357] The various components in the receiving device 1200 are connected by communication, that is, the processor 1210, the memory 1220 and the transceiver 1230 communicate with each other through the internal connection path to transmit control and / or data signals. The above method embodiment of the present application can be applied to the processor, or the steps of the above method embodiment can be implemented by the processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a CPU, a network processor NP or a combination of CPU and NP, a DSP, an ASIC, an FPGA or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The methods, steps and logic block diagrams disclosed in this application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the present application can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0358] Optionally, in another embodiment of the present application, the processor 1210 is further used to: when the PDCP entity is reconstructed or data is restored, if the first timer is running, stop and reset the first timer, or only stop the first timer.

[0359] Optionally, in another embodiment of the present application, the first timer is a reordering timer.

[0360] It should be noted that in the embodiment of the present application, the processor 1210 may be implemented by a processing module, the memory 1220 may be implemented by a storage module, and the transceiver 1230 may be implemented by a transceiver module, such as Fig. 20 As shown, the receiving device 1300 may include a processing module 1310 , a storage module 1320 and a transceiver module 1330 .

[0361] Fig.19 The receiving device 1200 shown or Fig. 20 The receiving device 1300 shown can implement the aforementioned Fig. 9 The steps performed by the receiving device in the embodiment are not repeated here to avoid repetition.

[0362] Fig.21FIG. 1 is a schematic block diagram of a receiving device 1400 according to an embodiment of the present application. It should be understood that the receiving device embodiment and the method embodiment correspond to each other, and similar descriptions can refer to the method embodiment, such as Fig.21 As shown, the receiving device 1400 includes: a processor 1410, a memory 1420 and a transceiver 1430. The processor 1410, the memory 1420 and the transceiver 1430 are connected via communication. The memory 1420 stores instructions. The processor 1410 is used to execute the instructions stored in the memory 1420. The transceiver 1430 is used to perform specific signal transmission and reception under the drive of the processor 1410.

[0363] The transceiver 1430 is used to receive data packets;

[0364] The processor 1410 is used to start the first timer when the first timer is not running, the value of the second variable is less than the value of the first variable, and the value of the first variable is equal to the value of the third variable plus one, wherein the first variable indicates the count value of the next data packet that the receiving device expects to receive, the second variable indicates the count value of the first data packet that is still waiting and has not been delivered to the upper layer, and the third variable indicates the count value of the data packets received by the receiving device, and the first timer is used to detect the loss of received data packets, or to detect whether the received data packets are out of order.

[0365] The receiving device provided by the present application delays the start time of the first timer by changing the start condition of the first timer after receiving the data packet, thereby avoiding the packet loss problem caused by the early start of the first timer. At the same time, the packet loss problem caused by the reconstruction of the PDCP entity or data recovery can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0366] The various components in the receiving device 1400 are connected by communication, that is, the processor 1410, the memory 1420 and the transceiver 1430 communicate with each other through the internal connection path to transmit control and / or data signals. The above method embodiment of the present application can be applied to the processor, or the steps of the above method embodiment can be implemented by the processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a CPU, a network processor NP or a combination of CPU and NP, a DSP, an ASIC, an FPGA or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The methods, steps and logic block diagrams disclosed in this application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the present application can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0367] Optionally, in another embodiment of the present application, the processor 1410 is also used to: when the first timer is not running, the value of the second variable is less than the value of the first variable, and the value of the first variable is equal to the value of the third variable plus one, update the value of the fifth variable to the value of the first variable, and the fifth variable indicates the count value of the data packet when the first timer is triggered to start.

[0368] Optionally, in another embodiment of the present application, the processor 1410 is also used to: when the Packet Data Convergence Protocol PDCP entity is reestablished or data is restored, if the first timer is running, stop and reset the first timer, or only stop the first timer.

[0369] Optionally, in another embodiment of the present application, the first timer is a reordering timer.

[0370] It should be noted that in the embodiment of the present application, the processor 1410 may be implemented by a processing module, the memory 1420 may be implemented by a storage module, and the transceiver 1430 may be implemented by a transceiver module, such as Fig. 22 As shown, the receiving device 1500 may include a processing module 1510 , a storage module 1520 and a transceiver module 1530 .

[0371] Fig.21 The receiving device 1400 shown or Fig. 22 The receiving device 1500 shown can implement the aforementioned Fig.10 The steps performed by the receiving device in the embodiment are not repeated here to avoid repetition.

[0372] Fig.23 FIG. 1 is a schematic block diagram of a receiving device 1600 according to an embodiment of the present application. It should be understood that the receiving device embodiment corresponds to the method embodiment, and similar descriptions can refer to the method embodiment, such as Fig.23 As shown, the receiving device 1600 includes: a processor 1610, a memory 1620 and a transceiver 1630. The processor 1610, the memory 1620 and the transceiver 1630 are connected via communication. The memory 1620 stores instructions. The processor 1610 is used to execute the instructions stored in the memory 1620. The transceiver 1630 is used to perform specific signal transmission and reception under the drive of the processor 1610.

[0373] The processor 1610 is configured to stop and reset a first timer, or only stop the first timer, when a packet data convergence protocol PDCP entity is reestablished or data is recovered, where the first timer is used to detect loss of received data packets or to detect whether received data packets are out of order;

[0374] The processor 1610 is also used to: set the value of the sixth variable to the value of the second variable, the sixth variable is used to indicate the maximum count value in the data packets received by the receiving device after the PDCP entity is rebuilt or the data is recovered plus one, or the sixth variable is used to indicate a count value that is greater than the maximum count value in the data packets received by the receiving device after the PDCP entity is rebuilt or the data is recovered and is the first data packet not delivered to the upper layer, and the second variable indicates the count value of the first data packet that is still waiting and not delivered to the upper layer.

[0375] The receiving device provided in the present application stops and resets (returns to zero) the first timer when the PDCP entity is rebuilt or the data is restored, or only stops the first timer, and introduces a new variable (sixth variable), and sets the value of the sixth variable to the value of the second variable. After the PDCP entity is rebuilt or the data is restored, the sixth variable is used to replace the function of the first variable, that is, the data packet is delivered according to the sixth variable, the second variable and the first timer. After reconstruction or data recovery, the first timer is prevented from being turned on when no out-of-order packets are received, and the packet loss problem caused by the premature activation of the first timer is avoided. At the same time, packet loss during PDCP entity reconstruction or data recovery is avoided, that is, the packet loss problem of data packets not sent after reconstruction can be avoided. The accuracy and efficiency of data transmission are improved, and the user experience is improved.

[0376] The various components in the receiving device 1600 are connected by communication, that is, the processor 1610, the memory 1620 and the transceiver 1630 communicate with each other through the internal connection path to transmit control and / or data signals. The above method embodiment of the present application can be applied to the processor, or the steps of the above method embodiment can be implemented by the processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a CPU, a network processor NP or a combination of CPU and NP, a DSP, an ASIC, an FPGA or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The methods, steps and logic block diagrams disclosed in this application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the present application can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0377] Optionally, in another embodiment of the present application, the transceiver 1630 is used for the receiving device to receive data packets; the processor 1610 is also used to: when the value of the sixth variable is less than or equal to the value of the first variable, or the value of the sixth variable is less than or equal to the value of the first variable plus the offset value, and when the value of the third variable is greater than or equal to the value of the sixth variable, update the value of the sixth variable to the value of the fourth variable, wherein the first variable indicates the count value of the next data packet that the receiving device expects to receive, the third variable indicates the count value of the data packet received by the receiving device, the fourth variable indicates the value of the third variable plus one, or the fourth variable indicates a count value that is greater than the value of the third variable and is the first data packet that has not been received, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and adding one to the largest count value.

[0378] Optionally, in another embodiment of the present application, the processor 1610 is further configured to: when the value of the sixth variable is greater than the value of the first variable, or the value of the sixth variable is greater than the value of the first variable plus the offset value, and when the value of the third variable is greater than or equal to the value of the first variable, update the value of the first variable to the value of the fourth variable, wherein the first variable indicates the count value of the next data packet that the receiving device expects to receive, the third variable indicates the count value of the data packet received by the receiving device, the fourth variable indicates the value of the third variable plus one, or the fourth variable indicates the count value of the first data packet that is greater than the value of the third variable and is not received, or the fourth variable indicates the count value of the data packets received by the PDCP entity, starting from the value of the third variable, continuously and adding one to the largest count value.

[0379] Optionally, in another embodiment of the present application, the first timer is a reordering timer.

[0380] Optionally, in another embodiment of the present application, the bias value is zero or a positive value.

[0381] It should be noted that in the embodiment of the present application, the processor 1610 may be implemented by a processing module, the memory 1620 may be implemented by a storage module, and the transceiver 1630 may be implemented by a transceiver module, such as Fig.23 As shown, the receiving device 1700 may include a processing module 1710 , a storage module 1720 and a transceiver module 1730 .

[0382] Fig.23 The receiving device 1600 shown or Fig.24 The receiving device 1700 shown can implement the aforementioned Figures 11 to 13 The steps performed by the receiving device in the embodiment are not repeated here to avoid repetition.

[0383] Fig.25 1 is a schematic block diagram of a receiving device according to an embodiment of the present application. It should be understood that the receiving device embodiment corresponds to the method embodiment, and similar descriptions can refer to the method embodiment. Fig.25 The receiving device 1800 shown can be used to perform the corresponding Fig.14 The receiving device 1800 includes: a processor 1810, a memory 1820 and a transceiver 1830, wherein the processor 1810, the memory 1820 and the transceiver 1830 are connected via communication, the memory 1820 stores instructions, the processor 1810 is used to execute the instructions stored in the memory 1820, and the transceiver 1830 is used to perform specific signal transmission and reception under the drive of the processor 1810.

[0384] Processor 1810 is used to stop and reset the first timer or only stop the first timer if the first timer is running when the packet data convergence protocol PDCP entity is reestablished or data is restored. The first timer is used to detect the loss of received data packets or to detect whether the received data packets are out of order.

[0385] The receiving device provided by the present application stops and resets (or returns to zero) the first timer when the PDCP entity is reestablished or data is restored, or only stops the first timer, to avoid packet loss due to timer timeout during PDCP reestablishment, thereby improving the accuracy and efficiency of data transmission and user experience.

[0386] Optionally, in another embodiment of the present application, the processor 1810 is further used to set the value of the first variable to the value of the second variable, wherein the first variable indicates the count value or sequence number of the next data packet that the receiving device expects to receive, and the second variable indicates the count value or sequence number of the first data packet that is still waiting and has not been delivered to the upper layer, or the second variable indicates the count value or sequence number of the most recent data packet delivered to the upper layer plus one.

[0387] Optionally, in another embodiment of the present application, the processor 1810 is also used for: before the PDCP entity is rebuilt or before data is recovered, the PDCP entity uses a reordering function; after the PDCP entity is rebuilt or after data is recovered, the PDCP connects two radio link control RLC entities in confirmation mode AM.

[0388] It should be noted that in the embodiment of the present application, the processor 1810 may be implemented by a processing module, the memory 1820 may be implemented by a storage module, and the transceiver 1830 may be implemented by a transceiver module, such as Fig.26 As shown, the receiving device 1900 may include a processing module 1910 , a storage module 1920 and a transceiver module 1930 .

[0389] Fig.25 The receiving device 1800 shown or Fig.26 The receiving device 1900 shown can implement the aforementioned Fig.14 The steps performed by the receiving device in the embodiment are not repeated here to avoid repetition.

[0390] The present application also provides a computer-readable medium for storing computer program code, the computer program including a computer program for executing the above Figures 5 to 14The readable medium may be a read-only memory (ROM) or a random access memory (RAM), which is not limited in the embodiment of the present application.

[0391] The embodiment of the present application further provides a system chip, which includes: a processing unit and a communication unit, wherein the processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit, etc. The processing unit may execute computer instructions to enable the chip in the terminal to execute the method for processing a data packet according to any one of the first aspects above.

[0392] Optionally, the computer instructions are stored in a storage unit.

[0393] Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the terminal, such as a ROM or other types of static storage devices that can store static information and instructions, RAM, etc. The processor mentioned in any of the above may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of a program of the above-mentioned first direct link data transmission method.

[0394] It should be understood that the above description of the embodiments of the present application focuses on emphasizing the differences between the various embodiments. The same or similar points that are not mentioned can be referenced to each other. For the sake of brevity, they will not be repeated here.

[0395] It should also be understood that the terms "and / or" and "at least one of A or B" in this document are merely a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects before and after are in an "or" relationship.

[0396] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0397] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0398] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0399] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0400] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0401] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0402] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for processing a data packet, characterized in that: include: The receiving device stops a first timer or stops and resets a first timer when a data radio bearer DRB packet data convergence protocol PDCP entity in confirmation mode AM is reestablished, wherein the first timer is used to detect loss of received data packets or to detect whether received data packets are out of order; If the first timer is not in a running state, determining whether a value of a second variable is less than a value of the first variable, the first variable indicating a count value of a next data packet that the receiving device expects to receive, and the second variable indicating a count value of a first data packet that is still waiting and has not been delivered to an upper layer; If the value of the second variable is less than the value of the first variable, the first timer is started and the value of the third variable is updated to the value of the first variable, and the third variable indicates the value of the first variable when the first timer is started.

2. The method according to claim 1, characterized in that After starting the first timer, the method further includes: If the first timer times out, then among all the stored data packets, the data packets whose sequence numbers are before the value of the third variable and the data packets starting from the value of the third variable and whose sequence numbers are continuous are delivered to the upper layer; or, If the first timer is in a running state and the value of the second variable is greater than or equal to the value of the third variable, the first timer is stopped and reset.

3. The method according to claim 1 or 2, characterized in that The DRB Packet Data Convergence Protocol (PDCP) entity reconstruction of the AM of the receiving device includes: the receiving device switches from a source base station to a target base station.

4. The method according to claim 1, characterized in that: The method further comprises: Determine the sequence number of the data packet according to the SN number and the HFN number of the data packet; Compare the value of the second variable and the size of the sequence number of the data packet to determine whether the data packet is valid.

5. The method according to claim 1, characterized in that: The method further comprises: If the sequence number of the data packet is greater than or equal to the value of the first variable, then the value of the first variable is updated to the sequence number of the data packet plus 1; or, If the sequence number of the data packet is equal to the value of the second variable, then among all stored data packets, the data packets whose sequence numbers start from the value of the second variable and whose sequence numbers are continuous are delivered to the upper layer, and the value of the second variable is updated to the sequence number of the first undelivered data packet.

6. A receiving device, characterized in that: include: The method comprises a processor and a memory, wherein the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory, so that the receiving device executes the method according to any one of claims 1 to 5.

7. A computer-readable storage medium for storing a computer program, characterized in that: The computer program is used to execute instructions of the method for processing a data packet according to any one of claims 1 to 5.

8. A system chip, characterized in that: The system chip comprises a processing unit and a communication unit, wherein the processing unit can execute computer instructions so as to enable the system chip to execute the method for processing data packets according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for reconfiguring a PDCP reordering timer in a wireless communication system and device therefor

    US20160183221A1