A data transmission method, a communication device, and a communication system

CN122846444APending Publication Date: 2026-09-29HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510362485.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2026-09-29

AI Technical Summary

Benefits of technology

[0023]在该实现方式中,网络设备可以先接收到终端设备在UL grant资源上发送的第一类LCH中的数据,从而使得紧急数据得到及时发送,避免了网络设备无法及时接收到紧急数据影响服务质量的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122846444A_ABST
    Figure CN122846444A_ABST
Patent Text Reader

Abstract

This application provides a data transmission method, communication device, and communication system, relating to the field of communication technology, capable of timely transmission of emergency data and avoiding timeouts or loss of emergency data transmission. The method includes: after a terminal device obtains uplink grant (UL) resources configured by a network device, it performs a first operation on a target LCH (Logical Channel Channel) of the terminal device for which data is to be transmitted; wherein the first operation includes: allocating UL grant resources to first-type LCHs with a token count greater than 0 in descending order of LCH priority and transmitting data from the first-type LCHs; allocating UL grant resources to second-type LCHs with a token count greater than 0 but not transmitting data from the second-type LCHs; after performing the first operation, if the target LCH also includes a first LCH belonging to the first-type LCHs, and there are no UL grant resources available for the first LCHs, then the terminal device performs a second operation. The second operation includes: continuing to transmit data from the first LCH on the UL grant resources allocated to the second-type LCHs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a data transmission method, communication device, and communication system. Background Technology

[0002] Extended reality (XR) services refer to the business applications of virtual reality (VR), augmented reality (AR), and mixed reality (MR) technologies. These technologies create virtual environments that allow users to interact with them through specific devices, thereby providing a rich user experience.

[0003] In XR services, terminal devices typically transmit data at the frame level. However, in 5G (5th-generation mobile communication technology), transmitting XR data at the frame level can be transformed into transmitting XR data at the protocol data unit (PDU) set level. A PDU set is a collection of one or more PDUs, and it plays a crucial role in data transmission.

[0004] When terminal devices transmit data including emergency data, ensuring that the emergency data is transmitted in a timely manner is an urgent problem that needs to be solved. Summary of the Invention

[0005] This application provides a data transmission method, communication device, and communication system that can avoid timeouts or loss of urgent data transmission in the target logical channel (LCH), thereby improving the user experience.

[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0007] Firstly, a data transmission method is provided, applied to a terminal device. This method may include: after the terminal device obtains uplink grant (UL) resources configured by the network device, for a target LCH containing data to be transmitted in the terminal device's logical channel (LCH), performing the following first operation: allocating UL grant resources to a first-type LCH with a token count greater than 0 in descending order of LCH priority and transmitting data from the first-type LCH; allocating UL grant resources to a second-type LCH with a token count greater than 0 but not transmitting data from the second-type LCH; the first-type LCH is an LCH containing at least urgent data, and the second-type LCH is an LCH containing only non-urgent data, where urgent data is data with a remaining transmission time less than a preset delay threshold. After performing the first operation, if the target LCH also includes a first LCH belonging to the first-type LCH, and there are no UL grant resources available for the first LCH, then the terminal device performs the following second operation: transmitting data from the first LCH on the UL grant resources allocated to the second-type LCH.

[0008] In this implementation, the terminal device first sends the data in the first type of LCH on the UL grant resource, allocates the UL grant resource only for the second type of LCH, and does not send the data in the second type of LCH on the allocated UL grant resource. If the target LCH also includes the first LCH belonging to the first type of LCH, the data in the first LCH is sent on the UL grant resource allocated for the second type of LCH, so that the emergency data is sent in a timely manner and the situation of emergency data loss is avoided.

[0009] In addition, the terminal device sends data from the first type of LCH on the UL grant resource in descending order of LCH priority. It can prioritize sending urgent data on the higher priority LCH in the first type of LCH, so that the data packets on the higher priority LCH can be transmitted normally.

[0010] In one possible implementation of the first aspect, there is no UL grant resource available for the first LCH, including: the UL grant resources allocated to the terminal device have been exhausted; or, the number of tokens for the first LCH is less than 0.

[0011] In this implementation, after the terminal device performs the first operation, there may be a situation where the UL grant resources allocated to the terminal device are exhausted, or there may be remaining UL grant resources allocated to the terminal device, but the terminal device cannot allocate the remaining resources for the first LCH with a token less than 0. In both cases, the terminal device sends the data from the first LCH on the UL grant resources allocated for the second type of LCH, thereby ensuring that the urgent data in the first LCH is transmitted in a timely manner and avoiding the loss of the urgent data in the first LCH.

[0012] In another possible implementation of the first aspect, the data transmission method may further include: after the terminal device performs the first operation, if there are remaining UL grant resources, then it performs the following third operation: allocates UL grant resources to the first type of LCH according to the priority of the first type of LCH and sends the remaining data in the first type of LCH.

[0013] In this implementation, when UL grant resources are sufficient, the terminal device first allocates resources for the first type of LCH on the UL grant resources and sends the data in the first type of LCH, so that the emergency data in the first type of LCH is sent to the network in a timely manner, avoiding the situation where emergency data loss affects service quality.

[0014] In another possible implementation of the first aspect, the data transmission method may further include: after the terminal device performs the third operation, if the target LCH also includes a first LCH belonging to the first type of LCH, and the UL grant resources have been fully allocated, then the second operation described above is performed.

[0015] In this implementation, after the terminal device sends the data in the first type of LCH on the UL grant resource, and the UL grant resource is exhausted but the target LCH still includes the first LCH belonging to the first type of LCH, the terminal device continues to send the data in the first LCH on the UL grant resource allocated for the second type of LCH. This ensures that emergency data is sent in a timely manner and avoids the impact of emergency data loss on service quality.

[0016] In another possible implementation of the first aspect, sending the second data of the first type LCH on the UL grant resources allocated to the second type LCH includes: the terminal device allocating the UL grant resources allocated to the second type LCH to the first LCH in ascending order of the number of tokens in the first type LCH, and sending the data in the first LCH.

[0017] In this implementation, the terminal device preempts the ULgrant resources allocated to the second type of LCH based on the number of tokens in the first LCH to send the first LCH, thereby ensuring that urgent data in the first LCH is sent in a timely manner and avoiding the situation where the loss of urgent data affects the quality of service.

[0018] In another possible implementation of the first aspect, the number of LCH tokens is determined based on the number of LCH tokens before the first operation and the result of the first operation.

[0019] In this implementation, during the execution of the first operation by the terminal device, the number of tokens for both the first type of LCH and the second type of LCH changes. When the terminal device sends data from the first type of LCH on the UL grant resource, it consumes the number of tokens for the first type of LCH. Similarly, when the terminal device allocates resources for data from the second type of LCH on the UL grant resource, it also consumes the number of tokens for the second type of LCH.

[0020] In another possible implementation of the first aspect, the token count of each LCH in the first type of LCH is the difference between the value before the first operation and the amount of data sent by the LCH; the token count of each LCH in the second type of LCH is restored to the value at the time of the first operation, and the token counts of other LCHs in the target LCH, excluding the first type of LCH and the second type of LCH, remain unchanged.

[0021] In this implementation, during the process of allocating resources for the data in the second type of LCH on the UL grant resource, the terminal device consumes the token count of the second type of LCH. However, the terminal device does not send the data in the second type of LCH on the UL grant resource. The token count of each LCH in the second type of LCH is restored to the value when the first operation was performed, so that the terminal device can send the data in the second type of LCH according to the token count of each LCH in the second type of LCH.

[0022] Secondly, a data transmission method is provided, applied to a network device. The method may include: after the network device sends uplink grant (UL) resources to a terminal device, receiving data from a first type of logical channel (LCH) sent by the terminal device; wherein the first type of LCH is an LCH that includes at least urgent data, and the urgent data is data whose remaining transmission time is less than a preset delay threshold; receiving data from the first LCH sent by the terminal device through UL grant resources allocated for a second type of LCH; wherein the second type of LCH is an LCH that includes only non-urgent data.

[0023] In this implementation, the network device can first receive the data in the first type of LCH sent by the terminal device on the UL grant resource, thereby enabling the emergency data to be sent in a timely manner and avoiding the problem of the network device failing to receive the emergency data in a timely manner, which affects the quality of service.

[0024] In one possible implementation of the second aspect, the method may further include: the network device receiving the remaining data in the first type of LCH sent by the terminal device; wherein the remaining data in the first type of LCH is the data sent after allocating UL grant resources to the first type of LCH according to the priority of the first type of LCH, provided that there are remaining UL grant resources.

[0025] Thirdly, a communication device is provided for use in a terminal device, the device comprising: a module for performing the method described in the first aspect and any possible implementation thereof.

[0026] Fourthly, a communication apparatus is provided for use in a network device, the apparatus comprising: a module for performing the method of the second aspect and any possible implementation thereof.

[0027] Fifthly, a communication system is provided, comprising: a communication device for performing the method of the first aspect and any possible implementation thereof, and a communication device for performing the method of the second aspect and any possible implementation thereof.

[0028] Sixthly, a communication device is provided, comprising: a transceiver, a processor, and a memory. The memory stores computer programs or instructions, and the processor controls the transceiver to transmit and receive signals. The processor also calls and executes the computer programs or instructions stored in the memory, causing the processor to implement any of the above aspects and any possible implementations of those aspects.

[0029] In a seventh aspect, a communication device is provided, comprising: a processor; the processor being configured to invoke a computer program or instructions in a memory, causing the communication device to execute any of the above aspects and any possible implementation thereof.

[0030] Optionally, the communication device further includes a memory for storing program instructions. The processor is coupled to the memory via an interface.

[0031] Eighthly, a chip device is provided, including a processor for invoking a computer program or instructions in the memory to cause the processor to perform any of the above aspects and any possible implementation thereof.

[0032] Alternatively, the processor may be coupled to the memory via an interface.

[0033] Ninthly, a chip system is provided, including a memory and a processor, wherein a program / instruction stored in the memory, when executed by the processor, implements any of the above aspects and any possible implementation of the above aspects.

[0034] In a tenth aspect, a computer-readable storage medium is provided having a computer program / instructions stored thereon, which, when executed by a processor, implements any of the foregoing aspects and any possible implementation of the foregoing aspects.

[0035] Eleventhly, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement any of the above aspects and any possible implementation of the above aspects. Attached Figure Description

[0036] Figure 1 Example of data transmission in related technologies Figure 1 ;

[0037] Figure 2 Example of data transmission in related technologies Figure 2 ;

[0038] Figure 3 This application provides a schematic diagram of the architecture of a communication system.

[0039] Figure 4 A schematic diagram of a protocol layer provided in an embodiment of this application;

[0040] Figure 5 A flowchart illustrating a data transmission method provided in an embodiment of this application;

[0041] Figure 6 A schematic diagram illustrating the network device configuration provided in an embodiment of this application;

[0042] Figure 7 A flowchart illustrating a method for determining the category of an LCH as provided in an embodiment of this application;

[0043] Figure 8 Examples of data transmission methods provided in embodiments of this application Figure 1 ;

[0044] Figure 9 Examples of data transmission methods provided in embodiments of this application Figure 2 ;

[0045] Figure 10 Examples of data transmission methods provided in embodiments of this application Figure 3 ;

[0046] Figure 11 Examples of data transmission methods provided in embodiments of this application Figure 4 ;

[0047] Figure 12 A flowchart illustrating another data transmission method provided in an embodiment of this application;

[0048] Figure 13 Examples of data transmission methods provided in embodiments of this application Figure 5 ;

[0049] Figure 14 Examples of data transmission methods provided in embodiments of this application Figure 6 ;

[0050] Figure 15 Examples of data transmission methods provided in embodiments of this application Figure 7 ;

[0051] Figure 16 Examples of data transmission methods provided in embodiments of this application Figure 8 ;

[0052] Figure 17 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;

[0053] Figure 18 This is a schematic diagram of the hardware structure of a communication device provided in an embodiment of this application;

[0054] Figure 19 This is a schematic diagram of the structure of a communication system provided in an embodiment of this application. Detailed Implementation

[0055] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone.

[0056] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this application, unless otherwise stated, "a plurality of" means two or more.

[0057] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0058] First, to facilitate understanding of the methods provided in this application, the technical terms involved in this application will be explained.

[0059] 1. Logical Channels (LCH) refer to a logical partitioning of the software protocol layer of a device (such as a terminal device) in a communication system to meet the data transmission needs of different users or services. Logical channels need to be mapped to physical channels to achieve actual data transmission. The physical channel is the physical medium or hardware path for actual data transmission, such as optical fiber, cable, or radio waves. Optionally, logical channels can be mapped to transport blocks or frames of physical channels; one logical channel can be mapped to one or more physical channels, or multiple logical channels can share the same physical channel, etc., without restriction.

[0060] 2. Logical channel prioritization (LCP) refers to the process in a 5G network where the media access control (MAC) layer multiplexes data or information from one or more LCHs (Level Channel Chronicles) and / or one or more MAC control elements into a single MAC PDU. This process is called logical channel prioritization or LCP at the MAC layer.

[0061] In one example, the LCP procedure involves using a two-round loop to transfer LCH data. The two-round loop procedure is described below:

[0062] In the first round of the loop, relying on the token bucket algorithm, scheduling services are provided to LCHs with a token count greater than 0 in descending order of LCH priority, until the token count of LCHs with a token count greater than 0 is consumed to 0 or the uplink grant (UL grant) resources configured by the network device for the terminal device are exhausted.

[0063] The token bucket algorithm refers to each LCH having a token named "Bj" and a bucket containing the token count, where j represents the index of the LCH. For example, LCH1 and LCH2 have token counts B(1) and B(2) respectively. The token counts are contained in bucket1 and bucket2. When UL grant resources are allocated to the terminal device, the token count of the LCH indicates the size of the resources that the LCH may occupy. The token count increases by priority bit rate (PBR) x TTI in each transmission time interval (TTI). However, although the token count increases by PBR x TTI in each TTI, it cannot exceed the bucket size depth (BSD), i.e., the maximum capacity of each bucket. Accordingly, if the token count contained in the bucket reaches or exceeds the BSD value, the BSD value is maintained, and the PBR x TTI value is not added in each TTI. When an LCHj is established, the token count B(j) corresponding to that LCHj is initialized to 0. During each LCP process, B(j) increases by PBR × TTI. If B(j) > PBR(j) × BSD, then B(j) = PBR(j) × BSD. This PBR(j) × BSD corresponds to the maximum UL grant resource that LCHj can obtain in the first round of the loop.

[0064] In this application, the priority of an LCH can refer to the importance level that a network device assigns to different LCHs for processing or transmitting data. This LCH priority is the default priority configured by the network device. The smaller the value corresponding to the LCH priority, the higher the LCH priority; the larger the value, the lower the LCH priority. For example, assuming the LCH priority values ​​are 1 to 16, the LCH with a value of 1 has the highest priority, and the LCH with a value of 16 has the lowest priority. As another example, assuming the priority values ​​corresponding to LCHa, LCHb, and LCHc are 2, 5, and 10 respectively, then priority(a) > priority(b) > priority(c). Alternatively, the value corresponding to the LCH priority is directly proportional to the LCH priority; the larger the value corresponding to the LCH priority, the higher the LCH priority.

[0065] In the first round of the loop, if there are still UL grant resources remaining after all LCHs have used up their tokens, then the second round of the loop is executed.

[0066] In the second round of the cycle, scheduling services are provided to LCH in a strict order of decreasing priority.

[0067] In the second round of the loop, UL grant resources are allocated to each LCH after the first round according to the LCH priority, and data on each LCH is transmitted. The token count of the LCH is no longer considered in the second round. However, tokens are still consumed in the second round, but data on the LCH continues to be transmitted even when the LCH token count is 0, until the UL grant resources are exhausted or the data on the LCH is completely transmitted.

[0068] It should be understood that, in this application, providing scheduling services for LCH can mean that when a terminal device has UL data to be transmitted, after the terminal device receives the UL grant resources sent by the network device, the MAC layer of the terminal device allocates UL grant resources for the UL data to be uploaded in each LCH, and transmits the data in the LCH through the UL grant resources allocated to the LCH.

[0069] To better support XR services, the 3rd Generation Partnership Project (3GPP) launched research on uplink scheduling enhancement technologies for data. This research mainly includes: data transmission process, LCP enhancement, and dynamic spectrum reuse (DSR) enhancement.

[0070] In data transmission, the same data stream may contain data with different transmission requirements. These requirements may include, but are not limited to, latency requirements, as well as reliability requirements. Optionally, based on latency requirements, data can be divided into urgent data and non-urgent data. Urgent data contains critical information, such as keyframes, control commands, or status updates. The remaining transmission time for urgent data is less than the delay threshold (RED), meaning that urgent data needs to be transmitted within a short time to ensure real-time performance. Non-urgent data may contain less critical information, such as non-keyframes or auxiliary data. The remaining transmission time for non-urgent data is greater than the delay threshold, meaning that non-urgent data does not have high real-time requirements and can be transmitted over a longer period. The delay threshold refers to the maximum time that data awaiting transmission in the LCH can wait within that LCH; if this maximum time is exceeded, the data in the LCH can be discarded or marked.

[0071] In data transmission, PDU sets play a crucial role. A PDU set can include multiple PDUs, each corresponding to a single piece of data. After the upper-layer application creates the payload, these PDUs are carried within the payload of a single information unit generated by the application, such as a frame or video slice. Depending on the encoding and transmission method of the video frame, a video frame may be segmented into multiple Real-Time Transport Protocol (RTP) packets. If these RTP packets are organized into a PDU set, and an urgent piece of data is lost when the terminal device sends the PDU set to the network device, it will render the other data in the PDU set invalid. This makes it impossible to decode other data that depends on that data, resulting in the entire video frame being unrecoverable and impacting the user experience. Furthermore, if this PDU set is the basis for decoding other PDU sets, even more data will be lost. Moreover, the loss of a PDU set can result in the loss of several megabits (Mbits) to hundreds of Mbits of data; if this invalid data continues to be transmitted over the air interface, it will lead to a waste of resources.

[0072] To address the issue of urgent data not being transmitted in a timely manner when both urgent and non-urgent data are being transmitted simultaneously in the same data stream, one implementation involves the network device not only configuring a default priority for the Level Channel (LCH), but also allowing for additional priority configuration to raise or lower the LCH's priority. For example, assuming the default priority of an LCH is 3, the network device can adjust its priority to 5 through additional priority configuration. Thus, during the two-loop process of the terminal device using LCP to determine the data that can be transmitted for each LCH, in the first loop, if the data to be transmitted in the LCH includes urgent data, the terminal device can transmit the data according to the adjusted LCH priority.

[0073] However, this implementation still suffers from the problem of urgent data not being transmitted. The analysis is as follows: In the traditional LCP process, the first round of the loop uses a token bucket scheme. This scheme considers not only the priority of the LCH but also the number of tokens B(j) it possesses when allocating UL grant resources to the LCH. LCHs with a token count B(j) < 0 do not participate in the first round of the loop. As a result, even if the priority of an LCH with a token count B(j) < 0 is increased through additional priority configuration, it will not be provided with scheduling services in the first round of the loop because its token count B(j) < 0. The urgent data within this LCH will not receive priority transmission in the first round of the loop.

[0074] Furthermore, if other LCHs without additional priority configuration exhaust the UL grant resources allocated to the terminal device in the first round of the loop (i.e., the first round ends with no remaining UL grant resources), then the LCH with token count B(j) < 0 and additional high priority configuration will also be unable to obtain UL grant resources in the second round. This will prevent scheduling services from being provided to the LCH with token count B(j) < 0, easily leading to the loss of urgent data in the LCH with token count B(j) < 0, resulting in invalid data transmission for the entire PDU set. If this PDU set is also the decoding basis for other PDU sets, even more data will be discarded.

[0075] It should be understood that the reason why the LCH has less than 0 tokens is that the second round of LCP is based on the priority scheduling of the LCH, and does not need to consider the number of tokens held by the LCH. However, during the second round of the loop, the data contained in the LCH will still consume tokens. Therefore, this LCP method is very prone to causing the number of tokens held by the LCH to be negative. For example, after the first round of the LCP process, a certain LCH may have 3 tokens, but this LCH contains 5 packets. In the second round of the loop, these 5 packets will consume 5 tokens, resulting in the LCH having less than 0 tokens (-2) after the second round. In extreme cases, all LCHs may have less than 0 tokens at the beginning of the first round of the loop.

[0076] For example, such as Figure 1As shown, assume the terminal device includes three LCHs: LCHa, LCHb, and LCHc. The default priorities of these three LCHs are 5, 4, and 8, respectively. This is not the first time data transmission from these three LCHs has been performed. The token counts of these three LCHs are B(a) = -4, B(b) = 2, and B(c) = 4, respectively. The additional priorities configured for each LCH are 0, 2, and 0, respectively. LCHa's pending data transmission contains urgent data a1 below the delay threshold, but LCHa's token count B(a) < 0. The terminal device increases LCHa's priority through additional priority configuration, making LCHa the highest priority. LCHb and LCHc's pending data transmission only contain non-urgent data, and both LCHb and LCHc have token counts greater than 0. Although LCHa can increase its priority through additional priority configuration, its negative token count prevents it from being scheduled in the first round. After the first round of the loop, the remaining UL grant resources are allocated to data b1 and b2 in LCHb, and data c1 to c4 in LCHc. It is evident that in the first round, the UL grant resources are exhausted by the packets in LCHb and LCHc. Therefore, LCHa cannot obtain UL grant resources in the second round, resulting in the urgent packet a1 in LCHa (below the delay threshold) not being scheduled. This further leads to the invalid transmission of the packet set associated with data a1, resulting in a waste of network resources.

[0077] For example, such as Figure 2 As shown in Figure (a), the terminal devices LCHa, LCHb, LCHc, and LCHd contain data to be transmitted. The default priorities of LCHa, LCHb, LCHc, and LCHd are Priority(a), Priority(b), Priority(c), and Priority(d), respectively. Furthermore, LCHa and LCHb contain urgent data. The priority relationship among the four LCHs is: Priority(a) > Priority(b) > Priority(c) > Priority(d). LCHa, LCHb, LCHc, and LCHd possess token counts of -4, -6, 3, and 3, respectively.

[0078] Because the LCP process stipulates that LCHs with less than 0 tokens cannot participate in the first round of resource allocation, such as... Figure 2As shown in (a), LCHa and LCHb, whose token counts are less than 0, do not participate in the first round of resource allocation. After the terminal device determines that the LCHs with token counts greater than 0 are LCHc and LCHd, it first sends data c1 from the higher-priority LCHc to data c3, until the token count B(c) of LCHc drops to 0. Then, the terminal device sends data d1 from LCHd to data d3, until the token count B(d) of LCHd drops to 0. After the first round of scheduling, the remaining UL grant resource is 3.

[0079] For ease of description, the embodiments of this application assume that... Figure 2 One token allows 1 byte of data to be sent. Figure 2 The data in one square is also 1 byte of data, meaning one token allows the transmission of data in one square. Similarly, this assumption also applies to other embodiments, such as those applicable to... Figure 1 , Figures 9-17 The corresponding embodiments will not be described in detail in other embodiments.

[0080] like Figure 2 As shown in (b), in the second cycle of the LCP process, the terminal device strictly follows the priority of the LCH and transmits the data in the LCH on the UL grant resources. Since LCHa has the highest priority, LCHa transmits 3 data using the remaining UL grant resources, thus consuming the remaining UL grant resources. It is evident that the urgent data a4 in LCHa and the urgent data b1, b2, and b3 in LCHb are not transmitted.

[0081] From the above Figure 1 and Figure 2 As the example shows, there is a problem of not being able to transmit urgent data in a timely manner when sending UL data from the LCH on the UL grant resource, such as: Figure 1 The emergency data a1 in LCHa was not transmitted. Figure 2 Emergency data a4 in LCHa and emergency data b1, b2, and b3 in LCHb were not transmitted. Consequently, the datasets associated with these data were transmitted ineffectively, resulting in a waste of network resources.

[0082] In the LCP process, when urgent data is included in the data to be transmitted in the LCH, the urgent data in the LCH may not be sent to the network in a timely manner, or even be lost. In related technologies, some technicians have proposed the following methods to solve the above problems: Method 1: Increase the number of tokens held by the LCH. However, in practical scenarios, it is difficult to determine how many tokens to add to the LCH, and increasing the number of tokens may have a certain impact on service quality. For example, when the network is near or saturated, increasing the number of tokens may cause more data to compete for limited resources in the network, thereby causing or exacerbating network congestion and affecting service quality. Method 2: Increase the PBR of the LCH to infinity. However, this method will create an unfair situation for other LCHs. For example, if the terminal device has LCH1, LCH2, and LCH3 transmitting data, if the PBR of LCH1 is increased, LCH1 will send a large amount of data in a short period of time, while LCH2 and LCH3 will receive fewer resources, resulting in an uneven distribution of resources. Method 3: Increase the priority of the LCH by configuring additional priorities. However, this scheme also has the problem of allocating fewer transmission resources to other LCHs, which is unfair to them.

[0083] As can be seen from the above, there is currently no good solution to the problem that urgent data cannot be sent to the network in a timely manner, or even data loss, when the data to be transmitted in the LCH includes urgent data. Therefore, this application provides a data transmission method applied to a communication system, which includes a terminal device and a network device. The method includes: after the terminal device obtains UL grant resources configured by the network device, it performs a first operation for the target LCH containing the data to be transmitted in the terminal device's LCH; wherein the first operation includes: allocating UL grant resources to a first type of LCH with a token count greater than 0 in the target LCH according to the decreasing priority of the LCHs and sending the data in the first type of LCH; allocating UL grant resources to a second type of LCH with a token count greater than 0 but not sending the data in the second type of LCH. After performing the first operation, if the target LCH also includes a first LCH belonging to the first type of LCH, and there are no UL grant resources available for the first LCH, then the terminal device performs a second operation. The second operation includes: sending the data in the first LCH on the UL grant resource allocated for the second type LCH, that is, calling the UL grant resource allocated for the second type LCH to send the data in the first LCH so that the data in the first LCH (such as emergency data) can be transmitted in a timely manner.

[0084] In this application, the first type of LCH can refer to an LCH that includes urgent data, and the second type of LCH can refer to an LCH that does not include urgent data or an LCH that includes only non-urgent data. The first type of LCH may include one or more LCHs, and the second type of LCH may include one or more LCHs, without limitation.

[0085] In this application, the first operation can be replaced by a first loop or an updated first loop. The first operation is similar to, but different from, the first loop in the existing LCP. In the first operation, the terminal device first sends / schedules data in the first type of LCH on the UL grant resources, allocates UL grant resources only for the second type of LCH, and does not send data in the second type of LCH on the allocated UL grant resources, that is, it does not schedule data in the second type of LCH. Subsequently, if there is still an LCH belonging to the first type of LCH (which can be called the first LCH), and this LCH also includes emergency data, but there is no UL grant available for this LCH in the UL grant resources allocated to the terminal device, the data in the first LCH is sent on the UL grant resources allocated to the second type of LCH. That is, the UL grant resources allocated to the second type of LCH are used to schedule the data in the first LCH, ensuring that the emergency data in the first LCH is sent in a timely manner and avoiding the loss of emergency data.

[0086] The data transmission method provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0087] For example, the data transmission method provided in this application embodiment can be applied to any of the following communication systems: Long Term Evolution (LTE) system, Global System for Mobile Communication (GSM), 5th Generation (5G) communication system, communication systems after 5G, New Radio Access Technology (NR) system, 5.5G system or 6G system, and future communication systems, etc. Of course, the communication system may also include Universal Mobile Telecommunications System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) communication system, Terrestrial Radio Access Network system, and GSM EDGE Radio Access Network (GERAN) system for Enhanced Data Rate for GSM Evolution (EDGE) system.

[0088] Furthermore, the technical solution provided in this embodiment can also be applied to wireless communication systems involving multiple terminals, such as public land mobile network (PLMN) systems and vehicle-to-X (V2X) systems. V2X systems can include vehicle-to-network (V2N) systems, vehicle-to-vehicle (V2V) systems, vehicle-to-infrastructure (V2I) systems, vehicle-to-pedestrian (V2P) systems, long-term evolution-vehicle (LTE-V) systems, vehicle-to-everything (V2X) systems, machine-type communication (MTC) systems, Internet of Things (IoT) systems, long-term evolution-machine (LTE-M) systems, and machine-to-machine (M2M) systems, etc., without limitation.

[0089] The technical solutions of this application can be applied to various communication scenarios, such as one or more of the following communication scenarios: enhanced mobile broadband (eMBB), ultra-reliable low latency communication (URLLC), machine type communication (MTC), massive machine type communications (mMTC), D2D, V2X, and other communication scenarios.

[0090] For example, Figure 3 This is a schematic diagram of the architecture of a communication system provided in an embodiment of this application. Figure 3 As shown, the communication system 300 may include network device 310 and terminal device 320, and the number of terminal devices 320 may include one or more. For example, Figure 3 The terminal device 320 can include 4.

[0091] The terminal device 320 is a user-side entity used to receive or transmit signals, sending uplink signals to the network device 310 or receiving downlink signals from the network device 310. The terminal device 320 can be a device with wireless transceiver capabilities or a chip or chip system that can be installed in the device, allowing users to access the network and providing voice and / or data connectivity to users. The terminal device 320 can also be referred to as user equipment (UE), subscriber unit, terminal, mobile station (MS), or mobile terminal (MT), etc.

[0092] For example, the terminal device 320 may be a mobile phone, a tablet computer, or a computer with wireless transceiver capabilities. Terminal device 320 can also be a user station, mobile station, remote station, remote terminal device 320, mobile terminal device 320, user terminal device 320, wireless communication device, user agent, user device, cellular phone, cordless phone, session initiation protocol (SIP) phone, wireless local loop (WLL) station, personal digital assistant (PDA), handheld device with wireless communication capabilities, computing device, processing device connected to a wireless modem, in-vehicle device, wearable device, terminal device 320 in the Internet of Things (IoT), home appliance, virtual reality (VR) terminal, augmented reality (AR) terminal, wireless terminal in industrial control, wireless terminal in autonomous driving, wireless terminal in telemedicine, wireless terminal in smart grid, wireless terminal in smart city, wireless terminal in smart home, vehicle with vehicle-to-vehicle (V2V) communication capability, intelligent connected vehicle, and UAV-to-UAV communication. Unrestricted applications include unmanned aerial vehicles (UAVs) with U2U communication capabilities, terminal devices 320 in future networks, or terminal devices 320 in future evolved public land mobile networks (PLMNs), Wi-Fi stations (STAs), or terminal nodes (T-nodes) in satellite navigation. It is understood that terminal device 320 and the mobile user are completely independent. All user-related information can be stored in a subscriber identity module (SIM) card, which can be used on terminal device 320. Terminal device 320 can interact with network-side devices by transmitting and / or receiving signals over the air interface.

[0093] Among them, network device (ND) 310 refers to network-side equipment that provides a mobile communication network. Within the coverage area of ​​the mobile communication network provided by network device 310, one or more terminal devices 320 can access the mobile communication network and realize communication. Network device 310 is used to receive uplink signals from terminal device 320 or send downlink signals to terminal device 320 to realize functions such as resource scheduling, radio resource management, and radio access control of terminal device 320. It is a device in the radio access network (RAN) that connects terminal device 320 to the wireless network. The RAN can be connected to the core network (e.g., it can be the core network of LTE, or the core network of 5G / 6G, etc.). Network device 310 may be an evolved Node B (eNB or eNodeB) in LTE, a base station in a 5G network or a future evolved public land mobile network (PLMN), a base station supporting unilateral transmission (e.g., an uplink-only TRP or asymmetric TRP that supports uplink transmission but not downlink transmission), a broadband network gateway (BNG), an aggregation switch, or a non-3GPP access device; or network device 310 in this embodiment may also be a radio controller in a cloud radio access network (CRAN); or a transmission and reception point (TRP), or a device including a TRP, etc., and this embodiment does not specifically limit it in this way.

[0094] Optionally, the network device 310 in this application embodiment may include various forms of base stations, such as macro base stations, micro base stations (also known as small stations), relay stations, access points, etc., and this application embodiment does not specifically limit them. In this application embodiment, the device used to implement the function of the network device 310 may be the network device 310 itself, or it may be a device that can support the network device 310 in implementing the function, such as a chip system (e.g., a processing system composed of one or more chips) or a modem. The following describes the method provided in this application embodiment using the network device 310 as an example of the device used to implement the function of the network device 310.

[0095] The base station can be an evolved NodeB (eNodeB), a transmission reception point (TRP), a next-generation NodeB (gNB) in a 5G communication system, a base station in a next-generation 6G communication system, a base station in a future communication system, an access point (AP) in a WiFi system, a wireless controller, relay station, access point, vehicle-mounted equipment, wearable device, or network equipment 310 in other future communication systems. Alternatively, the network equipment 310 can also be a module or unit that performs some of the functions of a base station; for example, it can be a central unit (CU) or a distributed unit (DU). This application does not limit the specific technology or equipment form used in the network equipment 310.

[0096] In this application, the terminal device 320 includes at least one LCH. The terminal device 320 obtains the UL grant resources configured by the network device 310. Then, the terminal device 320 uses the data transmission method described in this application to send the data in the LCH (or uplink (UL) data) to the network device 310 on the UL grant resources configured by the network device 310.

[0097] Optionally, the terminal device 320 can be based on Figure 4 The protocol layer shown sends UL data to network device 310. For example... Figure 4 As shown, the protocol layers of a terminal device include: application layer, transport layer, network layer, packet data convergence protocol sublayer (PDCP), radio link control layer (RLC), MAC layer, and physical layer. The following is an explanation of each protocol layer:

[0098] The application layer includes one or more applications. The terminal device can generate UL data to be uploaded in response to the operation of one or more applications and pass the generated UL data down to the transport layer.

[0099] The transport layer receives the UL data to be uploaded from the application, divides the UL data into appropriately sized segments, and adds necessary header information to each segment, such as the source port and destination port. Then, it passes the data segments down to the network layer.

[0100] The network layer receives data segments from the transport layer, encapsulates the received data segments into data, adds an Internet Protocol (IP) header to each data segment, which may include the source IP address and the destination IP address, and then passes the encapsulated data down to the PDCP layer.

[0101] The PDCP layer receives data from the network layer, encrypts and / or protects the integrity of the data encapsulated by the network layer, adds a PDCP header to obtain the processed data, and then passes the processed data down to the RLC layer.

[0102] The RLC layer receives data (or PDCP PDUs) from the PDCP layer and further processes the data after it has been processed by the PDCP layer. The RLC layer distributes the data to different LCHs, performing processes such as segmentation, splicing, and retransmission control to obtain RLC PDUs (i.e., data on the LCH). In other words, the RLC layer can assemble PDCP PDUs into RLC PDUs. The RLC PDUs are then passed down to the MAC layer. At the MAC layer, the RLC PDU is called a MAC SDU.

[0103] The MAC layer receives MAC SDUs from the RLC layer. It then maps the MAC SDU data to the transport channel, encapsulates the MAC SDU into a MAC PDU, allocates transport resources to the MAC PDU based on the UL grant resources (or transport resources) configured by the network device for the terminal device, and passes the generated MAC PDU down to the physical layer. In this embodiment, the process of the MAC layer allocating transport resources for the MAC SDU is detailed later and will not be described in detail here.

[0104] The physical layer receives MAC PDUs from the MAC layer, maps the MAC PDUs to transport blocks, and converts the transport blocks into signals that can be transmitted over the wireless channel to send signals to network device 310 via the uplink.

[0105] The data transmission method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0106] Figure 5 This is a flowchart illustrating a data transmission method provided in an embodiment of this application. Figure 5 As shown, the method may include the following steps S501-S506.

[0107] S501, the terminal device obtains the UL grant resources configured by the network device.

[0108] When a terminal device has data to transmit, it can send a UL grant resource request message to the network device on the physical uplink control channel (PUCCH) to request UL grant resources. Upon receiving the request message, the network device can send configuration information and instruction information to the terminal device.

[0109] The configuration information is used to configure the parameters (or simply parameters) when the terminal device sends LCH data. Optionally, the configuration information may include the priority of each LCH in the terminal device (or the numerical value corresponding to the priority of the LCH), the latency threshold for data transmission in the LCH, and token bucket-related parameters, etc. Token bucket-related parameters refer to the parameters used by the terminal device during the execution of the token bucket algorithm, such as PBR, BSD, and the number of tokens.

[0110] The indication information is used to indicate the UL grant resources for transmitting data. UL grant resources refer to uplink granted UL grant resources. The indication information may include UL grant resource allocation information, such as the location of the resource block (RB), the transmission time location (time slot or frame), the transmission format (such as modulation and coding scheme), and the transmission power control commands.

[0111] In the embodiments of this application, such as Figure 6 As shown, the network device can configure a priority for each LCH, a corresponding token bucket and related parameters (such as PBR, BSD, and token count) for each LCH, and corresponding variables for each LCH. These LCH-specific variables record the number of UL grant resources allocated to that LCH. The network device can also determine a target LCH that meets preset transmission conditions (e.g., the transmitted data format is a preset transmission format, and it has error detection and correction capabilities). This target LCH is the target LCH for the data to be transmitted in the terminal device's LCH list.

[0112] Optionally, the network device can send configuration information to the terminal device via radio resource control (RRC) signaling. After receiving the configuration information from the network device, the terminal device performs corresponding configuration based on the parameters included in the configuration information.

[0113] Optionally, after receiving a request message from the terminal device requesting UL grant resources, the network device can send indication information to the terminal device via the physical downlink control channel (PDCCH) to indicate the UL grant resources used by the terminal device for transmitting UL data in the LCH. For example, the network device can indicate the UL grant resources to the terminal device via the PDCCH, and after receiving the UL grant resources, the terminal device can transmit the data in the target LCH on the UL grant resources.

[0114] In this embodiment, the initial value of the token count for the target LCH configured by the terminal device is 0. After receiving the indication information sent by the network device, the terminal device updates the token count for each LCH. The updated token count of the LCH is the token count before the update plus the product of the token filling rate and the token bucket update time interval.

[0115] It should be understood that if the number of tokens before an LCH update plus the product of the token filling rate and the token bucket update time interval is greater than the product of the token filling rate and the token bucket depth, then the number of tokens after the LCH update is the product of the token filling rate and the token bucket depth.

[0116] For example, after receiving the instruction information from the network device, the terminal device can update the token count of the LCH using the following formula (1).

[0117] B(j)=B 1 (j)+PBR(j)ⅹT Formula (1)

[0118] Where B(j) represents the updated number of tokens in the token bucket of LCHj, B 1 (j) represents the number of tokens in the token bucket of LCHj before the update, PBR(j) represents the token filling rate of LCHj, and T represents the time interval for token bucket updates.

[0119] Assuming the terminal device determines the number of tokens B(j) of LCHj using formula (1) above, which is greater than PBR(j) × BSD, then the terminal device determines the number of tokens B(j) of LCHj as = PBR(j) × BSD. Here, PBR(j) × BSD represents the maximum number of tokens that the token bucket of LCHj can accumulate within the BSD time interval. That is, the maximum number of bytes that LCHj can transmit within the BSD time interval.

[0120] Furthermore, after the terminal device obtains the UL grant resources configured by the network device, it can execute the data transmission method described in this application to transmit LCH data on the UL grant resources configured by the network device. Specifically, the data transmission method may include S502-S506:

[0121] S502, for the target LCH of the LCH to be sent in the terminal device, perform a first operation, wherein the first operation includes: allocating ULgrant resources to the first type of LCH with a token number greater than 0 in the order of decreasing LCH priority and sending the data in the first type of LCH; allocating UL grant resources to the second type of LCH with a token number greater than 0 but not sending the second type of LCH data.

[0122] In this embodiment, for a target LCH containing data to be transmitted in the LCH of a terminal device, the terminal device can determine whether each LCH in the target LCH belongs to a first type of LCH or a second type of LCH. Optionally, the terminal device can determine the remaining transmission time of the data in each LCH in the target LCH, and determine whether the data in each LCH includes urgent data by judging whether the remaining transmission time of the data in the LCH is less than a delay threshold. Then, the terminal device determines whether the LCH belongs to a first type of LCH or a second type of LCH based on whether the data in the LCH includes urgent data. If the terminal device determines that the data in the LCH includes data with a remaining transmission time less than the delay threshold, then the terminal device determines that the data in the LCH includes urgent data. The LCH belongs to a first type of LCH. In this case, the terminal device sets the identification information of the LCH to a first value. If the terminal device determines that the remaining transmission time of the data in all LCHs is greater than the delay threshold, then the terminal device determines that the data included in the LCH is all non-urgent data. The LCH belongs to a second type of LCH. In this case, the terminal device sets the identification information of the LCH to a second value. The LCH identification information mentioned above is used to indicate whether the data in the LCH includes emergency data.

[0123] For example, if the terminal device determines that the data in LCHa includes emergency data and the data in LCHb does not include emergency data, then the terminal device can set the identification information (DM) of LCHa to DM(a) = 1 and the identification information of LCHb to DM(b) = 0.

[0124] It should be understood that in this embodiment, the specific value of the LCH identification information is not limited. If the terminal device determines that the data in the LCH includes emergency data, the LCH identification information can be set to other values. Similarly, if the terminal device determines that the data in the LCH does not include emergency data, the LCH identification information can be set to other values. For example, if the LCH identification information is 0, the identification information indicates that the data in the LCH includes emergency data, and the LCH belongs to the first type of LCH. Or, if the LCH identification information is 1, the identification information indicates that the data in the LCH does not include emergency data, and the LCH belongs to the second type of LCH.

[0125] like Figure 7 As shown, after receiving the indication information sent by the network device, the terminal device updates the token count of the LCH. Then, the terminal device determines the remaining transmission time of the data in the LCH. In one case, if the terminal device determines that there is data in the LCH with a remaining transmission time less than the delay threshold, the terminal device determines that the data in the LCH includes urgent data, and the LCH is a Type 1 LCH. In another case, it is still as follows... Figure 7 As shown, if the terminal device determines that there is no data in the LCH with a remaining transmission time less than the delay threshold, then the terminal device determines that the data in the LCH does not include urgent data, and the LCH is a second type of LCH.

[0126] In this embodiment of the application, when the target LCH includes a first type LCH and a second type LCH, the terminal device searches for the first type LCH with a token count greater than 0 in the target LCH.

[0127] In one scenario, if the terminal device does not find a first-type LCH with a token count greater than 0 in the target LCH (i.e., all first-type LCHs included in the target LCH are first-type LCHs with a token count less than 0), the terminal device allocates UL grant resources for second-type LCHs with a token count greater than 0 but does not send second-type LCH data. Then, the terminal device continues to execute subsequent S503; the specific implementation process will be discussed later and will not be described in detail here.

[0128] In another scenario, if the terminal device finds a Type I LCH with a token count greater than 0 in the target LCH, the terminal device performs the first operation: it allocates UL grant resources to the Type I LCHs with a token count greater than 0 in descending order of LCH priority, and sends the data from the Type I LCHs on the allocated UL grant resources until the token count of the Type I LCHs is updated to 0 or the data in the Type I LCHs is completely sent. Afterward, the terminal device allocates UL grant resources to the Type II LCHs with a token count greater than 0 in descending order of LCH priority, but does not send the data from the Type II LCHs. In one case, after the terminal device sends the data from the Type I LCHs on the UL grant resources, there may be a situation where the token counts of all Type I LCHs are updated to 0, but the data in the Type I LCHs has not been completely sent; that is, there may still be remaining data in the Type I LCHs.

[0129] For example, such as Figure 8 As shown in (a), assume the network device configures 12 UL grant resources for the terminal device, and one data item can occupy one UL grant resource. The terminal device has data to be transmitted in LCHa, LCHb, LCHc, and LCHd. LCHa, LCHb, and LCHc all contain urgent data, and LCHa, LCHb, and LCHc belong to the first type of LCH. LCHd does not contain urgent data and belongs to the second type of LCH. The priority order of these four LCHs is: Priority(a)>Priority(b)>Priority(c)>Priority(d). Currently, the token counts of LCHa, LCHb, LCHc, and LCHd are -4, -6, 3, and 3, respectively. The terminal device first sends data from LCHc with a token count greater than 0 on the UL grant resource until the token count of LCHc is 0. That is, the terminal device can send data c1, data c2, and data c3 from LCHc on the UL grant resource. However, there is still data in LCHc that has not been sent.

[0130] In another scenario, after the terminal device sends the data in the first type of LCH on the UL grant resource, there may be a situation where the data in the first type of LCH is completely sent before the token count of the first type of LCH is updated to 0.

[0131] For example, such as Figure 9As shown in (a), assume the network device configures 15 UL grant resources 1 for the terminal device, and one data item can occupy one UL grant resource. The terminal device includes LCHa, LCHb, LCHc, and LCHd. Currently, the token counts of LCHa, LCHb, LCHc, and LCHd are -4, -6, 4, and 3, respectively, and their priorities are Priority(a)>Priority(b)>Priority(c)>Priority(d). The terminal device performs the first operation, determines that LCHc has the highest priority among those with a token count greater than 0, allocates three resources from UL grant resource 1 to data c1 to c3 of LCHc, and then sends data c1 to c3 of LCHc on the allocated resources. The data in LCHc is completely sent. The token count of LCHc is updated to B(c) = 1. After allocating three resources from UL grant resource 1 to LCHc, the remaining 12 resources are called UL grant resource 2.

[0132] Optionally, if there are multiple LCHs with tokens greater than 0 in the first type of LCH, the terminal device can send the data in the first type of LCH on the UL grant resource in descending order of priority of the multiple LCHs, until the token count of the first type of LCH is updated to 0 or the data in the first type of LCH is completely sent.

[0133] During the process of the terminal device sending data from the first type of LCH on the UL grant resource, the terminal device updates the token count of the first type of LCH. The token count of each LCH in the first type of LCH is determined based on the value of the token count of the LCH before the first operation and the execution result of the first operation. Optionally, the token count of each LCH in the first type of LCH is the difference between the value before the first operation and the amount of data already sent by the LCH. For example, Figure 9 In Figure (a), the token count of LCHc before the first operation is B(c) = 4. The number of data sent by LCHc before the first operation is 3. After the first operation, the token count of LCHc is B(c) = 1.

[0134] In this embodiment, after the terminal device sends data from the first type of LCH on the UL grant resource, the terminal device allocates UL grant resources for the second type of LCH with a token count greater than 0, until the token count of the second type of LCH is updated to 0 or all data in the second type of LCH is allocated to the UL grant resource. However, the terminal device does not send data from the second type of LCH on the UL grant resource. After allocating UL grant resources for the second type of LCH with a token count greater than 0, the terminal device can use a variable to record the number of UL grant resources allocated to the second type of LCH. For example, the terminal device can use the variable `grant` to record the number of UL grant resources.

[0135] Furthermore, during the process of allocating UL grant resources to the second type of LCH with a token count greater than 0 by the terminal device, the token count of the second type of LCH will be consumed. However, since the terminal device only allocates UL grant resources to the second type of LCH and does not send data on the allocated UL grant resources, the terminal device can restore the token count of each LCH in the second type of LCH to the value at the time of performing the first operation, so that the terminal device can subsequently send data in the second type of LCH based on the updated token count of the second type of LCH. Of course, the token counts of other LCHs in the target LCH, excluding the first and second type of LCHs, remain unchanged.

[0136] For example, such as Figure 8 As shown in (b), the terminal device allocates UL grant resources to LCHd until the token count of LCHd is updated to 0. The terminal device records grant(d) = 3. That is, the terminal device allocates 3 resources to LCHd. The terminal device updates the token count of LCHd again to B(d) = 3.

[0137] Optionally, when the second type of LCH includes multiple LCHs, the terminal device can allocate corresponding UL grant resources to the multiple LCHs in descending order of priority from the UL grant resources. After allocating corresponding UL grant resources to the multiple LCHs, the terminal device records the number of UL grant resources allocated to each of the multiple LCHs, and updates the token count of the multiple LCHs to the count before allocating the UL grant resources.

[0138] S503, the terminal device determines whether the target LCH also includes a first LCH belonging to the first type of LCH, and whether there is no UL grant resource available for the first LCH.

[0139] In this embodiment of the application, after the terminal device performs the first operation, it determines whether the target LCH also includes a first LCH belonging to the first type of LCH, and whether there are still UL grant resources available for the first LCH. The terminal device determines that the first LCH belonging to the first type of LCH includes a first LCH with a token count of 0 and / or a first LCH with a token count less than 0.

[0140] In one scenario, the terminal device determines that the target LCH also includes a first LCH belonging to the first type of LCH, and there is no UL grant resource available for the first LCH. The terminal device then proceeds to perform the second operation, i.e., executes S504.

[0141] In another scenario, if the terminal device determines that there are remaining UL grant resources, it will proceed with the third operation, namely, executing S505. Optionally, after executing S505, S506 may also be executed.

[0142] It should be understood that the above statement that there are no UL grant resources available for the first LCH means that the UL grant resources allocated to the terminal device have been exhausted, or that there are still UL grant resources remaining but the first LCH cannot be sent on the remaining UL grant resources because the tokens are less than 0.

[0143] S504, the terminal device performs a second operation, wherein the second operation includes: sending data in the first LCH on the ULgrant resource allocated for the second type of LCH.

[0144] In this embodiment of the application, if the terminal device determines that the target LCH also includes a first LCH belonging to the first type of LCH, and there is no UL grant resource available for the first LCH, the terminal device can perform a second operation, that is, the terminal device sends the data in the first LCH on the UL grant resource allocated for the second type of LCH, until the UL grant resource allocated for the second type of LCH is exhausted or the data in the first LCH is completely sent.

[0145] In one implementation, when the target LCH includes multiple first LCHs belonging to the first type of LCH, the terminal device can allocate the UL grant resources allocated to the second type of LCH to the first LCH in ascending order of the number of tokens of the multiple first LCHs, and send the data in the first LCH.

[0146] In one scenario, after the terminal device allocates the UL grant resources allocated to the second type LCH to the first LCH, the UL grant resources allocated to the second type LCH are just exhausted.

[0147] For example, such as Figure 10 As shown in (a), assume the network device configures 9 UL grant resources for the terminal device, and one data item can occupy one UL grant resource. The terminal device includes LCHa, LCHb, LCHc, and LCHd. Currently, the token counts of LCHa, LCHb, LCHc, and LCHd are -6, -4, 4, and 6, respectively, with priorities of Priority(a)>Priority(b)>Priority(c)>Priority(d). The terminal device executes the first round of loop, determines LCHc with the highest priority among those with a token count greater than 0, allocates three resources from UL grant resource 1 to data c1 to c3 of LCHc, and then sends data c1 to c3 of LCHc on the allocated resources. After that, the token count of LCHc is updated to B(c) = 1. After allocating three resources from UL grant resource 1 to data c1 to c3 of LCHc, the remaining 6 resources are called UL grant resource 2.

[0148] Next, as Figure 10 As shown in (b), the terminal device continues to search for LCHd, which has a token count greater than 0 and the second highest priority. The terminal device allocates all 6 tokens from UL grant resource 2 to LCHd, and UL grant resource 2 is exhausted. The UL grant resources subsequently allocated to LCHd are referred to as UL grant resource 3. The terminal device records grant(d) = 6. The first round of the loop ends here.

[0149] Next, all 9 UL grants were used up, leaving no resources remaining. Figure 10 As shown in (c), the target LCH also includes LCHa and LCHb with tokens less than 0 and containing urgent data. In this case, the terminal device can utilize the UL grant resource 3 allocated to LCHd to send data from LCHa and LCHb with tokens less than 0 and containing urgent data. Specifically, since the number of tokens in LCHa is less than the number of tokens in LCHb, the terminal device first sends data a1 to a4 from LCHa on the UL grant resource 3 allocated to LCHd, then sends data b1 and b2 from LCHb, until the UL grant resource 3 is exhausted, i.e., grant(d) is updated to 0. Afterward, the token counts of LCHa and LCHb are updated to B(a) = -10 and B(b) = -6, respectively.

[0150] Therefore, it can be seen that after the terminal device sends data from the first type of LCH with a token greater than 0 on the UL grant resource and allocates the remaining UL grant resource to the second type of LCH, and the UL grant resource is exhausted, the terminal device can send the urgent data from the first type of LCH on the UL grant resource allocated to the second type of LCH. This ensures that the urgent data in the first type of LCH is sent in a timely manner, avoids the loss of urgent data, and prevents the invalid transmission of the dataset associated with the urgent data, which would result in a waste of network resources.

[0151] In another scenario, after the terminal device allocates UL grant resources allocated to the Type 2 LCH to the Type 1 LCH, there are still UL grant resources remaining for the Type 2 LCH. In this case, the terminal device can continue to transmit data from the Type 2 LCH on the UL grant resources. Therefore, by promptly transmitting urgent data from the LCH to the network on the UL grant resources before transmitting non-urgent data, the terminal device avoids the loss of urgent data, preventing further data invalidation, and also avoids the problem of wasting UL grant resources when they are plentiful.

[0152] For example, such as Figure 11 As shown in Figure (a), assume that the network device configures 9 UL grant resources for the terminal device, and one data item can occupy one UL grant resource. The terminal device includes LCHa, LCHb, LCHc, and LCHd. Currently, the token counts of LCHa, LCHb, LCHc, and LCHd are -6, -4, 1, and 8, respectively, with priorities of Priority(a)>Priority(b)>Priority(c)>Priority(d). The terminal device executes the first round of loop, determines LCHc with the highest priority among those with a token count greater than 0, and allocates one resource from UL grant resource 1 to data c1 of LCHc. Afterward, the token count of LCHc is updated to B(c) = 0. After allocating one resource from UL grant resource 1 to data c1 of LCHc, the remaining 8 resources are called UL grant resource 2.

[0153] Next, as Figure 11 As shown in (b), the terminal device continues to search for LCHd with a token count greater than 0 and the second highest priority. The terminal device allocates all 8 resources in UL grant resource 2 to LCHd, and UL grant resource 2 is fully allocated. The terminal device records grant(d) = 8.

[0154] Next, all 9 UL grants were used up, leaving no resources remaining. Figure 11As shown in (c), the target LCHs further include LCHa and LCHb where the token is less than 0 and which include emergency data. In this case, the terminal device may invoke the UL grant resource allocated for LCHd to send data of LCHa and LCHb where the token is less than 0 and which include emergency data. Specifically, since the order of the token numbers of LCHa and LCHb from smallest to largest is B(a)<B(b), the terminal device first sends data a1 to data a4 in LCHa on the UL grant resource allocated to LCHd, then sends data b1 and data b2 in LCHb until all data of LCHa and LCHb are completely sent. Thereafter, the token numbers of LCHa and LCHb are updated to B(a) = -10 and B(b) = -6 respectively. Since there are still 2 remaining resources in the UL grant resource allocated to LCHd, the terminal device may invoke the 2 resources to send data d1 and data d2 in LCHd until the UL grant resource is exhausted.

[0155] S505, after the terminal device performs the first operation, if there is still remaining UL grant resource, the terminal device performs a third operation, wherein the third operation comprises: allocating UL grant resources to first-type LCHs according to priorities of the first-type LCHs and sending remaining data in the first-type LCHs.

[0156] In the embodiments of the present application, after the terminal device performs the first operation, in a case that the terminal device determines that there is remaining UL grant resource, the terminal device performs the third operation, that is, the terminal device allocates UL grant resources to first-type LCHs according to priorities of the first-type LCHs and sends remaining data in the first-type LCHs until the UL grant resource is completely allocated or all data in the first-type LCHs is completely sent.

[0157] It should be understood that, during the process of performing the third operation, when the terminal device allocates UL grant resources to first-type LCHs according to priorities of the first-type LCHs, it is not necessary to consider the token numbers of the first-type LCHs, until the UL grant resource is completely allocated or all data in the first-type LCHs is completely sent. For example, assuming that after the terminal device performs the first operation, a token number of a first-type LCH is 2, the first-type LCH further includes 5 pieces of data, and the remaining UL grant resource is 8 resources, then the terminal device can completely send the 5 pieces of data in the first-type LCH on the UL grant resource, and after completely sending the 5 pieces of data in the first-type LCH, the token number of the first-type LCH is updated to -3.

[0158] For example, still as Figure 9As shown in (b), the terminal device allocates three resources in UL grant resource 2 for the data in LCHd. These three resources allocated to LCHd will subsequently be referred to as UL grant resource 4, and the resources in UL grant resource 2 other than UL grant resource 4 will be referred to as UL grant resource 3. The terminal device records grant(d) = 3. Figure 9 As shown in (c), the terminal device transmits the data in LCHa and LCHb sequentially on UL grant resource 3 in descending order of priority. That is, the terminal device transmits data a1 to a5 from LCHa and data b1 to b3 from LCHb sequentially on UL grant resource 3. After transmitting the data in LCHa and LCHb on UL grant resource 3, the token counts for LCHa and LCHb are updated to B(a) = -9 and B(b) = -9, respectively.

[0159] In one implementation, after the terminal device allocates UL grant resources to the first type of LCH according to its priority and completely transmits the remaining data in the first type of LCH, if there are still remaining UL grant resources, the terminal device can transmit the data in the second type of LCH according to the priority of the second type of LCH on the remaining UL grant resources until the UL grant resources are exhausted or the data in the second type of LCH is completely transmitted. If the UL grant resources are exhausted before the data in the second type of LCH is completely transmitted, the terminal device can continue to transmit the data in the second type of LCH on the UL grant resources allocated for the second type of LCH.

[0160] For example, such as Figure 9 As shown in diagram (d), after the terminal device sends data b1 from LCHb on UL grant resource 5, there is still data remaining in LCHd. The terminal device sends data d2, d3, and d4 from LCHd on UL grant resource 4 until grant(d) = 0. During the process of sending data from LCHd on UL grant resource, the terminal device updates the token count of LCHd, and the updated token count B(d) = -1.

[0161] S506, if the target LCH also includes the first LCH belonging to the first type of LCH, and the UL grant resources have been fully allocated, then execute the second operation.

[0162] In this embodiment of the application, after the terminal device performs the third operation, if the target LCH also includes a first LCH belonging to the first type of LCH, and the UL grant resources are fully allocated, then the terminal device performs the second operation described above, that is, the terminal device sends the data in the first LCH on the UL grant resources allocated for the second type of LCH.

[0163] The following is combined Figure 12 The implementation process of S501 to S506 above and the changes in the number of tokens of LCH are illustrated by example. Figure 12 A flowchart illustrating another data transmission method provided in this application embodiment is shown below. Figure 12 As shown, the process may include the following steps:

[0164] S1, after receiving the UL grant resource configured by the network device, the terminal device updates the token count B(j) of each LCH in the target LCH.

[0165] S2, the terminal device determines whether the number of tokens B(j) is greater than the maximum number of tokens.

[0166] S3, the terminal device determines that the number of tokens B(j) is equal to the maximum number of tokens.

[0167] S4, the terminal device determines the remaining transmission time of data in each LCH.

[0168] S5, the terminal device determines whether there is data in the LCH with a remaining transmission time less than the delay threshold.

[0169] S6, the terminal device determines that the LCH belongs to the first type of LCH. Otherwise, it determines that the LHC belongs to the second type of LCH.

[0170] For details on how a terminal device determines whether an LCH belongs to the first type or the second type of LCH implementation, please refer to the above-mentioned... Figure 7 The description.

[0171] S7, for the first type of LCH with a token count greater than 0, the terminal device sends the data in the first type of LCH in descending order of LCH priority until the token count is 0 or the data in the LCH has been sent.

[0172] S8, the terminal device records the number of all LCH tokens of the second type with a token count greater than 0, i.e., M(k) = B(k).

[0173] S9, for the second type of LCH with a token count greater than 0, the terminal device allocates UL grant resources but does not send data of the second type of LCH in descending order of LCH priority, until the token count is 0 or the data in the LCH is scheduled to be completed, records the amount of resources consumed, and writes it to grant(k).

[0174] S10, the terminal device restores the token count of the second type LCH with a token count greater than 0 to the token count before resource allocation, i.e., B(k) = M(k).

[0175] For details on the implementation of S7 to S9, please refer to the implementation of S502 above, which will not be repeated here.

[0176] S11, the terminal device determines whether there are any remaining UL grant resources.

[0177] If the terminal device determines that there are still UL grant resources remaining, it continues to execute S12 and S13. Otherwise, the terminal device executes S16 and S17.

[0178] S12, the terminal device sends the data in the first type LCH in descending order of LCH priority for all first type LCHs until the data in the LCH is sent out or the UL grant resource is consumed.

[0179] S13, the terminal device updates the token count B(j) of the first type of LCH to B(j)-N. Where N is the number of bytes of data in LCHj sent on the UL grant resource.

[0180] For details on the implementation of S12 and S13, please refer to the implementation of S505 above, which will not be repeated here.

[0181] S14, the terminal device determines whether there are any remaining UL grant resources.

[0182] For all Type I LCHs, the terminal device sends the data in the Type I LCHs on the UL grant resources in descending order of LCH priority. If there are still remaining UL grant resources after consumption, then S15 is executed.

[0183] If the UL grant resources are exhausted, but the target LCH still contains a first-class LCH including the first LCH, then execute S16.

[0184] Optionally, in step S15, the terminal device sends data in the second type LCH in descending order of LCH priority for all second type LCHs until all data in the LCHs has been sent or the UL grant resources have been consumed.

[0185] S16, for the first type of LCH that still includes the first LCH, the terminal device performs a preemption operation in ascending order of the number of tokens in the LCH, that is, it sends the data in the first LCH on the UL grant resources allocated for the second type of LCH.

[0186] For details on the implementation of S16, please refer to the implementation of S504 above; it will not be repeated here.

[0187] S17, the terminal device updates the token count B(j) of the LCH that performed the preemption operation to B(j)-N.

[0188] S18, the terminal device determines whether there are any remaining UL grant resources allocated for the second type of LCH.

[0189] If the terminal device determines that the UL grant resources allocated for the second type LCH have been exhausted, the scheduling ends. If the terminal device determines that there are still UL grant resources remaining for the second type LCH, then proceed to step S19.

[0190] S19, the terminal device determines whether the second type of LCH includes data.

[0191] If the terminal device determines that the second type of LCH still includes data, then execute S20.

[0192] S20, the terminal device sends data from the second type LCH until the UL grant resources allocated for the second type LCH are exhausted.

[0193] If the terminal device determines that there are still remaining UL grant resources allocated for the second type LCH, and the second type LCH still contains data, the terminal device will send the data in the second type LCH on the UL grant resources.

[0194] S21, the terminal device updates the token count B(K) of the second type LCH to B(K)-M. Where M is the number of bytes of data in the second type LCH sent by the terminal device on the ULgrant resource.

[0195] Optionally, in the above embodiments, the terminal device determines that the data transmission process may have the following situations based on whether the first type of LCH with a token greater than 0 in the target LCH has been completely sent after the first operation is performed, and the allocation of UL grant resources.

[0196] In the first scenario, after the terminal device performs the first operation, if it determines that there are remaining UL grant resources and the data in the first type of LCH with a token greater than 0 in the target LCH has been completely sent, the terminal device allocates UL grant resources for the first type of LCH with a token less than 0 according to the LCH priority order, and sends the data in the first type of LCH with a token less than 0. If the terminal device has completely sent the data in the first type of LCH with a token less than 0 on the UL grant resources, and there are still remaining UL grant resources, the terminal device can send the data in the second type of LCH on the UL grant resources.

[0197] In the second scenario, after performing the first operation, if the terminal device determines that there are remaining UL grant resources and all data in the first type of LCH with a token greater than 0 has been completely sent, the terminal device allocates UL grant resources for the first type of LCH with a token less than 0 and sends the data in the first type of LCH with a token less than 0. If the terminal device determines that the UL grant resources have been fully allocated, and the target LCH still includes the first type of LCH with a token less than 0 and includes urgent data in the first type of LCH with a token less than 0, the terminal device can send the remaining data in the first type of LCH with a token less than 0 on the UL grant resources allocated for the second type of LCH, until the UL grant resources allocated for the second type of LCH are exhausted or the remaining data in the first type of LCH has been completely sent.

[0198] Optionally, after the terminal device sends the remaining data in the first type LCH with a token less than 0 on the UL grant resources allocated for the second type LCH, the data in the first type LCH with a token less than 0 is completely sent, and there are still UL grant resources allocated for the second type LCH remaining. In this case, the terminal device can continue to send data in the second type LCH on the UL grant resources allocated for the second type LCH until the UL grant resources allocated for the second type LCH are exhausted.

[0199] It should be understood that the terminal device allocates UL grant resources for the second type of LCH based on the number of tokens in the second type of LCH. Therefore, the total data that can be transmitted using the UL grant resources allocated for the second type of LCH is less than or equal to the data included in the second type of LCH. Consequently, after the terminal device sends the remaining data in the first type of LCH with tokens less than 0 on the UL grant resources allocated for the second type of LCH, the total data that can be transmitted using the UL grant resources allocated for the second type of LCH is less than the data in the second type of LCH. In this case, the terminal device sends the data in the second type of LCH on the UL grant resources allocated for the second type of LCH until the UL grant resources allocated for the second type of LCH are exhausted, at which point the terminal device ends the data transmission process.

[0200] Furthermore, the terminal device can only send a portion of the data in the Type 2 LCH on the UL grant resources allocated for it. There will still be remaining data in the Type 2 LCH, which the terminal device can send in the next round of transmission. Since the data in the Type 2 LCH is all non-urgent, the subsequent transmission of the remaining data in the Type 2 LCH by the terminal device has little, if any, impact on the terminal device's service quality requirements.

[0201] In this embodiment of the application, during the process of the terminal device sending data in the second type of LCH on the UL grant resource allocated for the second type of LCH, the token count of the second type of LCH is updated. The specific token count update process is described above and will not be repeated here.

[0202] The following is based on Figure 13 The example provided illustrates the process by which a terminal device sends data from the target LCH on a UL grant resource in the above-mentioned situation.

[0203] For example, such as Figure 13As shown in (a), assume the network device configures 12 UL grant resources for the terminal device, and one data item can occupy one UL grant resource. The terminal device includes LCHa, LCHb, LCHc, and LCHd. Currently, the token counts of LCHa, LCHb, LCHc, and LCHd are -4, -6, 4, and 3, respectively, with priorities of Priority(a)>Priority(b)>Priority(c)>Priority(d). The terminal device executes the first round of loop, determining LCHc, which has the highest priority among those with a token count greater than 0, and allocating 3 resources from UL grant resource 1 to data c1 to c3 of LCHc. Afterward, the token count of LCHc is updated to B(c) = 1. It can be seen that the data in LCHc is completely sent. After allocating the remaining 9 resources from UL grant resource 1 to the data in LCHc, they are called UL grant resource 2.

[0204] Next, as Figure 13 As shown in (b), the terminal device continues to search for LCHd, which has a token count greater than 0 and the second highest priority. The terminal device allocates 3 resources from UL grant resource 2 to LCHd. The 3 resources subsequently allocated to LCHd are referred to as UL grant resource 4, and the remaining resources after allocation to LCHd are referred to as UL grant resource 3. Next, as... Figure 13 As shown in (c), since LCHa has a higher priority than LCHb, the terminal device sequentially sends data from LCHa and LCHb on UL grant resource 3 until UL grant resource 3 is exhausted. That is, the terminal device sequentially sends data a1 to a5 from LCHa and data b1 from LCHb on UL grant resource 3. After the terminal device sends the data from LCHa and LCHb on UL grant resource 3, the token counts of LCHa and LCHb are updated to B(a) = -9 and B(b) = -7, respectively.

[0205] Since all 12 UL grants have been used up and there are no remaining resources, such as Figure 13As shown in (d), the target LCH also includes LCHb with tokens less than 0 and containing urgent data. At this point, the UL grant resource 4 allocated to LCHd can be preempted / called to send data from LCHb with tokens less than 0 and containing urgent data. Specifically, after the terminal device sends data b2 and data b3 from LCHb on UL grant resource 4, there is still one remaining resource on UL grant resource 4. The terminal device can use this remaining resource to send data d1 from LCHd until the UL grant resource is exhausted. Afterward, the token count of LCHb is updated to B(b) = -9, and the token count of LCHd is updated to B(d) = 2.

[0206] In the third scenario, after the terminal device performs the first operation, if it determines that there are remaining UL grant resources and the data in the first type of LCH with a token greater than 0 has not been completely sent (i.e., there is remaining data), the terminal device can allocate UL grant resources according to the LCH priority for the first type of LCH with tokens less than 0 and tokens greater than 0, and send the remaining data in the first type of LCH. If the terminal device completely sends the remaining data in the first type of LCH on the UL grant resources, and the UL grant resources are not exhausted, the terminal device can send data in the second type of LCH on the UL grant resources.

[0207] During the process of the terminal device sending data in the first type of LCH on the UL grant resource, the terminal device updates the token count of the first type of LCH. The specific token count update process is described in the above embodiment and will not be repeated here.

[0208] The following is based on Figure 14 The example provided illustrates the process by which a terminal device sends data from the target LCH on a UL grant resource in the above-mentioned situation.

[0209] For example, such as Figure 14As shown in (a), assume the network device configures 15 UL grant resources for the terminal device, and one data item can occupy one UL grant resource. The terminal device includes LCHa, LCHb, LCHc, and LCHd. Currently, the token counts of LCHa, LCHb, LCHc, and LCHd are -4, -6, 1, and 3, respectively, with priorities of Priority(a)>Priority(b)>Priority(c)>Priority(d). The terminal device executes the first round of loop, determining LCHc, which has the highest priority among those with a token count greater than 0, and allocates one resource from UL grant resource 1 to data c1 of LCHc. Afterward, the token count of LCHc is updated to B(c) = 0. It can be seen that the data in LCHc is not completely sent. After allocating one resource from UL grant resource 1 to the data in LCHc, the remaining 14 resources are called UL grant resource 2.

[0210] Next, as Figure 14 As shown in (b), the terminal device continues to find LCHd with a token count greater than 0 and the second highest priority. The terminal device allocates 3 resources from UL grant resource 2 to LCHd. The 3 resources subsequently allocated to LCHd are called UL grant resource 3, and the remaining 10 resources after being allocated to LCHd are called UL grant resource 4.

[0211] Next, as Figure 14 As shown in (c), since Priority(a) > Priority(b) > Priority(c), the terminal device allocates 5 portions of UL grant resource 4 to LCHa, 3 portions to LCHb, and 2 portions to LCHc. That is, it sequentially sends data a1 to a5 from LCHa, data b1 to b3 from LCHb, and data C2 and c3 from LCHc on UL grant resource 4. Afterwards, the token counts for LCHa, LCHb, and LCHc are updated to B(a) = -9, B(b) = -9, and B(c) = -2, respectively. Since there is still 1 portion of UL grant resource remaining, as... Figure 14 As shown in (d), the terminal device can call this resource to send data d1 in LCHd.

[0212] Since data d2 to d4 in LCHd were not sent, the terminal device can allocate 3 resources from UL grant resource 3 to LCHd, and UL grant resource 3 is exhausted. Afterwards, the token count of LCHd is updated to B(d) = -1.

[0213] As can be seen, the terminal device first sends the remaining data in the first type of LCH on the UL grant resource, and then sends the data in the second type of LCH if there is still remaining UL grant resource. This ensures that all urgent data is sent to the network before non-urgent data is sent, avoiding the loss of urgent data and the resulting invalidation of more data.

[0214] In the fourth scenario, after the terminal device performs the first operation, if it determines that there are remaining UL grant resources and the data in the first type of LCH with a token greater than 0 has not been completely sent (i.e., there is remaining data), the terminal device can allocate UL grant resources to the first type of LCHs with tokens less than 0 and greater than 0 according to the LCH priority, and send the remaining data in the first type of LCH. If the target LCH still includes the first LCH belonging to the first type of LCH, the terminal device can send the data in the first LCH on the UL grant resources allocated for the second type of LCH.

[0215] Optionally, the terminal device may send data from the first LCH on the UL grant resources allocated for the second type LCH until the UL grant resources allocated for the second type LCH are exhausted.

[0216] For example, such as Figure 15 As shown in (a), assume the network device configures 12 UL grant resources for the terminal device, and one data item can occupy one UL grant resource. The terminal device includes LCHa, LCHb, LCHc, and LCHd. Currently, the token counts of LCHa, LCHb, LCHc, and LCHd are -4, -6, 3, and 3, respectively, with priorities of Priority(a)>Priority(b)>Priority(c)>Priority(d). The terminal device executes the first round of loop, determining LCHc, which has the highest priority among those with a token count greater than 0, and allocating 3 resources from UL grant resource 1 to data c1 to c3 of LCHc. Afterward, the token count of LCHc is updated to B(c) = 0. It can be seen that the data in LCHc is not completely sent. Subsequently, after allocating 1 resource from UL grant resource 1 to data c1 to c3 of LCHc, the remaining 9 resources are called UL grant resource 2.

[0217] Next, as Figure 15As shown in (b), the terminal device continues to find LCHd, which has a token count greater than 0 and the second highest priority. The terminal device then allocates 3 resources from UL grant resource 2 to LCHd. Subsequently, the 3 resources allocated to LCHd can be referred to as UL grant resource 3, and the remaining 6 resources can be referred to as UL grant resource 4.

[0218] Of the 12 UL grants, 6 remain unallocated, such as... Figure 15 As shown in (c), since Priority(a) > Priority(b), the terminal device allocates 5 portions of UL grant resource 4 to LCHa and 1 portion to LCHb, thus exhausting UL grant resource 4. Afterward, the token counts of LCHa and LCHb are updated to B(a) = -9 and B(b) = -6, respectively. At this point, all 12 UL grant resources have been allocated, with no resources remaining. Figure 15 As shown in (d), the target LCH also includes LCHb with tokens less than 0 and containing urgent data. At this point, the UL grant resource 4 allocated to LCHd can be preempted / recalled to send data from LCHb with tokens less than 0 and containing urgent data. Specifically, the terminal device allocates three portions of UL grant resource 3 to LCHb in descending priority order until UL grant resource 3 is exhausted. Therefore, the terminal device first sends data b2 to data b4 from LCHb on UL grant resource 3. Afterward, the token counts of LCHb and LCHd are updated to B(b) = -7.

[0219] Therefore, when terminal devices send data from the LCH on UL grant resources, given the limited UL grant resources, they prioritize sending data from the LCH containing urgent data. This ensures that urgent data is sent to the network in a timely manner, avoiding the loss of urgent data, which would lead to more invalid data and waste of UL grant resources.

[0220] Optionally, the terminal device can transmit data from the first LCH on the UL grant resources allocated for the second type LCH until all data in the first LCH has been transmitted and there are still remaining UL grant resources allocated for the second type LCH. In this case, the terminal device can continue to transmit data from the second type LCH on the UL grant resources allocated for the second type LCH.

[0221] For example, such as Figure 16As shown in (a), assume the network device configures 12 UL grant resources for the terminal device, and one data item can occupy one UL grant resource. The terminal device includes LCHa, LCHb, LCHc, and LCHd. Currently, the token counts of LCHa, LCHb, LCHc, and LCHd are -4, -6, 1, and 3, respectively, with priorities of Priority(a)>Priority(b)>Priority(c)>Priority(d). The terminal device executes the first round of loop, determining LCHc, which has the highest priority among those with a token count greater than 0, and allocates one resource from UL grant resource 1 to data c1 of LCHc. Afterward, the token count of LCHc is updated to B(c) = 0. It can be seen that the data in LCHc is not completely sent. After allocating one resource from UL grant resource 1 to the data of LCHc, the remaining 11 resources are called UL grant resource 2.

[0222] Next, as Figure 16 As shown in (b), the terminal device continues to find LCHd with a token count greater than 0 and the second highest priority. The terminal device allocates 3 resources from UL grant resource 2 to LCHd. The 3 resources subsequently allocated to LCHd are called UL grant resource 3, and the remaining 8 resources after being allocated to LCHd are called UL grant resource 4.

[0223] Next, as Figure 16 As shown in (c), since Priority(a) > Priority(b), the terminal device allocates 5 resources from UL grant resource 4 to LCHa and 3 resources to LCHb. Afterwards, the token counts for LCHa and LCHb are updated to B(a) = -9 and B(b) = -9, respectively. Figure 16 As shown in diagram (d), all 12 UL grant resources have been allocated, with no resources remaining. The target LCH also includes LCHc with tokens less than 0 and containing urgent data. At this point, the UL grant resource 3 allocated to LCHd can be preempted / recalled to send data from LCHb with tokens less than 0 and containing urgent data. After the terminal device allocates 2 resources from UL grant resource 3 to LCHc to send data c2 and data c3, UL grant resource 3 still has 1 resource remaining. The terminal device can allocate this 1 resource to LCHd to send data d1 from LCHd until the UL grant resources are exhausted. That is, grant(d) is updated to 0. After this, the token counts of LCHc and LCHd are updated to B(c) = -2 and B(d) = 2.

[0224] It should be understood that after the terminal device performs the first operation, if it determines that there are remaining UL grant resources and the data in the first type of LCH with a token greater than 0 has not been completely sent (i.e., there is remaining data), and if the remaining data in the first type of LCH with a token greater than 0 does not include urgent data, then the terminal device will only send the data in the first type of LCH with a token less than 0 on the UL grant resources allocated for the second type of LCH. This ensures that urgent data in the first type of LCH is sent in a timely manner, avoiding the loss of urgent data, which could lead to more invalid data and waste of UL grant resources.

[0225] In summary, the data transmission method in this embodiment involves the terminal device first sending urgent data on UL grant resources. Only after all the urgent data has been sent to the network device, and if there are still remaining resources, does the terminal device then send non-urgent data. This ensures that urgent data is sent in a timely manner, avoiding the loss of urgent data in the target LCH, which would lead to more invalid data and waste of UL grant resources.

[0226] The foregoing mainly describes the solutions provided in the embodiments of this application from the perspective of interaction between various devices. It is understood that each device, such as a terminal device or network device, includes corresponding hardware structures and / or software modules to perform the aforementioned functions. Those skilled in the art should readily recognize that, in conjunction with the algorithm steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0227] This application embodiment can group terminal devices, network devices, etc., into functional modules according to the above method examples. For example, each functional group can correspond to a functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. The grouping of modules in this application embodiment is illustrative and only represents one logical functional grouping; other grouping methods may be used in actual implementation.

[0228] By way of example, embodiments of this application also provide a communication device.

[0229] Please see Figure 17 , Figure 17 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application.

[0230] like Figure 17 As shown, the communication device 1700 can exist independently or be integrated into other devices. It can communicate with the network devices mentioned above to implement the operations corresponding to the terminal devices or network devices in the above method embodiments.

[0231] The communication device 1700 may include a transceiver unit 1701. The communication device 1700 may also include the transceiver unit 1701 and / or a processing unit 1702. The transceiver unit 1701 can implement corresponding communication functions, and the processing unit 1702 is used for data processing. The transceiver unit 1701 may also be referred to as a communication interface or a communication unit.

[0232] Alternatively, when the communication device 1700 is used to implement the functions of a terminal device:

[0233] Transceiver unit 1701 is used to obtain UL grant resources configured for network devices.

[0234] Processing unit 1702 is used to perform a first operation on a target LCH containing data to be transmitted in the logical channel LCH of a terminal device; wherein the first operation includes: allocating UL grant resources to a first type of LCH with a token count greater than 0 in descending order of LCH priority and transmitting data in the first type of LCH; allocating UL grant resources to a second type of LCH with a token count greater than 0 but not transmitting data in the second type of LCH.

[0235] The processing unit 1702 is further configured to, after the terminal device performs the first operation, perform a second operation if the target LCH also includes a first LCH belonging to the first type of LCH and there is no UL grant resource available for the first LCH; wherein the second operation includes: sending the data in the first LCH on the UL grant resource allocated for the second type of LCH.

[0236] The processing unit 1702 is further configured to perform a third operation after the terminal device performs the first operation, if there are remaining UL grant resources; wherein the third operation includes: allocating UL grant resources to the first type of LCH according to the priority of the first type of LCH and sending the remaining data in the first type of LCH.

[0237] The processing unit 1702 is further configured to perform a second operation after the terminal device performs the third operation, if the target LCH also includes a first LCH belonging to the first type of LCH and the UL grant resources have been fully allocated.

[0238] When the communication device 1700 is used to implement the functions of a network device:

[0239] Transceiver unit 1701 is used to send uplink UL grant resources to terminal devices.

[0240] The transceiver unit 1701 is further configured to receive data in a first type of logical channel (LCH) sent by the terminal device; wherein the first type of LCH is an LCH that includes at least urgent data, and the urgent data is data whose remaining transmission time is less than a preset delay threshold; and to receive data in a first type of LCH sent by the terminal device through UL grant resources allocated for a second type of LCH; wherein the second type of LCH is an LCH that includes only non-urgent data.

[0241] It should be understood that the corresponding processes performed by each unit have been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.

[0242] The processing unit in the preceding embodiments can be implemented by at least one processor or processor-related circuitry. The transceiver unit 1701 can be implemented by a transceiver or transceiver-related circuitry. The transceiver unit can also be referred to as a communication unit or communication interface. The storage unit can be implemented by at least one memory.

[0243] Since the communication device 1700 provided in this embodiment can execute the above method, the technical effects it can achieve can be referred to the above method embodiment, and will not be repeated here.

[0244] This application embodiment can divide the communication device into functional modules according to the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0245] By way of example, embodiments of this application also provide a communication device.

[0246] Please see Figure 18 , Figure 18 This is a schematic diagram of the hardware structure of a communication device provided in an embodiment of this application.

[0247] The communication device 1800 includes a processor 1801 coupled to a memory 1802. The memory 1802 is used to store computer programs or instructions and / or data. The processor 1801 is used to execute the computer programs or instructions and / or data stored in the memory 1802, so that the methods in the preceding method embodiments are executed.

[0248] Optionally, the communication device 1800 may include one or more processors 1801.

[0249] Optionally, such as Figure 18 As shown, the communication device 1800 may also include a memory 1802.

[0250] Optionally, the communication device 1800 may include one or more memories 1802.

[0251] Alternatively, the memory 1802 may be integrated with the processor 1801, or it may be set separately.

[0252] like Figure 18 As shown, the communication device 1800 may further include a transceiver 1803 for receiving and / or transmitting signals. For example, a processor 1801 is used to control the transceiver 1803 to receive and / or transmit signals.

[0253] As one option, the communication device 1800 is used to implement the operations performed by the terminal device or network device in the method embodiments described above.

[0254] This application also provides a communication device, including one or more processors, a memory, and a computer program stored in the memory. The processor executes the computer program to implement the data transmission method described above.

[0255] This application also provides a communication system. Figure 19 This is a schematic diagram of the structure of a communication system provided in an embodiment of this application. Figure 19 As shown, the communication system 1900 may include terminal equipment 1910 and network equipment 1920.

[0256] Among them, network device 1920 is used to send UL grant resources to terminal devices.

[0257] After obtaining the UL grant resources configured by the network device, the terminal device 1910 performs a first operation on the target LCH of the logical channel LCH of the terminal device to be transmitted. The first operation includes: allocating UL grant resources to the first type of LCH with a token count greater than 0 in the order of decreasing LCH priority and transmitting the data in the first type of LCH; allocating UL grant resources to the second type of LCH with a token count greater than 0 but not transmitting the data in the second type of LCH.

[0258] The terminal device 1910 is further configured to, after performing the first operation, perform a second operation if the target LCH also includes a first LCH belonging to the first type of LCH and there is no UL grant resource available for the first LCH; wherein the second operation includes: sending the data in the first LCH on the UL grant resource allocated for the second type of LCH.

[0259] In this embodiment, the terminal device is further configured to execute the method executed by the terminal device in the above embodiments, and the network device is further configured to execute the method executed by the network device in the above embodiments.

[0260] Embodiments of this application also provide a computer-readable storage medium storing computer instructions. When the computer instructions are executed on a communication device, the communication device performs the aforementioned method steps to implement the data transmission method described in the above embodiments.

[0261] Embodiments of this application also provide a chip system including a memory and a processor, wherein a program / instruction stored in the memory is executed by the processor to implement the data transmission method described above.

[0262] Embodiments of this application also provide a computer program product, including a computer program / instructions that, when executed by a processor, implement the data transmission method described above.

[0263] It is understood that, in order to achieve the above functions, terminal devices and network devices include hardware structures and / or software modules corresponding to perform each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this invention.

[0264] This application embodiment can divide the terminal device and network device into functional modules according to the above method examples. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. The module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0265] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0266] In the embodiments of this application, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0267] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as flash memory, portable hard disk, read-only memory, random access memory, magnetic disk, or optical disk.

[0268] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data transmission method, characterized in that, Applied to a terminal device, the method includes: Obtain the uplink UL grant resource configured for the network device; For the target LCH of the logical channel LCH of the terminal device, a first operation is performed; wherein the first operation includes: allocating UL grant resources to the first type LCH with a token count greater than 0 in descending order of LCH priority and sending the data in the first type LCH; allocating UL grant resources to the second type LCH with a token count greater than 0 but not sending the data in the second type LCH; the first type LCH is an LCH that includes at least urgent data, and the second type LCH is an LCH that includes only non-urgent data, wherein the urgent data is data whose remaining transmission time is less than a preset delay threshold; After performing the first operation, if the target LCH also includes a first LCH belonging to the first type of LCH, and there is no UL grant resource available for the first LCH, then a second operation is performed; wherein the second operation includes: sending the data in the first LCH on the UL grant resource allocated for the second type of LCH.

2. The method according to claim 1, characterized in that, The absence of ULgrant resources available for the first LCH includes: The UL grant resources allocated to the terminal device have been exhausted; or, The number of tokens for the first LCH is less than 0.

3. The method according to claim 1 or 2, characterized in that, The method further includes: After performing the first operation, if there are remaining UL grant resources, then a third operation is performed; wherein the third operation includes: allocating UL grant resources to the first type of LCH according to the priority of the first type of LCH and sending the remaining data in the first type of LCH.

4. The method according to claim 3, characterized in that, The method further includes: After performing the third operation, if the target LCH also includes a first LCH belonging to the first type of LCH, and the UL grant resources have been fully allocated, then the second operation is performed.

5. The method according to any one of claims 1-4, characterized in that, Sending the data in the first LCH on the UL grant resource allocated for the second type of LCH includes: According to the order of the number of tokens of the first type of LCH from smallest to largest, the UL grant resources allocated to the second type of LCH are allocated to the first LCH, and the data in the first LCH is sent.

6. The method according to claim 5, characterized in that, The number of tokens in the LCH is determined based on the number of tokens in the LCH before the first operation and the result of the first operation.

7. The method according to claim 6, characterized in that, The token count of each LCH in the first type of LCH is the difference between the value before the first operation and the number of data sent by the LCH; the token count of each LCH in the second type of LCH is restored to the value when the first operation was performed, and the token count of other LCHs in the target LCH, excluding the first type of LCH and the second type of LCH, remains unchanged.

8. A data transmission method, characterized in that, Applied to network devices, the method includes: Send uplink UL grant resources to the terminal device; The terminal device receives data from a first type of logical channel (LCH); wherein the first type of LCH is an LCH that includes at least urgent data, and the urgent data is data whose remaining transmission time is less than a preset delay threshold. The terminal device receives data from a first LCH sent by the UL grant resource allocated for the second type of LCH; wherein the second type of LCH is an LCH that includes non-urgent data.

9. The method according to claim 8, characterized in that, The method further includes: The terminal device receives the remaining data in the first type of LCH; wherein, the remaining data in the first type of LCH is generated when there are remaining UL grant resources, and UL grant resources are allocated to the first type of LCH according to the priority of the first type of LCH and then sent.

10. A communication device comprising one or more processors, a memory, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method of any one of claims 1-7; and / or, to implement the method of claim 8 or 9.

11. A communication system, characterized in that, It includes a terminal device and a network device, the terminal device being used to perform the method of any one of claims 1-7; and / or to implement the method of claim 8 or 9.

12. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the method of any one of claims 1-7; and / or, implement the method of claim 8 or 9.

13. A chip system comprising a memory and a processor, characterized in that, When the program / instructions stored in the memory are executed by the processor, they implement the method of any one of claims 1-7; and / or, implement the method of claim 8 or 9.

14. A computer program product, characterized in that, The computer program product includes: a computer program or instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-7; and / or to implement the method as described in claim 8 or 9.