CN112399478B - Method for preventing uplink desynchronization, communication device and readable storage medium - Google Patents

Method for preventing uplink desynchronization, communication device and readable storage medium Download PDF

Info

Publication number
CN112399478B
CN112399478B CN202011171543.1A CN202011171543A CN112399478B CN 112399478 B CN112399478 B CN 112399478B CN 202011171543 A CN202011171543 A CN 202011171543A CN 112399478 B CN112399478 B CN 112399478B
Authority
CN
China
Prior art keywords
data
pdcp
entity
uplink
data volume
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011171543.1A
Other languages
Chinese (zh)
Other versions
CN112399478A (en
Inventor
谷向阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Semiconductor Chengdu Co Ltd
Original Assignee
Spreadtrum Semiconductor Chengdu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Semiconductor Chengdu Co Ltd filed Critical Spreadtrum Semiconductor Chengdu Co Ltd
Priority to CN202011171543.1A priority Critical patent/CN112399478B/en
Publication of CN112399478A publication Critical patent/CN112399478A/en
Application granted granted Critical
Publication of CN112399478B publication Critical patent/CN112399478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a method for preventing uplink desynchronizing, a communication device and a readable storage medium, wherein the method comprises the following steps: the PDCP entity determines a first data volume of a PDCP data packet to be sent; if the first data volume is greater than a first threshold value, the PDCP entity limits updating of the sequence number SN of the PDCP data packet, and sends the PDCP data packet with the data volume of the first threshold value to the RLC entity, where the first threshold value is the data volume of the PDCP data packet that the PDCP entity allows to send this time, so as to effectively prevent the uplink HFN from being out of synchronization.

Description

Method for preventing uplink desynchronization, communication device and readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, a communications apparatus, and a readable storage medium for preventing uplink out-of-synchronization.
Background
In a communication system, the COUNT value used in integrity protection and ciphering is composed of two parts, namely Hyper Frame Number (HFN) and Sequence Number (SN), corresponding to a packet. Generally, a terminal device and a network device maintain HFNs respectively, a Protocol Data Unit (PDU) transmitted between the terminal device and the network device carries a sequence number SN, and the terminal device and the network device decrypt the PDU according to the locally maintained HFN and the SN carried by the PDU. The SN of each PDU sent to the network equipment by the terminal equipment is according to 0 to 2^ (SN size) -1), wherein the SN size (SN size) is configured in the communication system in advance, when the SN reaches the maximum value 2^ (SN size) -1) of the SN, the next round of configuration of 0 to 2^ (SN size) -1 is entered, correspondingly, when the terminal sends the PDU, when the SN reaches the maximum value 2^ (SN size) -1), the HFN maintained locally is added with 1, the network equipment maintains the local HFN according to the analyzed SN, when the SN in the currently received PDU is smaller than the SN of the previous adjacent PDU, the SN in the PDU is determined to enter the next round of 0 to 2^ (SN size) -1, and the HFN maintained locally is added with 1. When the situation of continuous packet loss exceeds the maximum SN value, the HFN of the network device is not updated because the network device does not receive the corresponding PDU, and the HFN of the terminal device is updated, which causes the HFN maintained by the terminal device and the network device to be inconsistent, and there is a situation that the uplink HFN is out of step, so that the terminal device cannot decrypt the PDU received by the terminal device, and becomes invalid data. Therefore, how to solve the problem of uplink HFN out-of-step becomes a hot research problem.
Disclosure of Invention
The embodiment of the invention provides a method for preventing uplink desynchronizing, a communication device and a readable storage medium, which can effectively prevent uplink HFN desynchronizing.
The first aspect of the embodiments of the present invention provides a method for preventing uplink desynchronization, which is applied to a terminal device, where the terminal device includes a packet data convergence protocol PDCP entity and a radio link layer control protocol RLC entity, and the method includes:
the PDCP entity determines a first data volume of a PDCP data packet to be sent;
and if the first data volume is larger than a first threshold value, the PDCP entity limits updating of the sequence number SN of the PDCP data packet, and sends the PDCP data packet with the data volume of the first threshold value to the RLC entity, wherein the first threshold value is the data volume of the PDCP data packet which is allowed to be sent by the PDCP entity at this time.
A second aspect of the embodiments of the present invention provides a communication apparatus, including a determining module and a processing module, where:
the determining module is configured to determine a first data amount of a PDCP data packet to be sent;
and the processing module is configured to, if the first data amount is greater than a first threshold, limit updating of the sequence number SN of the PDCP data packet, and send the PDCP data packet with the data amount of the first threshold to the RLC entity, where the first threshold is the data amount of the PDCP data packet that the PDCP entity allows to send this time.
A third aspect of embodiments of the present invention provides a communication apparatus, including a processor and a memory, where the processor and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method of the first aspect.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect described above.
A fifth aspect of embodiments of the present invention provides a computer program product comprising computer program code which, when run on a computer, causes the computer to perform the method of the first aspect as described above.
In the embodiment of the invention, the PDCP entity determines the first data volume of the PDCP data packet to be sent, if the first data volume is larger than a first threshold value, the PDCP entity limits the update of the sequence number SN of the PDCP data packet, and sends the PDCP data packet with the data volume of the first threshold value to the RLC entity. The updating of the HFN of the terminal equipment can be limited by limiting the updating SN, and the uplink HFN can be effectively prevented from being out of step while the connection is not required to be reestablished.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1a is a schematic structural diagram of a communication system according to an embodiment of the present invention;
FIG. 1b is a schematic flow chart of a PDCP packet encryption/decryption process according to an embodiment of the present invention;
FIG. 1c is a diagram of the COUNT value provided by an embodiment of the present invention;
fig. 1d is a schematic diagram of uplink HFN out-of-step according to an embodiment of the present invention;
fig. 1e is a schematic diagram of information interaction through a data plane protocol stack according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for preventing uplink step loss according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a communication device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a communication device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1a, fig. 1a is a schematic structural diagram of a communication system related to a method for preventing uplink step loss according to an embodiment of the present invention. The communication system comprises at least one terminal device 101 and a network device 102, the terminal device 101 may be a mobile terminal, such as a mobile phone. The network device 102 may be a base station. The communication system may be a Long Term Evolution (LTE) system, a 5G communication system (e.g., new Radio (NR)), a communication system in which multiple communication technologies are merged (e.g., a communication system in which LTE technology and NR technology are merged), or a communication system in which evolution follows. In the communication system, the terminal device 101 may perform data interaction with the network device 102, and the terminal device 101 may perform data interaction with the network device 102. For example, the terminal device 101 may send a data packet required for executing the service to the network device, and the network device 102 may send the uplink grant information containing the second uplink grant data amount to the terminal device 101.
Referring to fig. 1b, fig. 1b is a schematic diagram illustrating a Packet Data Convergence Protocol (PDCP) Packet encryption/decryption process. When a data packet is sent between a terminal device and a network device, the PDCP data packet is generally encrypted and decrypted in the PDCP layer. If the terminal equipment sends the PDCP data packet to the network equipment, the PDCP data packet needs to be encrypted on a PDCP layer, the PDCP layer of the terminal equipment generates a key stream block after inputting a specified encryption model by using a COUNT value, a bearing identifier, an uplink direction, a downlink direction and a key stream length, and carries out XOR on the key stream block and a plaintext block to obtain a ciphertext block, so that the encryption of the PDCP data packet is realized, and the encrypted data packet is sent to the network equipment. After receiving the encrypted PDCP data packet, the PDCP layer of the network equipment decrypts the encrypted data packet by using the COUNT value, the bearing identification, the uplink and downlink directions and the key stream length which are the same as those of the terminal equipment.
The COUNT value is one of the more important input parameters in the encryption and decryption process, as shown in fig. 1c, and fig. 1c is a schematic diagram of the COUNT value. It can be seen that the COUNT value includes two parts, including Hyper Frame Number (HFN) and Sequence Number (SN), with a total of 32 bits, HFN at the high level and SN at the low level. Wherein, the PDCP SN size (the size of the PDCP SN) is configured for the network, and the length of the HFN is changed according to the PDCP SN size configured by the network.
The terminal equipment and the network equipment maintain own HFN respectively, and when the SN reaches 2^ (SN size) -1, the SN restarts from 0, and meanwhile, the HFN is increased by 1. Normally, the HFN on both the terminal side and the network side is kept synchronized. When the packet loss on the terminal side is too much, as shown in fig. 1d, if the data packets corresponding to SN from 0 to 2^ (SN size) -1 are all lost due to too bad wireless environment when HFN is 1, the HFN of the terminal device increases to 2 when the terminal device continues to transmit the data packet corresponding to SN 0, but the HFN of the network device does not change because the network device does not receive the data packet corresponding to HFN 1 and SN from 0 to 2^ (SN size) -1. When the terminal device sends a data packet with SN 0 and HFN 2 to the network device, since the HFN of the network device is still 1, the HFN of the terminal device and the HFN of the network device are out of synchronization, and the subsequent data packets received by the network device will have inconsistent COUNT values due to the out-of-synchronization problem of the HFN, so that the decrypted data is an invalid data packet with a problem.
Based on the HFN out-of-step problem, please refer to fig. 1e, where fig. 1e is an information interaction process between a terminal device and a network device according to the method for preventing an uplink out-of-step provided in the embodiment of the present invention, in fig. 1a, the terminal device and the network device both include a physical layer entity (PHY), a Media Access Control (MAC) entity, a Radio Link Control (RLC) entity, and a Packet Data Convergence Protocol (PDCP) entity. When the terminal equipment and the network equipment carry out information interaction, the terminal equipment and the network equipment carry out communication through each layer of protocol in a protocol stack. For example, taking the PDCP entity of the terminal device sending data to the network device entity as an example, the PDCP entity of the terminal device sends the data to the PHY entity of the network device through the RLC entity, MAC entity, and PHY entity of the terminal device, and then the PHY entity of the network device finally sends the data to the PDCP entity through the MAC entity and RLC entity of the network device.
Based on the above information interaction process between the terminal device and the network device, the method for preventing uplink desynchronization provided in the embodiments of the present invention mainly relates to data interaction between the PDCP entity and the RLC layer entity in the terminal device, but also relates to entities included in other protocol stacks in the terminal device.
Embodiments of the present invention provide a method for preventing uplink out-of-synchronization, which can limit updating of an HFN of a terminal device by limiting updating of an SN, and effectively prevent uplink HFN out-of-synchronization without re-establishing a connection between the terminal device and a network device. In a specific implementation, the PDCP entity determines a first data amount of a PDCP data packet to be sent, and determines a first threshold, where the first threshold is the data amount of the PDCP data packet that is sent by the PDCP entity in the current operation. And then, the PDCP entity judges whether the first data volume of the PDCP data packet to be sent is larger than a first threshold value, if the first data volume is larger than the first threshold value, the PDCP entity limits updating of the sequence number SN of the PDCP and sends the PDCP data packet with the data volume of the first threshold value to the RLC entity. In the method of the embodiment of the application, updating of the HFN of the terminal device is limited by limiting the updating SN, so that the uplink HFN is effectively prevented from being out of synchronization.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for preventing uplink step loss according to an embodiment of the present invention. The method for preventing uplink desynchronization can be applied to the terminal equipment, and more specifically can be executed by a PDCP layer entity of the terminal equipment. The method for preventing uplink desynchronization described in this embodiment includes the following steps:
s201, the PDCP entity determines a first data volume of the PDCP data packet to be sent.
The Data packet is a Protocol Data Unit (PDU). The first data volume is the total data volume corresponding to the packet data convergence protocol PDCP data packet currently to be sent by the PDCP entity. For example, if the PDCP entity of the terminal device receives 5 uplink packets transmitted from an upper layer (e.g., an application layer), the PDCP entity transmits 5 PDCP packets. If each PDCP data packet to be sent is 100 bytes, the first data amount is the data amount of the 5 PDCP data packets to be sent, that is, the first data amount is 500 bytes. The first data amount of the PDCP data packet to be transmitted is determined herein to be the data amount that the current PDCP entity needs to transmit to the RLC entity.
S202, if the first data quantity is larger than a first threshold value, the PDCP entity limits updating of the sequence number SN of the PDCP data packet, and sends the PDCP data packet with the data quantity being the first threshold value to the RLC entity.
In a specific implementation, the terminal device may first determine a first threshold, where the first threshold is a data amount of a PDCP data packet that the PDCP entity is allowed to send this time.
In a possible embodiment, if the RLC entity has no reserved data amount, the first threshold is a first predetermined value.
In another possible embodiment, if the RLC entity has the remaining data amount, the first threshold is determined according to a first predetermined value and the data amount remaining by the RLC entity, that is, the first threshold is a difference between the first predetermined value and the data amount remaining by the RLC entity. The first preset value may be determined according to the uplink grant data amount. When the RLC entity receives the uplink authorized data volume, the RLC entity sends the data packet to the MAC/PHY entity, and further sends the data packet to the network device, and after the RLC entity of the terminal device obtains the feedback of the RLC ACK of the network device, the RLC entity of the terminal device subtracts the corresponding data volume. Therefore, the amount of data reserved by the RLC entity is determined by the RLC entity comprehensively according to the amount of uplink grant data, the amount of data sent by the PDCP entity and the RLC ACK feedback received from the network device. For example, the first time the RLC entity receives 100 bytes of data sent by the PDCP entity, and the uplink grant data amount is only 40 bytes, if the RLC entity successfully sends all the 40 bytes and receives RLC ACK feedback from the network device, the data amount reserved by the RLC entity is 60 bytes; if no RLC ACK feedback is received from the network device, the amount of data remaining by the RLC entity is still 100 bytes. For another example, if the first RLC entity receives the RLC ACK feedback of the network device, the reserved data amount is 60 bytes, the second RLC entity receives the 100-byte data amount sent by the PDCP entity, the second uplink grant data amount is 40 bytes, and if the 40 bytes sent by the RLC entity are all successfully sent and the RLC ACK feedback of the network device is obtained, the reserved data amount of the RLC entity at this time is 120 bytes (i.e., the first remaining 60 bytes plus the second 100 bytes minus the second uplink grant 40), and if the RLC ACK feedback of the network device is not obtained, the reserved data amount of the RLC entity is 160 bytes.
In a possible embodiment, there are two optional values for the first preset value, which are exemplified by a first value and a second value, where the first value is smaller than the second value, and the first value and the second value may be determined according to a subframe configuration ratio of the terminal device. In a specific implementation, a corresponding relationship between one subframe configuration ratio and the two selectable values is maintained in the terminal device, for example, the corresponding relationship is shown in table 1, and as can be seen from table 1, the first value and the second value corresponding to different subframe configuration ratios are also different.
TABLE 1
Subframe configuration ratio First value Second numerical value
0 5000 bytes 10000 bytes
1 7000 bytes 11000 bytes
2 8000 bytes 13000 bytes
…… …… ……
Further, after the first value and the second value are determined according to the subframe configuration ratio of the terminal equipment. The PDCP entity acquires a first uplink authorization data volume scheduled by the network equipment, wherein the first uplink authorization data volume is used for indicating the data volume of a data packet which is allowed to be sent by the terminal equipment by the network equipment; and then judging whether the first uplink authorization data volume is smaller than an uplink authorization threshold, if so, taking the first numerical value as a first preset value by the PDCP entity, and if the first uplink authorization data volume is equal to or larger than the uplink authorization threshold, taking the second numerical value as the first preset value by the PDCP entity.
Wherein, the terminal device prestores an uplink authorization threshold. For example, the first value is 5000 bytes, the second value is 10000 bytes, and assuming that the PDCP entity obtains 3000 bytes of the first uplink grant data amount scheduled by the network device, and the uplink grant threshold is 1000 bytes, since the first uplink grant data amount is smaller than the uplink grant threshold, the PDCP entity takes 5000 bytes as the first preset value. Assuming that the amount of the first uplink grant data, which is obtained by the PDCP entity and scheduled by the network device, is 3000 bytes, and the uplink grant threshold is 4000 bytes, since the amount of the first uplink grant data is greater than the uplink grant threshold, the PDCP entity takes 10000 bytes as the first preset value.
Due to complexity of a wireless network environment, the amount of uplink grant data scheduled by the network device may be large or small, and if a certain deviation exists only according to the amount of uplink grant data scheduled by the network side obtained by the current time slot or the current subframe, the first grant data amount may be determined by a plurality of second uplink grant data amounts, and the second uplink grant data amounts are in one time slot or subframe, the network device configures the data amount, which allows the terminal device to send a data packet, for the terminal device, so that the deviation of the terminal device from receiving the uplink grant information scheduled by the network device may be reduced to a certain extent.
In a possible embodiment, the first uplink grant data amount is determined by weighting the plurality of second uplink grant data amounts, or the first uplink grant data amount is determined by averaging the plurality of second uplink grant data amounts.
Next, a description will be given of an implementation procedure in which the first grant data amount is determined by a plurality of second uplink grant data amounts: the manner of acquiring the plurality of second uplink grant data amounts is different for different communication systems.
(1) For a 5G (5 th generation mobile communication technology) communication system, generally, corresponding N second uplink grant data volumes are obtained from N time slots. The specific implementation mode is as follows:
the PHY entity of the terminal device may obtain a second uplink grant data amount scheduled by the network device at each of the N time slots, where the second uplink grant data amount is used to indicate a data amount that the network device allows the terminal device to transmit at each time slot, and determine the first uplink grant data amount according to the second uplink grant data amount scheduled by the network device at each time slot. In a specific implementation, the PHY entity obtains the second uplink grant data amount scheduled by the network device at each of the N time slots, and performs weighting processing on the second uplink grant data amount scheduled by the network device at each time slot to obtain the first uplink grant data amount. Or, the PHY entity obtains the second uplink grant data amount scheduled by the network device at each of the N time slots, and performs average processing on the second uplink grant data amount scheduled by the network device at each time slot to obtain the first uplink grant data amount.
It should be noted that, since the second uplink grant data amount sent by the network device and received in each timeslot is not, the N timeslots in the above description may not be adjacent N timeslots, and may be understood as adjacent N timeslots capable of receiving the second uplink grant data amount sent by the network device.
Specifically, the N timeslots are N timeslots that are before the current timeslot and that are capable of receiving the second uplink grant data amount. For example, the current timeslot is 5, and the second uplink grant data amount can be received in each timeslot, N is 5, and those N timeslots are timeslots 1/2/3/4/5. For another example, if the current timeslot is 6 and the second uplink grant data size can be received in timeslots 1/2/4/5/6, then N is 5,N timeslots, which is timeslots 1/2/4/5/6. The principle of performing weighting processing on the second uplink grant data of the network device in each timeslot may be: the closer the time slot is to the current time slot, the greater the weight of the received uplink grant data amount.
In one example, let N =3, the current slot is 3, and the second uplink grant data amount is received in slot 1, slot 2, and slot 3. The PHY entity may obtain the second uplink grant data amount scheduled by the network device in each time slot in time slot 1, time slot 2, and time slot 3, respectively. For example, the amount of the second uplink grant data scheduled by the network device is 20 bytes in time slot 1, the amount of the second uplink grant data scheduled by the network device is 100 bytes in time slot 2, and the amount of the second uplink grant data scheduled by the network device is 80 bytes in time slot 3. The PHY entity performs weighted calculation on the second uplink grant data amount scheduled by the network device in time slot 1, time slot 2, and time slot 3, for example, taking 20% of the second uplink grant data amount scheduled by the network device in time slot 1, taking 30% of the second uplink grant data amount scheduled by the network device in time slot 2, and taking 50% of the second uplink grant data amount scheduled by the network device in time slot 3 as the first uplink grant data amount scheduled by the network device received by the terminal device, that is, the first uplink grant data amount is 74 bytes.
In another example, let N =3, the current slot is 3, and the second uplink grant data amount is received in slot 1, slot 2, and slot 3. The PHY entity may obtain the second uplink grant data amount scheduled by the network device in each time slot in time slot 1, time slot 2, and time slot 3, respectively. For example, the amount of the second uplink grant data scheduled by the network device is obtained at time slot 1 as 20 bytes, the amount of the second uplink grant data scheduled by the network device is obtained at time slot 2 as 100 bytes, and the amount of the second uplink grant data scheduled by the network device is obtained at time slot 3 as 80 bytes. The terminal device sums and averages the second uplink authorized data amount scheduled by the network device in time slot 1, time slot 2 and time slot 3, and takes the averaged uplink authorized data amount as the first uplink authorized data amount scheduled by the network device received by the terminal device, that is, the first uplink authorized data amount is 67 bytes.
(2) For a 4G (4 th generation mobile networks) or LTE (Long Term Evolution) communication system, because there is no concept of a time slot, N corresponding second uplink grant data amounts are generally obtained from N subframes. The specific implementation mode is as follows:
the PHY entity may obtain a second amount of uplink grant data scheduled by the network device in each of the N subframes, where the second amount of uplink grant data is used to indicate an amount of data that the network device allows the terminal device to transmit in each subframe. And the terminal equipment determines a first uplink authorized data volume according to the second uplink authorized data volume scheduled by the network equipment under each subframe. In a specific implementation, the terminal device may first obtain the second uplink grant data amount scheduled by the network device under each of the N subframes, and perform weighting processing on the second uplink grant data amount scheduled by the network device under each subframe to obtain the first uplink grant data amount. Or, the terminal device obtains the second uplink authorized data amount scheduled by the network device in each of the N subframes, and performs average processing on the second uplink authorized data amount scheduled by the network device in each subframe to obtain the first uplink authorized data amount.
It should be noted that, since the second uplink grant data amount sent by the network device and not received in each subframe, the N subframes in the above description may not be adjacent N subframes, and may be understood as adjacent N subframes capable of receiving the second uplink grant data amount sent by the network device.
Specifically, the N subframes refer to N subframes that are before the current subframe and that can receive the second uplink grant data amount of the network device. The principle of performing weighting processing on the second uplink grant data of the network device in each subframe may be: the closer the subframe is to the current subframe, the greater the weight value of the received uplink grant data amount.
In an example, assuming that N =2 and the current subframe is 7, the second uplink grant data amount scheduled by the network device may be received at subframe number 2 and subframe number 7. For example, the PHY entity obtains that the number of the second uplink grants scheduled by the network side under the subframe 2 is 20 bytes, obtains that the amount of the second uplink grant data scheduled by the network side under the subframe 7 is 100 bytes, and performs weighted calculation on the amount of the second uplink grant data scheduled by the network device under the subframes 2 and 7, for example, 40% of the amount of the second uplink grant data scheduled by the network device under the subframe 2 and 60% of the amount of the second uplink grant data scheduled by the network side under the subframe 7 are taken as the amount of the first uplink grant data scheduled by the network device received by the terminal device, that is, the amount of the first uplink grant data is 68 bytes.
In another example, assuming that N =2 and the current subframe is 7, the second uplink grant data amount scheduled by the network device may be received at subframe number 2 and subframe number 7. For example, the PHY entity obtains that the number of the second uplink grants scheduled by the network side in subframe 2 is 20 bytes, obtains that the amount of the second uplink grant data scheduled by the network side in subframe 7 is 100 bytes, and sums and averages the amounts of the second uplink grants scheduled by the network devices in subframe 2 and subframe 7, as a first uplink grant data amount scheduled by the terminal device receiving network device, that is, the first uplink grant data amount is 60 bytes.
In a possible embodiment, after the PHY entity obtains the first uplink grant data volume, the PHY entity may send the first uplink grant data volume to an MAC entity of the terminal device, the MAC entity then sends the first uplink grant data volume to an RLC entity, and the RLC entity sends the first uplink grant data volume to the PDCP entity, so that the PDCP entity determines the first preset value according to the first uplink grant data volume.
Then, after determining the first threshold, the PDCP entity may determine whether the first data amount is greater than the first threshold, and if the first data amount is greater than the first threshold, the PDCP entity limits updating the sequence number SN of the PDCP packet, and sends a PDCP packet with the data amount equal to the first threshold to the RLC entity.
Wherein, because each uplink data packet arrives at the PDCP entity, a certain arrival sequence exists, and the PDCP entity restricts updating the sequence number of the PDCP data packet means that the sequence equal to the first threshold is updated with the SN of the PDCP data packet before, and sends the PDCP data packet with the data amount equal to the first threshold to the RLC entity, and does not update the sequence number of the PDCP data packet with the partial PDCP data packet exceeding the first threshold (i.e. the PDCP data packet after the sequence is last), i.e. the corresponding partial data packet exceeding the first threshold is temporarily not sent to the RLC entity. For example, the first threshold is 5000 bytes, wherein if the PDCP entity receives 10 uplink packets sent from an upper layer (e.g., an application layer), and the number of bytes of each packet is 100 bytes, the first data amount is 10000 bytes. After the terminal device determines that the first data amount is greater than the first threshold value, the terminal device updates the SN of the PDCP data packets corresponding to the first 5000 bytes (i.e., the first 5 PDCP data packets), and sends the PDCP data packets corresponding to the first 5000 bytes to the RLC entity. The remaining PDCP packets corresponding to 5000 bytes (the last 5 PDCP packets) do not update the SNs of the PDCP packets and do not transmit the remaining PDCP packets corresponding to 5000 bytes to the RLC entity.
In a possible embodiment, since the first data amount is greater than the first threshold, the PDCP entity cannot send a partial PDCP data packet to the RLC entity, and therefore, a timer is set for each PDCP data packet in the partial PDCP data packet, and the timer is started to time. After the timer corresponding to the PDCP data packet expires, the PDCP entity discards the expired PDCP data packet and sends a notification message to the upper layer, where the notification message is used to notify the upper layer (e.g., application layer) that the packet has been lost. Wherein the timer may be Discardtimer.
In a possible embodiment, if the first data amount is less than or equal to the first threshold, the PDCP entity may update the SN of the PDCP data packet normally and send the PDCP data packet with the first data amount to the RLC entity. For example, the first threshold is 5000 bytes, the PDCP entity receives 3 uplink data packets, and the size of each uplink data packet is 1000 bytes, and the PDCP entity may determine that the first data size of the PDCP data packet to be sent is 3000 bytes. Then, the PDCP entity determines that the first data amount is smaller than the first threshold, and the PDCP entity can update the SN of the PDCP data packet normally, and send 3 PDCP data packets corresponding to 3000 bytes to the RLC entity.
It should be noted that, if the PDCP entity receives 5 uplink packets sent from an upper layer (e.g., an application layer), the uplink packets are processed by the PDCP entity to become PDCP packets to be sent by the PDCP entity.
In a possible embodiment, the first data amount of the PDCP packet to be sent is changed in real time, and when the first data amount of the PDCP packet to be sent is greater, the PDCP entity of the terminal device will increase every time it receives an uplink packet, and decrease after receiving the successful acknowledgement of the bottom RLC transmission of the terminal device, until the PDCP packet in the PDCP entity is sent. The obtaining of the successful transmission acknowledgement of the bottom RLC entity means that the RLC entity of the terminal device receives acknowledgement information (ACK) of the RLC entity of the corresponding network device.
In the embodiment of the invention, the PDCP entity determines the first data volume of the PDCP data packet to be sent, if the first data volume is larger than a first threshold value, the PDCP entity limits the updating of the sequence number SN of the PDCP data packet, and sends the PDCP data packet with the data volume of the first threshold value to the RLC entity. The updating of the HFN of the terminal equipment can be limited by limiting the updating SN, and the uplink HFN can be effectively prevented from being out of step while the connection is not required to be reestablished.
Based on the implementation of the embodiment of the present application, the following examples can be used for understanding:
the subframe configuration ratio of the terminal equipment is set to be 0, and the first value 5000 bytes or the second value 10000 bytes can be selected according to the subframe configuration ratio and the first preset value. The uplink grant threshold preset by the terminal device is 3000 bytes, and the RLC entity receives 5000 bytes sent by the PDCP entity last time. The current PDCP entity receives 6 uplink data packets, where each uplink data packet is 1000 bytes, that is, the first data size of the PDCP data packet to be sent is 6000 bytes.
Example 1: if the PHY entity determines that the current first uplink grant data size is 4000 bytes according to the received second previous grant data sizes. The PHY entity transmits 4000 bytes of the first uplink grant data amount to the RLC entity through the MAC entity, the RLC entity transmits 4000 bytes of the first uplink grant data amount to the PDCP entity, and transmits a 4000 byte packet to the lower layer. After the PDCP entity receives 4000 bytes of the first uplink grant data amount, the PDCP entity determines that the first preset value is 10000 bytes, because the 4000 bytes of the first uplink grant data amount is larger than 3000 bytes of the uplink grant threshold. Then, the RLC entity may send 4000 bytes to the MAC/PHY entity according to 4000 bytes of the first uplink grant data amount, and finally successfully send the MAC/PHY entity to the network device, and after receiving RLC ACK feedback of the network device, the RLC entity may determine that the data amount of the data packet currently reserved by the RLC entity is 1000 bytes (i.e., 5000-4000=1000 bytes) according to 5000 bytes sent by the PDCP entity and the first uplink grant data amount. Then, the PDCP entity determines that the first threshold is 9000 bytes according to 10000 bytes, which is a first preset value, and 1000 bytes, which is the amount of data of the currently reserved data packet of the RLC entity. And because the first data quantity is smaller than the first threshold value, the PDCP entity normally updates the SN of the PDCP data packet and sends 6 PDCP data packets corresponding to 6000 bytes to the RLC entity.
Example 2: if the PHY entity determines that the amount of the first uplink grant data of this time is 1000 bytes according to the received second last grant numbers, similarly, the PHY entity sends the 1000 bytes of the first uplink grant data to the PDCP entity through the MAC entity and the RLC entity, and sends a data packet of 1000 bytes to the lower layer. After receiving the first uplink grant data volume 1000 bytes, the PDCP entity determines that the first preset value is 5000 bytes because the first uplink grant data volume 1000 bytes is smaller than the uplink grant threshold 3000 bytes. And then, the RLC entity sends 4000 bytes to the MAC/PHY entity according to 4000 bytes of the first uplink authorized data volume, and finally successfully sends the 4000 bytes to the network equipment, and after receiving RLC ACK feedback of the network equipment, the RLC entity can enable the data volume of the data packet currently reserved by the RLC entity to be 1000 bytes according to 5000 bytes sent by the PDCP entity and the first uplink authorized data volume. The PDCP entity may determine that the first threshold is 4000 bytes according to 5000 bytes of the first preset value and 1000 bytes of the data amount of the currently reserved data packet of the RLC entity. And if the first data quantity is larger than a first threshold value, the PDCP entity limits updating of SN of the PDCP data packets and sends 4 data packets corresponding to the first 4000 bytes to the RLC entity.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a communication device according to an embodiment of the present invention. The communication device can be deployed in a terminal device for execution. The communication apparatus described in this embodiment includes:
the determining module 301 is configured to determine a first data amount of a PDCP data packet to be sent;
the processing module 302 is configured to, if the first data amount is greater than a first threshold, limit updating of the sequence number SN of the PDCP data packet, and send the PDCP data packet with the data amount of the first threshold to the RLC entity, where the first threshold is the data amount of the PDCP data packet that the PDCP entity allows to send this time.
In a possible embodiment, the processing module 302 determines the first threshold as a difference between a first preset value and a data amount reserved by the RLC entity.
In a possible embodiment, the processing module 302 is configured to: and if the first data volume is less than or equal to the first threshold value, updating the SN of the PDCP data packet, and sending the PDCP data packet with the data volume of the first data volume to the RLC entity.
In a possible embodiment, the processing module 302 is specifically configured to:
acquiring a first uplink authorization data volume scheduled by network equipment, wherein the first uplink authorization data volume is used for indicating the data volume of a data packet which is allowed to be sent by the terminal equipment by the network equipment;
if the first uplink authorization data volume is smaller than an uplink authorization threshold, taking a first numerical value as the first preset value, and pre-storing the uplink authorization threshold by the terminal equipment;
and if the first uplink authorization data volume is equal to or larger than the uplink authorization threshold value, taking a second numerical value as the first preset value, wherein the first numerical value is smaller than the second numerical value.
In a possible embodiment, the first value and the second value are determined by a subframe configuration ratio of the terminal device.
In a possible embodiment, the first uplink grant data amount is determined by a plurality of second uplink grant data amounts; the second uplink grant data volume is a data volume which is configured for the terminal device by the network device in a time slot or a subframe and allows the terminal device to send a data packet.
In a possible embodiment, the first uplink grant data amount is determined by weighting the plurality of second uplink grant data amounts, or the first uplink grant data amount is determined by averaging the plurality of second uplink grant data amounts.
It can be understood that the functions of the functional modules of the communication apparatus in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to fig. 2 of the foregoing method embodiment, which is not described herein again.
Fig. 4 is a schematic structural diagram of a communication device according to an embodiment of the present invention. The communication apparatus in the embodiment shown in fig. 4 may be the terminal device described above, and may include: a processor 401, an input device 402, an output device 403, and a memory 404. The processor 401, the input device 402, the output device 403, and the memory 404 are connected by a bus 405. The memory 404 is used to store a computer program comprising program instructions and the processor 401 is used to execute the program instructions stored by the memory 404.
In the embodiment of the present invention, the processor 401 executes the executable program code in the memory 404 to perform the following operations: determining a first data volume of a PDCP data packet to be transmitted; and if the first data volume is larger than a first threshold value, limiting updating of the sequence number SN of the PDCP data packet, and sending the PDCP data packet of which the data volume is the first threshold value to the RLC entity, wherein the first threshold value is the data volume of the PDCP data packet which is allowed to be sent by the PDCP entity at this time.
In a possible embodiment, the first threshold is a difference between a first preset value and a data amount reserved by the RLC entity.
In a possible embodiment, the processor 401 is configured to update SNs of the PDCP data packets and send the PDCP data packets with the first data amount to the RLC entity if the first data amount is smaller than or equal to the first threshold.
In a possible embodiment, the processor 401 is specifically configured to: the PDCP entity acquires a first uplink authorization data volume scheduled by the network equipment, wherein the first uplink authorization data volume is used for indicating the data volume of the network equipment allowing the terminal equipment to send data packets; if the first uplink authorization data volume is smaller than an uplink authorization threshold, the PDCP entity takes a first value as the first preset value, and the terminal device prestores the uplink authorization threshold; if the first uplink authorization data volume is equal to or greater than the uplink authorization threshold, the PDCP entity takes a second value as the first preset value, and the first value is smaller than the second value.
In a possible embodiment, the first value and the second value are determined by a subframe configuration ratio of the terminal device.
In a possible embodiment, the first uplink grant data amount is determined by a plurality of second uplink grant data amounts; the second uplink grant data volume is a data volume which is configured for the terminal device by the network device and allows the terminal device to send a data packet in a time slot or a subframe.
In a possible embodiment, the first uplink grant data amount is determined by weighting the plurality of second uplink grant data amounts, or the first uplink grant data amount is determined by averaging the plurality of second uplink grant data amounts.
It should be understood that, in the embodiment of the present Application, the Processor 401 may be a Central Processing Unit (CPU), and the Processor 401 may also be other general-purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A portion of the memory 404 may also include non-volatile random access memory.
The input device 402 may include a keyboard, touch mode input, etc., and inputs data information to the processor 401; the output device 403 may include a display or the like.
In a specific implementation, the processor 401, the input device 402, the output device 403, and the memory 404 described in this embodiment of the present invention may execute the implementation manner described in the flow of the method for preventing uplink step loss provided in fig. 2 in this embodiment of the present invention, which is not described herein again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a processor, the steps performed in fig. 2 of the embodiment of the uplink out-of-step prevention method may be performed.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a computer readable storage medium and executed by a computer to implement the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.

Claims (9)

1. A method for preventing uplink desynchronization is applied to a terminal device, wherein the terminal device comprises a Packet Data Convergence Protocol (PDCP) entity and a radio link layer control protocol (RLC) entity, and the method comprises the following steps:
the PDCP entity determines a first data volume of a PDCP data packet to be sent;
if the first data volume is larger than a first threshold value, the PDCP entity limits updating of the sequence number SN of the PDCP data packet, and sends the PDCP data packet with the data volume of the first threshold value to the RLC entity, where the first threshold value is the data volume of the PDCP data packet that the PDCP entity allows to send this time, and the first threshold value is a difference value between a first preset value and the data volume reserved by the RLC entity; the data volume reserved by the RLC entity is determined comprehensively according to a first uplink authorization data volume, the data volume of the PDCP data packets sent by the PDCP entity and the data volume of the RLC acknowledgement ACK fed back by the network equipment, and the first preset value is determined according to the first uplink authorization data volume and an uplink authorization threshold value.
2. The method of claim 1, wherein if the first data amount is less than or equal to the first threshold, the terminal device updates SN of the PDCP data packet and sends the PDCP data packet with the first data amount to the RLC entity.
3. The method of claim 1, further comprising:
the PDCP entity acquires a first uplink authorization data volume scheduled by network equipment, wherein the first uplink authorization data volume is used for indicating the data volume of the network equipment allowing the terminal equipment to send data packets;
if the first uplink authorization data volume is smaller than an uplink authorization threshold, the PDCP entity takes a first numerical value as the first preset value, and the terminal device prestores the uplink authorization threshold;
if the first uplink authorization data volume is equal to or greater than the uplink authorization threshold, the PDCP entity takes a second value as the first preset value, and the first value is smaller than the second value.
4. The method of claim 3, wherein the first value and the second value are determined by a subframe configuration ratio of the terminal device.
5. The method according to claim 3 or 4, wherein the first uplink grant data amount is determined by a plurality of second uplink grant data amounts; the second uplink grant data volume is a data volume which is configured for the terminal device by the network device and allows the terminal device to send a data packet in a time slot or a subframe.
6. The method according to claim 5, wherein the first uplink grant data amount is determined by weighting the plurality of second uplink grant data amounts, or the first uplink grant data amount is determined by averaging the plurality of second uplink grant data amounts.
7. A communication apparatus, comprising a determining module and a processing module, wherein:
the determining module is configured to determine a first data amount of a PDCP data packet to be sent;
the processing module is configured to, if the first data amount is greater than a first threshold, limit updating of a sequence number SN of the PDCP data packet, and send the PDCP data packet whose data amount is the first threshold to an RLC entity, where the first threshold is a data amount of the PDCP data packet that the PDCP entity allows to be sent this time, and the first threshold is a difference between a first preset value and a data amount reserved by the RLC entity; the data volume reserved by the RLC entity is determined comprehensively according to a first uplink authorization data volume, the data volume of the PDCP data packets sent by the PDCP entity and the data volume of the RLC acknowledgement ACK fed back by the network equipment, and the first preset value is determined according to the first uplink authorization data volume and an uplink authorization threshold value.
8. A communications apparatus comprising a processor and a memory, wherein the memory is configured to store a computer program comprising program instructions, and wherein the processor is configured to invoke the program instructions to perform the method of any of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method of any of claims 1 to 6.
CN202011171543.1A 2020-10-28 2020-10-28 Method for preventing uplink desynchronization, communication device and readable storage medium Active CN112399478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011171543.1A CN112399478B (en) 2020-10-28 2020-10-28 Method for preventing uplink desynchronization, communication device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011171543.1A CN112399478B (en) 2020-10-28 2020-10-28 Method for preventing uplink desynchronization, communication device and readable storage medium

Publications (2)

Publication Number Publication Date
CN112399478A CN112399478A (en) 2021-02-23
CN112399478B true CN112399478B (en) 2023-03-24

Family

ID=74598268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011171543.1A Active CN112399478B (en) 2020-10-28 2020-10-28 Method for preventing uplink desynchronization, communication device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112399478B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104535A (en) * 2009-12-18 2011-06-22 华为技术有限公司 Method, device and system for transmitting PDCP data
CN104704881A (en) * 2012-08-14 2015-06-10 三星电子株式会社 Method and device for performing handover in mobile communication system
JP2017041814A (en) * 2015-08-21 2017-02-23 株式会社Nttドコモ Transmitter and communication system
CN109863769A (en) * 2016-11-30 2019-06-07 华为技术有限公司 The method and apparatus of safe handling
WO2020126018A1 (en) * 2018-12-20 2020-06-25 Telefonaktiebolaget Lm Ericsson (Publ) Buffer status reporting in wireless communication systems

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2490470B1 (en) * 2011-02-16 2019-10-09 Marvell World Trade Ltd. Recovery from decryption errors in a sequence of communication packets
WO2015163593A1 (en) * 2014-04-22 2015-10-29 Lg Electronics Inc. Method for processing received pdcp pdus for d2d communication system and device therefor
CN106304154B (en) * 2016-09-30 2019-07-26 京信通信***(中国)有限公司 A kind of data transmission method and PDCP entity of PDCP entity
US10721650B2 (en) * 2017-06-09 2020-07-21 Samsung Electronics Co., Ltd. Method and apparatus for accelerating data processing in wireless communication system
EP3570477B1 (en) * 2018-03-23 2021-09-01 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and apparatus for retransmission processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104535A (en) * 2009-12-18 2011-06-22 华为技术有限公司 Method, device and system for transmitting PDCP data
CN104704881A (en) * 2012-08-14 2015-06-10 三星电子株式会社 Method and device for performing handover in mobile communication system
JP2017041814A (en) * 2015-08-21 2017-02-23 株式会社Nttドコモ Transmitter and communication system
CN109863769A (en) * 2016-11-30 2019-06-07 华为技术有限公司 The method and apparatus of safe handling
WO2020126018A1 (en) * 2018-12-20 2020-06-25 Telefonaktiebolaget Lm Ericsson (Publ) Buffer status reporting in wireless communication systems

Also Published As

Publication number Publication date
CN112399478A (en) 2021-02-23

Similar Documents

Publication Publication Date Title
US7171224B2 (en) Method and arrangement for maintaining synchronization in association with resetting a communication connection
US7953226B2 (en) Apparatus and method for determining uplink ciphering activation time in universal mobile telecommunications system user equipment
US20140237559A1 (en) Method and related device for generating group key
CN111510278B (en) Hyper frame number HFN synchronization method, terminal and storage medium
US8352838B2 (en) Cipher processing device, cipher processing method, and cipher processing program
US10142840B2 (en) Method and apparatus for operating a user client wireless communication device on a wireless wide area network
US20140044264A1 (en) Communications system
EP3641258A1 (en) Data transmission method, related device and communication system
CN109246696B (en) Key processing method and related device
CN110771191A (en) Method and apparatus for implementing bearer-specific changes as part of a connection reconfiguration affecting a security key being used
CN111262660B (en) Data transmission method, equipment and system
US20080181149A1 (en) Method and apparatus for handling packets in a wireless communications system
US20240163674A1 (en) Communication method and apparatus
US10880737B2 (en) Method and apparatus for refreshing the security keys of a subset of configured radio bearers
US9124558B2 (en) Method and apparatus of handling data decryption for a packet data convergence protocol layer in a wireless communication system
WO2024051419A1 (en) Method and device for processing data radio bearer integrity protection verification failure
CN112399478B (en) Method for preventing uplink desynchronization, communication device and readable storage medium
US20050086466A1 (en) Apparatus and method for determining uplink ciphering activation time in universal mobile telecommunications system user equipment
CN113225748A (en) Hyper frame number out-of-step detection method and device
EP2571321B1 (en) Method and device for controlling channel transmission
CN112333850B (en) Method for preventing downlink desynchronization, communication device and readable storage medium
CN115175239A (en) Business processing method, device, equipment, storage medium and program product
CN110876164B (en) Method and device for setting parameters for triggering polling and computer-readable storage medium
US20080137687A1 (en) Method and apparatus for handling reordering in a wireless communications system
US20090143063A1 (en) Method and Apparatus for Setting a Highest Received State Variable in a Wireless Communication System

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant