PDCP (Packet Data Convergence Protocol) layer cache data processing method
By constructing a cache linked list and an index tag linked list, combined with a fast lookup threshold, the problem of excessively long insertion time in the PDCP layer cache data processing was solved, realizing fast insertion position location and sequential delivery, thus improving data transmission efficiency and memory utilization.
Patent Information
- Application Number
- CN202511124273.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-14
AI Technical Summary
In the 5G protocol, during the cached data processing of the PDCP layer, there is a problem of excessive insertion time during high-speed data transmission, especially when adding elements to the linked list, the search time is too long, resulting in excessive CPU processing time and serious waste of allocated fixed memory space.
By constructing a cached linked list, an indexed tag linked list, and a set of linked list parameters, and by using a fast lookup threshold to determine whether to use a fast lookup method or a regular lookup method, the insertion position of a linked list element is quickly located. This includes creating a cached linked list, an indexed tag linked list, and a set of linked list parameters, and using the indexed tag linked list to record the location of packet loss, thus achieving fast insertion and in-order delivery.
In high-speed data transmission, it can quickly locate the insertion position of data in the ordered cache queue, reduce CPU processing time, save memory space, and improve transmission efficiency.
Smart Images

Figure CN120957193A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile communication technology, and more specifically to a PDCP layer cache data processing method. Background Technology
[0002] The Packet Data Convergence Protocol (PDCP) layer is an important component of the air interface protocol stack. In the 5G standard, the PDCP layer sits above the RLC layer and below the SDAP layer (user plane) or the RRC layer (control plane). The functions of the PDCP layer are implemented by PDCP entities, primarily responsible for functions such as IP header compression / decompression, data encryption / decryption, data integrity protection, timer-based SDU discarding, reordering and in-order delivery, out-of-order delivery, discarding duplicate packets, PDCP re-establishment, and data recovery for RLC acknowledgment modes.
[0003] A PDCP entity consists of a sender and a receiver. After receiving a PDCP SDU from the upper layer, the sender places the SDU in a transmission buffer and starts a discard timer associated with that SDU, waiting for the lower layer to schedule its transmission. The receiver maintains the following state variables and constants:
[0004] RX_NEXT: This status variable indicates the COUNT value of the next PDCP SDU expected to be received, and its initial value is 0.
[0005] RX_DELIV: This state variable indicates the COUNT value of the first PDCP SDU that has not yet been delivered to the upper layer and is still waiting. Its initial value is 0. The PDCP receiving entity considers that PDCP SDUs with a COUNT less than RX_DELIV have been successfully received and delivered to the upper layer. RX_DELIV corresponds to the PDCP SDU with the smallest COUNT that has not yet been received within the reordering window.
[0006] RX_REORD: This status variable indicates the next COUNT value for the PDCP data PDU that triggered t-Reordering. When t-Reordering is started (and RX_REORD is updated at the same time), it means that there are PDC PDUs smaller than RX_REORD that have not yet been received. At this time, it is necessary to wait for these PDCP SDUs to be reordered.
[0007] Window_Size: This constant indicates the size of the reordered window, and its value is equal to 2. [SN-Size]-1 .
[0008] The receiving end processing flow is roughly as follows: When a PDCP data PDU is received from a lower layer, the PDCP receiving entity should determine its COUNT value, i.e., RCVD_COUNT:
[0009] If RCVD_SN <SN(RX_DELIV)–Window_Size,
[0010] Then RCVD_HFN=HFN(RX_DELIV)+1;
[0011] Otherwise, if RCVD_SN >= SN(RX_DELIV) + Window_Size,
[0012] Then RCVD_HFN=HFN(RX_DELIV)–1;
[0013] Otherwise, RCVD_HFN = HFN(RX_DELIV).
[0014] Finally, we get RCVD_COUNT = [RCVD_HFN, RCVD_SN].
[0015] The relevant variables are defined as follows: HFN represents the HFN part of the state variable (the number of most significant bits is equal to the HFN length); SN represents the SN part of the state variable (the number of least significant bits is equal to the PDCP SN length); RCVD_SN represents the PDCP SN of the received PDCP data PDU, which is included in the PDU header; RCVD_HFN represents the HFN of the received PDCP data PDU, which is calculated by the PDCP receiving entity; RCVD_COUNT is the COUNT of the received PDCP data PDU, and its value is [RCVD_HFN, RCVD_SN].
[0016] After determining the COUNT value of the received PDCP data PDU, the PDCP receiving entity performs integrity verification and decryption on the PDCP PDU. If the integrity verification fails, it indicates the failure of integrity verification to the upper layer and discards the PDCP PDU. If RCVD_COUNT < RX_DELIV, or if a PDCP PDU with COUNT = RCVD_COUNT has been received before, the PDCP PDU is discarded. If the received PDCP PDU is not discarded, the PDCP receiving entity stores the final PDCP SDU in the receive buffer. If RCVD_COUNT >= RX_NEXT, RX_NEXT is updated to RCVD_COUNT + 1. If out-of-order delivery is supported, the obtained PDCP SDU is delivered to the upper layer. If RCVD_COUNT = RX_DELIV, all stored PDCP SDUs associated with consecutive COUNT values starting from RX_DELIV are delivered to the upper layer in ascending order of the COUNT value, and RX_DELIV is updated to the COUNT value of the first PDCP SDU that has not been delivered to the upper layer and has a COUNT value greater than RX_DELIV. If t-Reordering is running, and if RX_DELIV >= RX_REORD, stop and reset t-Reordering; if t-Reordering is not running (including the case where t-Reordering is stopped due to the above behavior), and RX_DELIV < RX_NEXT, update RX_REORD to RX_NEXT and start t-Reordering.
[0017] As mentioned above, in the 5G protocol, if the configuration does not support out-of-order delivery, the PDCP layer is responsible for delivering the received data to the higher layers in order. When packet loss occurs in the link, the PDCP layer must buffer the received PDUs that do not meet the discard conditions until a PDU with COUNT = RX_DELIV is received, or the t-Reordering timeout occurs, before reporting the data and clearing the corresponding buffer. During high-speed data transmission, due to packet loss and out-of-order delivery in air interface transmission, the amount of buffered data will increase rapidly. Moreover, because the configuration requires delivery in order, the received buffer is generally arranged in order in implementation. For example, the most common method is to use a linked list for storage. When inserting an element, the corresponding position is found according to the COUNT value of the PDU. The problem with this method is that as the number of linked list elements increases, the search time will become longer and longer, which will greatly consume CPU processing time. When the CPU performance is insufficient, it will lead to problems such as abnormal system operation and low transmission rate. In addition, some implementations trade space for time, allocating a fixed amount of memory space to store received data and storing it in the appropriate position according to the data's serial number (SN). The drawback of this method is its excessive memory consumption; when the SN length is 18, it requires a fixed storage space of 131,072 PDUs, which is clearly wasteful. To address this problem, this invention proposes a method for quickly locating the insertion position of a linked list element by constructing an insertion position index tag linked list.
[0018] In the design of the 5G standard, RLC, MAC, and physical layer all ensure the reliability of transmission, including the acknowledgment mode of the RLC layer, the HARQ function of the MAC / physical layer, the source coding of the physical layer, etc., and there are performance requirements for the transmission of the physical layer. Considering these factors and actual test cases, the probability of packet loss at the PDCP layer is relatively low. This invention utilizes this characteristic to quickly locate the insertion position by recording the location of packet loss in a set. Summary of the Invention
[0019] To address the problem of excessive time consumption in inserting the buffer queue at the PDCP entity receiver during high-speed data transmission, this invention proposes a PDCP layer buffer data processing method.
[0020] The present invention adopts the following technical solution:
[0021] 1. A method for processing cached data at a PDCP layer, characterized by comprising the following steps:
[0022] (1) Create a cache linked list, an index tag linked list, and a linked list parameter set. After receiving data reported by the RLC layer, the linked list insertion position lookup method to be used is determined based on the proportion of actual elements in the linked list parameter set and the fast lookup threshold.
[0023] (2) After receiving the data reported by the RLC layer, if the actual number of elements is lower than the fast lookup threshold, the PDCP entity uses the fast lookup method described in this invention. Otherwise, the conventional lookup method is used.
[0024] (3) Perform post-insertion processing, including sequential delivery, updating the cache list and index tag list, and updating the list parameter set.
[0025] 2. The PDCP layer cache data processing method according to claim 1, characterized in that step (1) specifically includes the following process:
[0026] During the initialization phase, a receive buffer linked list is created for the PDCP entity, along with an index tag linked list and a linked list parameter set.
[0027] The index tag linked list contains several tags used to record the location where packet loss occurred. Each tag records the position index of an element stored in the cache linked list and the COUNT value of the data in that element. These elements all have non-contiguous COUNT values with the preceding elements in the cache linked list.
[0028] The elements in the cache list and the tags in the index tag list are all ordered according to the COUNT value.
[0029] The linked list parameter set includes the actual number of elements in the cached linked list, the number of linked list elements assuming no packet loss, the ratio of actual elements, the threshold for starting fast lookup, and the number of tags in the index tag linked list, where:
[0030] Assuming no packet loss, the number of linked list elements = RX_NEXT - RX_DELIV;
[0031] The percentage of actual elements = (actual number of elements in the linked list / number of elements in the linked list assuming no packet loss) * 100%;
[0032] The fast lookup threshold is a pre-set percentage. When the proportion of actual elements is greater than the fast lookup threshold, the fast lookup method described in this invention is enabled for newly received RLC layer reported data; otherwise, the conventional lookup method is used.
[0033] 3. The PDCP layer cache data processing method according to claim 1, characterized in that step (2) specifically includes the following process:
[0034] First, compare the COUNT value of the new data with the COUNT value of the last element in the cache list. If the new data is greater than the COUNT value of the last element, insert the new data at the end of the list. Otherwise, traverse the index tag list, comparing the COUNT value of the new data with the COUNT value in the tag. If the new data is less than the COUNT value in the tag, define the tag as an anchor tag.
[0035] If the anchor label is the first label in the label list, compare the COUNT value of the new data with RX_DELIV. If they are equal, perform the in-order delivery operation according to the standard. If it is less than RX_DELIV, it is duplicate data and is discarded. Otherwise, insert the new data into the beginning of the cache list.
[0036] If the anchor tag is not the first tag in the tag chain, the COUNT value of the new data is compared with two values: the COUNT value in the anchor tag and the COUNT value of the element preceding the element in the cache chain marked by the anchor tag. If the COUNT value of the new data is less than the former but greater than the latter, the new data is inserted between these two elements; if the COUNT value of the new data is equal to the former or less than or equal to the latter, it is a duplicate packet and is discarded; if the COUNT value of the new data is greater than the former, the next tag in the tag chain is used to continue the determination using this method.
[0037] 4. The PDCP layer cache data processing method according to claim 1, characterized in that step (3) specifically includes the following process:
[0038] Based on the insertion position of the new data and the comparison results with the COUNT values of elements before and after the insertion position, the relevant linked list and parameters are updated when the following situations occur.
[0039] A. New data is inserted at the beginning of the cache list: If the COUNT value of the new data is greater than RX_DELIV, insert the relevant information of this data at the beginning of the index tag list; if the COUNT value of the new data differs from the COUNT value of the following element by 1, delete the index tag corresponding to the following element from the tag list. If the COUNT value of the new data is equal to RX_DELIV, perform the delivery operation in order according to the standard; if the COUNT value of the new data is less than RX_DELIV, it is duplicate data and is discarded.
[0040] B. New data is inserted at the end of the cache list: If the COUNT value of the new data differs from the COUNT value of the preceding element by more than 1, then the relevant information of this data is inserted at the end of the index label list.
[0041] C. The new data is inserted between two elements x and y in the linked list: As described in section 3 above, the label corresponding to element y in the index label linked list is the anchor label. If the COUNT value of the new data differs from the COUNT value of element x by more than 1, the index label corresponding to the new data element is inserted before the anchor label in the label linked list; if the COUNT value of the new data differs from the COUNT value of element y by 1, the anchor label corresponding to element y is deleted from the label linked list.
[0042] D. After inserting an element into the cache list or performing an order delivery operation, update the actual number of elements and the proportion of actual elements in the list parameter set; after inserting or deleting a tag in the index tag list, update the number of tags in the list parameter set.
[0043] The advantage of this invention is that, during high-speed data transmission, the PDCP layer can process the received data more quickly and locate the insertion position of the received data in the ordered buffer queue more quickly. Attached Figure Description
[0044] Figure 1 This is a schematic diagram of the device structure of the present invention;
[0045] Figure 2 This is a flowchart of the cached data processing method described in this invention;
[0046] Figure 3 This is an example of the fast insertion position search method described in this invention; Detailed Implementation
[0047] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are only for illustrating the present invention and are not intended to limit the scope of the present invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.
[0048] Figure 1 The diagram shows a schematic of the device related to cached data processing in this invention. ① Part ① is a data cache linked list used to store business data reported by the RLC layer. Each linked list element consists of a pointer to the preceding element, data content (including data address, COUNT value, and other data-related parameters), and a pointer to the following element. ② Part ② is an index tag linked list, which records the location information of all elements in the cache linked list that have experienced packet loss. Each index tag consists of a pointer to the preceding tag, tag content (including a pointer to the cache linked list element corresponding to that tag and the element's COUNT value), and a pointer to the following tag. ③ Part ③ is a linked list parameter set used to record some characteristics of the cache queue linked list and the index tag linked list, including the actual number of elements in the cache linked list, the number of linked list elements assuming no packet loss, the ratio of the actual number of elements, the threshold for initiating fast lookup, and the number of tags in the index tag linked list.
[0049] Figure 2The diagram shows a flowchart of the cached data processing method described in this invention. During the system initialization phase, a data cache linked list and an index tag linked list are created. A linked list parameter set is created and the parameters are initialized. The fast lookup threshold is a settable percentage, and the other parameters are initialized to 0. When a packet of data reported from the RLC layer is received, the lookup method is determined based on the ratio of the actual number of elements and the fast lookup threshold. If the ratio of the actual number of elements is greater than the fast lookup threshold, the fast lookup method described in this invention is used; otherwise, a conventional lookup method (such as sequential lookup, binary search, etc.) is used.
[0050] When the fast location method is selected, a high proportion of actual elements indicates good channel quality and minimal packet loss. In this case, it can be assumed that most received data is newly transmitted, with a small amount of retransmitted data. Therefore, the COUNT value of the new data is first compared with the COUNT value of the last element in the buffer list. If it is greater than the COUNT value of the last element, the new data is inserted at the end of the list. This step ensures that the insertion position of the newly transmitted data can be confirmed with only one comparison. After the buffer list is updated due to the insertion of new data, the index label list and its parameter set should be checked promptly to determine if updates are needed. The COUNT value of the newly inserted buffer list element is compared with the COUNT value of the preceding element. If the difference is 1, it indicates that the COUNT values of the newly inserted element and the preceding element are consecutive, and there is no packet loss between them; therefore, the index label list does not need to be updated. Otherwise, it indicates that there is packet loss between them, and the index label list should be updated by inserting a new label at the end to record the pointer and COUNT value information of the newly inserted element. Whenever a data packet is processed, if the length of the cache linked list or the length of the tag linked list changes, the relevant values in the linked list parameter set should be updated promptly.
[0051] If the condition for insertion at the end of the cache list is not met, the COUNT value of the new data needs to be compared sequentially with the COUNT values of the tags in the index tag list to determine the insertion position. First, it is compared with the COUNT value in the first tag; if they are equal, it is duplicate data and is discarded. If it is less than the COUNT value in the tag, it needs to be compared with RX_DELIV; if it is less than RX_DELIV, it is outside the receiving window and discarded; otherwise, the new data is inserted at the beginning of the cache list, and this tag is defined as the anchor tag. It is then checked whether the COUNT value of the new data is consecutive to the COUNT value in the anchor tag. If they are consecutive, this tag is deleted. Simultaneously, it is checked whether the in-order delivery condition is met, i.e., whether the COUNT value of the new data is equal to RX_DELIV. If they are equal, an in-order delivery operation should be performed, delivering consecutive elements in the cache list to the upper layer. Finally, the parameter set is updated. If the COUNT value of the new data is greater than the COUNT value in the tag, the next tag in the tag list is used for judgment.
[0052] The COUNT value of the new data is compared with the COUNT value of the next tag. If they are equal, it is a duplicate and is discarded. If the new data is greater than the COUNT value of the tag, the next tag in the tag list is used to continue the comparison. If the new data is less than the COUNT value of the tag, this tag is defined as an anchor tag. The corresponding element in the cache list can be found based on the element address in the tag. The element before this element can be found based on the pointer to the previous element. The COUNT value of the new data is compared with the COUNT value of the previous element again. If the new data is greater than the COUNT value of the previous element, it is inserted between the two elements; otherwise, it is a duplicate and is discarded. Since both the cache list and the index tag list are ordered, this operation ensures that the cache list remains ordered after insertion. Next, check if the tag list needs updating. Compare the COUNT value of the newly inserted element with the COUNT value of the preceding element. If the difference is 1, it means the new element's index is consecutive to the preceding element, indicating no packet loss, and therefore the index tag list does not need updating. Otherwise, it indicates packet loss, and the index tag list should be updated by inserting a new tag before the anchor tag to record the pointer and COUNT value information of the newly inserted element. Check if the COUNT value is consecutive to the anchor tag's value; if so, delete the anchor tag. Finally, update the relevant parameters in the parameter set.
[0053] Figure 3 This is a typical example of the fast insertion position lookup method and index tag linked list update method of the present invention. The initial state of the data cache linked list and the tag linked list is shown in Figure 301. The cache linked list already stores data with COUNT=3, COUNT=7, COUNT=8, COUNT=11, and COUNT=14. At this time, new data with COUNT=5, COUNT=9, and COUNT=13 are received in sequence. When the data with COUNT=5 is received, as mentioned above, tag b in the figure is the anchor tag. Based on the anchor tag, the position of the element with COUNT=7 and the preceding element with COUNT=3 in the cache linked list is obtained. The new data element with COUNT=5 is inserted between the two. The new element's COUNT value is not continuous with the preceding element in the cache linked list, so a new tag needs to be added. Based on the anchor tag, the new tag is inserted between tag a and tag b.
[0054] When data with COUNT=9 is received, label c is the anchor label. Based on the anchor label, the new data is inserted into the cache linked list between the element with COUNT=8 and the element with COUNT=11. Since the new data element has a continuous COUNT value with the previous element, there is no need to update the label linked list.
[0055] When data with COUNT=13 is received, label d is the anchor label. Based on the anchor label, the new data is inserted into the cache list between the elements with COUNT=11 and COUNT=14. Since the COUNT value of the new data element is not consecutive with the preceding element, a new label needs to be added. Based on the anchor label, the new label is inserted between label c and label d. However, since the COUNT value of the new data element is consecutive with the following elements, label d needs to be deleted.
[0056] After inserting and updating the data, the cache list and the index tag list are shown in Figure 302. It can be seen that the method of the present invention can quickly find the data insertion position and ensure the order of the cache list and the index tag list.
Claims
1. A method for processing cached data at a PDCP layer, characterized in that, Includes the following steps: (1) Create a cache linked list, an index tag linked list, and a linked list parameter set. After receiving data reported by the RLC layer, the linked list insertion position lookup method to be used is determined based on the proportion of actual elements in the linked list parameter set and the fast lookup threshold. (2) After receiving the data reported by the RLC layer, if the actual number of elements is lower than the fast lookup threshold, the PDCP entity uses the fast lookup method described in this invention. Otherwise, the conventional lookup method is used. (3) Perform post-insertion processing, including sequential delivery, updating the cache list and index tag list, and updating the list parameter set.
2. The PDCP layer cache data processing method according to claim 1, characterized in that, Step (1) specifically includes the following process: During the initialization phase, a receive buffer linked list is created for the PDCP entity, along with an index tag linked list and a linked list parameter set. The index tag linked list contains several tags used to record the location where packet loss occurred. Each tag records the position index of an element stored in the cache linked list and the COUNT value of the data in that element. These elements all have non-contiguous COUNT values with the preceding elements in the cache linked list. The elements in the cache list and the tags in the index tag list are all ordered according to the COUNT value. The linked list parameter set includes the actual number of elements in the cached linked list, the number of linked list elements assuming no packet loss, the ratio of actual elements, the threshold for starting fast lookup, and the number of tags in the index tag linked list, where: Assuming no packet loss, the number of linked list elements = RX_NEXT - RX_DELIV; The percentage of actual elements = (actual number of elements in the linked list / number of elements in the linked list assuming no packet loss) * 100%; The fast lookup threshold is a pre-set percentage. When the proportion of actual elements is greater than the fast lookup threshold, the fast lookup method described in this invention is enabled for newly received RLC layer reported data; otherwise, the conventional lookup method is used.
3. The PDCP layer cache data processing method according to claim 1, characterized in that, Step (2) specifically includes the following process: First, compare the COUNT value of the new data with the COUNT value of the last element in the cache list. If the new data is greater than the COUNT value of the last element, insert the new data at the end of the list. Otherwise, traverse the index tag list, comparing the COUNT value of the new data with the COUNT value in the tag. If the new data is less than the COUNT value in the tag, define the tag as an anchor tag. If the anchor label is the first label in the label list, compare the COUNT value of the new data with RX_DELIV. If they are equal, perform the in-order delivery operation according to the standard. If it is less than RX_DELIV, it is duplicate data and is discarded. Otherwise, insert the new data into the beginning of the cache list. If the anchor tag is not the first tag in the tag chain, the COUNT value of the new data is compared with two values: the COUNT value in the anchor tag and the COUNT value of the element preceding the element in the cache chain marked by the anchor tag. If the COUNT value of the new data is less than the former but greater than the latter, the new data is inserted between these two elements; if the COUNT value of the new data is equal to the former or less than or equal to the latter, it is a duplicate packet and is discarded; if the COUNT value of the new data is greater than the former, the next tag in the tag chain is used to continue the determination using this method.
4. The PDCP layer cache data processing method according to claim 1, characterized in that, Step (3) specifically includes the following processes: Based on the insertion position of the new data and the comparison results with the COUNT values of elements before and after the insertion position, the relevant linked list and parameters are updated when the following situations occur. A. New data is inserted at the beginning of the cache list: If the COUNT value of the new data is greater than RX_DELIV, insert the relevant information of this data at the beginning of the index tag list; if the COUNT value of the new data differs from the COUNT value of the following element by 1, delete the index tag corresponding to the following element from the tag list. If the COUNT value of the new data is equal to RX_DELIV, perform the delivery operation in order according to the standard; if the COUNT value of the new data is less than RX_DELIV, it is duplicate data and is discarded. B. New data is inserted at the end of the cache list: If the COUNT value of the new data differs from the COUNT value of the preceding element by more than 1, then the relevant information of this data is inserted at the end of the index label list. C. The new data is inserted between two elements x and y in the linked list: As described in section 3 above, the label corresponding to element y in the index label linked list is the anchor label. If the COUNT value of the new data differs from the COUNT value of element x by more than 1, the index label corresponding to the new data element is inserted before the anchor label in the label linked list; if the COUNT value of the new data differs from the COUNT value of element y by 1, the anchor label corresponding to element y is deleted from the label linked list. D. After inserting an element into the cache list or performing an order delivery operation, update the actual number of elements and the proportion of actual elements in the list parameter set; after inserting or deleting a tag in the index tag list, update the number of tags in the list parameter set.