Coding rate adjusting method and related equipment

By adjusting the encoding rate according to the congestion priority of the data stream, the problem of data stream lagging caused by network congestion is solved, achieving more efficient data stream transmission and improved user experience.

CN119363294AActive Publication Date: 2025-01-24HONOR DEVICE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411821062.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-01-24
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

Network congestion causes video or other data streams to stutter, reducing user experience, and it is difficult for the prior art to effectively adjust the encoding rate of data streams to cope with congestion.

Method used

By determining the total recommended rate of the data flow and adjusting the encoding rate of each data flow according to the congestion priority of each data flow, the encoding rate adjustment at the data flow level is achieved.

Benefits of technology

Effectively improved the data transmission efficiency of data under network congestion, reduced the phenomenon of data streaming, and enhanced the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363294A_ABST
    Figure CN119363294A_ABST
Patent Text Reader

Abstract

The invention provides a coding rate adjustment method and related equipment, and the method can adjust the coding rate of each data stream according to the total recommendation rate of the data streams and the congestion priority of each data stream through determining the total recommendation rate of the data streams, and obtains the adjusted coding rate of each data stream. According to the embodiment of the invention, based on the congestion priority of the data flow, the corresponding adjusted coding rate can be determined for each data flow, and the coding rate adjustment of the data flow level is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a coding rate adjustment method and related equipment. Background Art

[0002] Network congestion is a persistently overloaded network state that occurs when user demand for network resources exceeds inherent processing power and capacity.

[0003] With the development of information technology, more and more bandwidth resources are needed to transmit data streams, and the probability of network congestion increases accordingly. In the case of network congestion, video or other data streams may freeze, reducing the user experience. Therefore, a solution is urgently needed to solve the above problems. Summary of the invention

[0004] The present application provides a coding rate adjustment method and related equipment.

[0005] In order to achieve the above purpose, this application adopts the following technical solutions: First aspect: An embodiment of the present application provides a coding rate adjustment method, which determines the total recommended rate of data streams, adjusts the coding rate of each data stream according to the total recommended rate of the data streams and the congestion priority of each data stream, and obtains the adjusted coding rate of each data stream.

[0006] In the embodiment of the present application, the coding rate of the data stream can be adjusted according to the total recommended rate of the data stream and the congestion priority order of the data stream. In the process of adjusting the coding rate of the data stream according to the congestion priority order of the data stream, the corresponding adjusted coding rate can be determined for each data stream to achieve data stream level coding rate adjustment.

[0007] In one possible implementation, the coding rate of each data stream is adjusted according to the total recommended rate of the data stream and according to the congestion priority of each data stream to obtain the adjusted coding rate of each data stream, including: when the guaranteed bit rate of the first data stream is greater than or equal to the total recommended rate of the data stream, the coding rate of the first data stream is adjusted to the total recommended rate of the data stream, and the coding rates of other data streams except the first data stream in each data stream are adjusted to 0.

[0008] Among them, the first data stream is the data stream with the highest congestion priority among all data streams. In the embodiment of the present application, when the guaranteed bit rate of the first data stream is greater than or equal to the total recommended rate of the data stream, the total recommended rate of the data stream can be directly allocated to the first data stream with the highest congestion priority to ensure its transmission rate.

[0009] In a possible implementation, according to the total recommended rate of the data stream and according to the congestion priority of each data stream, the coding rate of each data stream is adjusted respectively to obtain the adjusted coding rate of each data stream, including: when the guaranteed bit rate of the first data stream with the highest congestion priority among the data streams is less than the total recommended rate of the data stream, the coding rate of the first data stream can be adjusted to the guaranteed bit rate of the first data stream. Based on the difference between the total recommended rate of the data stream and the guaranteed bit rate of the first data stream, and according to the congestion priority of other data streams except the first data stream among the data streams, the coding rates of other data streams are adjusted respectively to obtain the adjusted coding rates of other data streams.

[0010] In the embodiment of the present application, when the guaranteed bit rate of the first data stream with the highest congestion priority among the data streams is less than the total recommended rate of the data streams, the guaranteed bit rate of the first data stream can be allocated to it from the total recommended rate of the data streams. Then, from the remaining rates in the total recommended rate of the data streams, rates are allocated to other data streams according to the order of congestion priorities of other data streams to obtain the adjusted coding rates of all data streams.

[0011] In a possible implementation, based on the difference between the total recommended rate of the data stream and the guaranteed bit rate of the first data stream, and according to the congestion priorities of the other data streams except the first data stream in each data stream, the coding rates of the other data streams are adjusted respectively to obtain the adjusted coding rates of the other data streams, including: when the guaranteed bit rate of the Nth data stream is greater than or equal to the first remaining recommended rate, the coding rate of the Nth data stream is adjusted to the first remaining recommended rate, and the coding rate of the data stream whose congestion priority is lower than the congestion priority of the Nth data stream is adjusted to 0. When the guaranteed bit rate of the Nth data stream is less than the first remaining recommended rate, the coding rate of the Nth data stream is adjusted to the guaranteed bit rate.

[0012] Among them, the first remaining recommended rate is the difference between the total recommended rate of the data stream and the sum of the guaranteed bit rates of the first N-1 data streams; the first remaining recommended rate is greater than 0; the congestion priority of the Nth data stream is lower than the congestion priority of the N-1th data stream, and N is an integer greater than or equal to 2.

[0013] In an embodiment of the present application, a rate can be allocated to each data stream from the total recommended data rate according to the order of congestion priority of each data stream. Exemplarily, there are a first data stream, a second data stream, and a third data stream, wherein the congestion priority of the first data stream is greater than the congestion priority of the second data stream, and the congestion priority of the second data stream is greater than the congestion priority of the third data stream. In this case, if the guaranteed bit rate of the first data stream is less than the total recommended data rate, the encoding rate of the first data stream is adjusted to the guaranteed bit rate of the first data stream. At this time, if the remaining rate in the total recommended data rate is greater than the guaranteed bit rate of the second data stream, the encoding rate of the second data stream is adjusted to the guaranteed bit rate of the second data stream. If the remaining rate in the total recommended data rate is less than or equal to the guaranteed bit rate of the second data stream, the encoding rate of the second data stream is adjusted to the current remaining rate in the total recommended data rate.

[0014] Similarly, if the remaining rate in the total recommended data rate is greater than the guaranteed bit rate of the second data stream, and after the coding rate of the second data stream is adjusted to the guaranteed bit rate of the second data stream, if the current remaining rate in the total recommended data rate is greater than the guaranteed bit rate of the third data stream, the coding rate of the third data stream is adjusted to the guaranteed bit rate of the third data stream. If the current remaining rate is less than or equal to the guaranteed bit rate of the third data stream, the coding rate of the third data stream is adjusted to the current remaining rate.

[0015] Therefore, in the embodiment of the present application, the corresponding adjusted coding rate can be determined for each data stream, thereby achieving coding rate adjustment at the data stream level.

[0016] In a possible implementation, before adjusting the coding rate of each data stream according to the total recommended rate of the data stream and the congestion priority of each data stream, and obtaining the adjusted coding rate of each data stream, it also includes: determining the congestion level; adjusting the coding rate of each data stream according to the total recommended rate of the data stream, the recommended rate corresponding to each data stream under the congestion level, and the congestion priority of each data stream, and obtaining the adjusted coding rate of each data stream.

[0017] The method provided in the embodiment of the present application can adjust the coding rate of each data stream separately based on the congestion level and the congestion priority of each data stream. While realizing the coding rate adjustment at the data stream level, the coding rate is allocated to more data streams from the total recommended rate of the data stream as much as possible.

[0018] In one possible implementation, the coding rate of each data stream is adjusted according to the total recommended rate of the data stream, the recommended rate corresponding to each data stream under the congestion level, and the congestion priority of each data stream to obtain the adjusted coding rate of each data stream, including: when the first recommended rate corresponding to the first data stream under the congestion level is greater than or equal to the total recommended rate of the data stream, the coding rate of the first data stream is adjusted to the total recommended rate of the data stream, and the coding rates of other data streams except the first data stream in each data stream are adjusted to 0.

[0019] In this embodiment of the present application, when the first recommended rate of the first data stream is greater than or equal to the total recommended rate of the data stream, the total recommended rate of the data stream can be directly allocated to the first data stream with the highest congestion priority to ensure its transmission rate.

[0020] In a possible implementation, the coding rate of each data stream is adjusted according to the total recommended rate of the data stream, the recommended rate corresponding to each data stream under the congestion level, and the congestion priority of each data stream to obtain the adjusted coding rate of each data stream, including: when the first recommended rate corresponding to the first data stream under the congestion level is less than the total recommended rate of the data stream, adjusting the coding rate of the first data stream to the first recommended rate; based on the difference between the total recommended rate of the data stream and the first recommended rate, and according to the recommended rates corresponding to other data streams except the first data stream in each data stream under the congestion level, and the congestion priority of other data streams, adjusting the coding rates of other data streams to obtain the adjusted coding rates of other data streams.

[0021] In an embodiment of the present application, the recommended rate corresponding to each data stream under the congestion level can be allocated from the total recommended rate of the data stream according to the congestion priority order of each data stream, so as to allocate coding rate to more data streams from the total recommended rate of the data stream as much as possible while achieving coding rate adjustment at the data stream level.

[0022] In one possible implementation, based on the difference between the total recommended rate of the data stream and the first recommended rate, and according to the recommended rates corresponding to the other data streams except the first data stream in each data stream under the congestion level, and the congestion priorities of the other data streams, the coding rates of the other data streams are adjusted respectively to obtain the adjusted coding rates of the other data streams, including: when the Nth recommended rate corresponding to the Nth data stream under the congestion level is greater than or equal to the second remaining recommended rate, adjusting the coding rate of the Nth data stream to the second remaining recommended rate, and adjusting the coding rate of the data stream whose congestion priority is lower than the congestion priority of the Nth data stream to 0; when the Nth recommended rate corresponding to the Nth data stream under the congestion level is less than the second remaining recommended rate, adjusting the coding rate of the Nth data stream to the Nth recommended rate.

[0023] Among them, the second remaining recommended rate is the difference between the total recommended rate of the data flow and the sum of the recommended rates corresponding to the first N-1 data flows under the congestion level; the second remaining recommended rate is greater than 0; the congestion priority of the Nth data flow is lower than the congestion priority of the N-1th data flow, and N is an integer greater than or equal to 2.

[0024] In an embodiment of the present application, the recommended rate corresponding to each data stream under the congestion level can be allocated from the total recommended rate of the data stream according to the congestion priority order of each data stream, so as to allocate coding rate to more data streams from the total recommended rate of the data stream as much as possible while achieving coding rate adjustment at the data stream level.

[0025] In a possible implementation, when the Nth data stream is the data stream with the lowest congestion priority among all data streams, when the Nth recommended rate corresponding to the Nth data stream under the congestion level is less than the second remaining recommended rate, after adjusting the coding rate of the Nth data stream to the Nth recommended rate, it also includes: when the fourth remaining recommended rate remaining after the total recommended rate of the data stream is allocated to all data streams is less than or equal to the third remaining recommended rate, adjusting the coding rate of the first data stream from the first recommended rate to the sum of the first recommended rate and the fourth remaining recommended rate, the third remaining recommended rate being the difference between the guaranteed bit rate of the first data stream and the first recommended rate. When the fourth recommended rate is greater than the third remaining recommended rate, adjusting the coding rate of the first data stream from the first recommended rate to the guaranteed bit rate of the first data stream.

[0026] In an embodiment of the present application, after allocating recommended rates to all data streams, if there is still a remaining total recommended rate for the data streams, then the rate can be allocated to each data stream from the currently remaining recommended rate, starting from the first data stream with the highest congestion priority, in the order of the congestion priority of the data streams. Exemplarily, if the rate is allocated to the first data stream from the currently remaining recommended rate so that the coding rate of the first data stream is the guaranteed bit rate of the first data stream, and there is still a remaining recommended rate, then the rate is allocated to the second data stream whose congestion priority is only lower than that of the first data stream, and so on. In this way, while realizing the coding rate adjustment at the data stream level, the coding rate can be allocated to as many data streams as possible from the total recommended rate of the data stream.

[0027] In one possible implementation, when the Nth data stream is the data stream with the lowest congestion priority among all the data streams, and when the Nth recommended rate corresponding to the Nth data stream under the congestion level is less than the second remaining recommended rate, after adjusting the coding rate of the Nth data stream to the Nth recommended rate, it also includes: adjusting the coding rate of the first data stream from the first recommended rate to the sum of the first recommended rate and the fifth remaining recommended rate, the fifth remaining recommended rate being the difference between the second remaining recommended rate and the Nth recommended rate.

[0028] In an embodiment of the present application, after allocating recommended rates to all data streams, if there is still a remaining total recommended rate for the data streams, the currently remaining recommended rate can be directly allocated to the first data stream with the highest congestion priority to improve the efficiency of coding rate adjustment.

[0029] In a possible implementation, before determining the total recommended rate of the data stream, the method further includes: when the terminal device establishes a protocol data unit session with the network device, the terminal device sends a service initial signaling to the network device. The service initial signaling is used to indicate the identification information of each data stream configured by the network device for the terminal device, the guaranteed bit rate of each data stream, and the congestion priority of each data stream. As a result, it is convenient to determine the corresponding adjusted coding rate for each data stream in the future, so as to realize the coding rate adjustment at the data stream level.

[0030] In a possible implementation, determining the total recommended data flow rate includes: receiving the total recommended data flow rate from a network device. In the embodiment of the present application, the total recommended data rate can be configured by the network device according to actual conditions to ensure data transmission efficiency as much as possible.

[0031] In a possible implementation, according to the total recommended rate of the data stream and according to the congestion priority of each data stream, the coding rate of each data stream is adjusted respectively, and after the adjusted coding rate of each data stream is obtained, it also includes: receiving the adjusted coding rate of each data stream from the network device.

[0032] In an embodiment of the present application, the network device can determine the adjusted coding rate of each data stream. On this basis, the terminal device can directly receive the adjusted coding rate of each data stream sent by the network device, thereby improving the operating efficiency of the terminal device.

[0033] In a possible implementation, the network device may detect the network status of the uplink logical channel; when the network status is congested, the total recommended rate of the data flow is determined.

[0034] A second aspect: An embodiment of the present application provides a terminal device, the terminal device comprising: a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of a coding rate adjustment method performed by the terminal device as described above according to the instructions in the program code.

[0035] A third aspect: An embodiment of the present application provides a network device, the network device comprising: a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of a coding rate adjustment method performed by a network device as described above according to the instructions in the program code.

[0036] Aspect 4: An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a coding rate adjustment method as described above are implemented.

[0037] Aspect 5: An embodiment of the present application provides a computer program product. When the computer program product runs on a computer, the computer executes the steps of a coding rate adjustment method as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a schematic diagram of a rate control signaling; Figure 2 is a parameter map of the recommended coding rate; Figure 3 A schematic diagram of the corresponding relationship between the information identifier of the logical channel and the data flow; Figure 4 A schematic diagram of an application scenario of a coding rate adjustment method provided in an embodiment of the present application; Figure 5 A timing diagram of the first coding rate adjustment method provided in an embodiment of the present application; Figure 6 A flowchart of a first coding rate adjustment method provided in an embodiment of the present application; Figure 7 A timing diagram of a second coding rate adjustment method provided in an embodiment of the present application; Figure 8 A flowchart of a second coding rate adjustment method provided in an embodiment of the present application; Fig. 9 A timing diagram of a third coding rate adjustment method provided in an embodiment of the present application; Fig.10 A flowchart of a third coding rate adjustment method provided in an embodiment of the present application; Fig.11 A timing diagram of the fourth coding rate adjustment method provided in an embodiment of the present application; Fig.12 A flowchart of a fourth coding rate adjustment method provided in an embodiment of the present application; Fig.13 A schematic diagram of the hardware composition of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects rather than to limit a specific order.

[0040] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0041] Network congestion is a persistently overloaded network state that occurs when user demand for network resources exceeds inherent processing power and capacity.

[0042] First, the network resources that network devices can provide are limited. When there are many users, the network resources that network devices can provide may be difficult to meet the needs of all users for network resources at the same time, and network congestion may occur at this time.

[0043] Secondly, with the development of information technology, more and more bandwidth resources are required to transmit data streams. For example, when the data stream is a video stream, the required bandwidth resources can reach 2Mbps~3Mbps when the video stream is transmitted at 1080@60fps. For high-definition videos such as 4K and 8K, the required bandwidth resources are even higher. When the bandwidth resources required to transmit data streams increase, the probability of network congestion increases accordingly.

[0044] In the case of network congestion, video or other data streams may freeze, resulting in a reduced user experience. Currently, when network congestion occurs, the logical channel that needs to be adjusted can be indicated and rate control signaling can be sent to it, so that the terminal device adjusts the encoding rate of the data stream corresponding to the logical channel according to the recommended rate in the rate control signaling.

[0045] However, a logical channel may be mapped to multiple data streams. When a terminal device adjusts the coding rate of the data stream corresponding to the logical channel based on rate control signaling (MAC CE), it is difficult to adjust the coding rate for the data stream.

[0046] like Figure 1 As shown in the figure, this is a schematic diagram of rate control signaling. Among them, LCID is used to indicate the information identifier (ID) of the logical channel that needs to be adjusted; UL / DL is used to indicate the direction in which the speed adjustment is required, and the speed adjustment direction includes uplink and downlink; Bit Rate indicates the recommended coding rate, which occupies 6 bits, such as Figure 2As shown in the figure, this figure is a parameter diagram of the recommended coding rate, which shows the values ​​of the recommended coding rate corresponding to different indexes (Index); X is a multiple of the recommended coding rate, that is, the product of the recommended coding rate and X is the actual recommended coding rate; R is a reserved bit.

[0047] Currently, the MAC CE can indicate the LCID and adjust the coding rate of the data stream of the logical channel corresponding to the LCID. Figure 3 As shown, although LCID has a one-to-one mapping relationship with the data radio bearer (Data Rate Bridge, DRB), the mapping relationship between DRB and data stream may be one-to-many, that is, one DRB may correspond to multiple data streams, so that one logical channel may correspond to multiple data streams.

[0048] Therefore, when a logical channel corresponds to multiple data streams, multiple data streams will be indicated at the same time by indicating LCID, and it is difficult for the terminal device to adjust the coding rate for one or part of the multiple data streams. Some services require coding rate adjustment at the data stream level, such as Extended Reality (XR) services that include multiple data streams. It is difficult to adjust the coding rate for such services based on the current coding rate adjustment method.

[0049] Based on this, an embodiment of the present application provides a coding rate adjustment method, by determining the total recommended rate of the data stream, according to the total recommended rate of the data stream and the congestion priority of each data stream, the coding rate of each data stream can be adjusted respectively to obtain the adjusted coding rate of each data stream. In the embodiment of the present application, based on the congestion priority of the data stream, the corresponding adjusted coding rate can be determined for each data stream, and the coding rate adjustment at the data stream level can be achieved.

[0050] Combine the following Figure 4 Introduce the application scenarios provided by the embodiments of the present application.

[0051] In the embodiment of the present application, the terminal device 1001 and the network device 1002 can interact to adjust the encoding rate of each data stream.

[0052] The terminal device 1001 may be a device for accessing a network, and may generally be a terminal. The network device 1002 may be a device for providing network communication functions on the network side, and may also be referred to as a network element in some cases. The network device may generally include but is not limited to a base station (including a functional unit of a base station, or a combination of functional units of a base station), a core network, etc.

[0053] In the first example, when network congestion occurs (wherein the network may refer to a base station), the network device 1002 may send recommended rate indication information to the terminal device 1001. The recommended rate indication information includes the total recommended rate of the data stream configured by the network device, and may be used to instruct the terminal device to adjust the coding rate of each data stream.

[0054] In response to the recommended rate indication information, the terminal device 1001 can determine the total recommended rate of the data stream, and adjust the coding rate of each data stream according to the total recommended rate of the data stream and the congestion priority of each data stream to obtain the adjusted coding rate of each data stream.

[0055] In the second example, when network congestion occurs, the network device 1002 may send recommended rate indication information to the terminal device 1001. The recommended rate indication information includes the total recommended rate of data streams configured by the network device and the current congestion level, and may be used to instruct the terminal device to adjust the coding rate of each data stream.

[0056] In response to the recommended rate indication information, the terminal device 1001 can determine the total recommended rate of the data flow and the congestion level, and adjust the coding rate of each data stream according to the total recommended rate of the data flow, the recommended rate corresponding to each data flow under the congestion level, and the congestion priority of each data stream to obtain the adjusted coding rate of each data stream.

[0057] In the third example, when network congestion occurs, the network device 1002 can determine the total recommended rate of the data streams, and adjust the coding rate of each data stream according to the total recommended rate of the data streams and the congestion priority of each data stream to obtain the adjusted coding rate of each data stream.

[0058] After obtaining the adjusted coding rate of each data stream, the network device 1002 sends recommended rate indication information to the terminal device 1001. The recommended rate indication information includes the adjusted coding rate of each data stream. Thus, the terminal device 1001 can directly adjust the coding rate of each data stream based on the recommended rate indication information.

[0059] In the fourth example, when network congestion occurs, the network device 1002 can determine the total recommended rate of the data flow and the congestion level, and adjust the coding rate of each data flow according to the total recommended rate of the data flow, the recommended rate corresponding to each data flow under the congestion level, and the congestion priority of each data flow to obtain the adjusted coding rate of each data flow.

[0060] After obtaining the adjusted coding rate of each data stream, the network device 1002 sends recommended rate indication information to the terminal device 1001. The recommended rate indication information includes the adjusted coding rate of each data stream. Thus, the terminal device 1001 can directly adjust the coding rate of each data stream based on the recommended rate indication information.

[0061] In the embodiment of the present application, based on the congestion priority and congestion level of the data stream, the corresponding adjusted coding rate can be determined for each data stream, and the coding rate adjustment at the data stream level can be implemented.

[0062] The following is an introduction to the coding rate adjustment method provided in an embodiment of the present application.

[0063] Embodiment 1

[0064] like Figure 5 As shown, this figure is a timing diagram of the first coding rate adjustment method provided in an embodiment of the present application.

[0065] S101: A terminal device establishes a protocol data unit session with a network device.

[0066] Among them, the protocol data unit session (PDU Session) refers to a single transmission path from the terminal device to the core network in the network device for transmitting data. Based on the PDU Session, different data streams can be transmitted on the same path, while providing better performance and efficiency.

[0067] In the embodiment of the present application, when a PDU Session is established between a terminal device and a network device, data can be transmitted between the terminal device and the network device, and different data streams can be transmitted. Data transmission based on the PDU Session can provide users with a fast, secure, and stable data transmission experience.

[0068] S102: The terminal device sends service initial signaling to the network device.

[0069] In the embodiment of the present application, the service initial signaling is used to instruct the network device to configure the configuration information of each data stream for the terminal device. The configuration information of the data stream may include but is not limited to the identification information of the data stream, the guaranteed bit rate of each data stream, and the congestion priority of each data stream.

[0070] Among them, the data stream may include but is not limited to video stream, audio stream, posture stream, control stream, etc.; the identification information of the data stream is used to distinguish the data stream, that is, each data stream corresponds to a unique identification information; the guaranteed bit rate (Guaranteed Bit Rate, GBR) of the data stream refers to the minimum coding rate guaranteed by the system to carry the data stream; the congestion priority of the data stream is used to indicate the order of allocating coding rates to the data stream. For example, the higher the congestion priority of the data stream, the higher the coding rate is allocated to it.

[0071] S103: The terminal device receives configuration information of each data stream sent by the network device.

[0072] In a possible implementation, after configuring the configuration information of each data stream, the network device may package the configuration information of multiple data streams into a data packet and send it to the terminal device. In this case, after receiving the data packet, the terminal device may obtain the configuration information of multiple data streams by decompressing the data packet.

[0073] In another possible implementation manner, the network device may send the configuration information of the data streams to the terminal device respectively, so that the terminal device receives the configuration information corresponding to the multiple data streams respectively.

[0074] S104: The network device detects that network congestion occurs.

[0075] In a possible implementation, the network device may detect the network status in real time, and when network congestion is detected, send the total recommended rate of the data flow to the terminal device.

[0076] In another possible implementation, the terminal device may send a network status acquisition request to the network device. After receiving the network status acquisition request, the network device may detect the network status and send a total recommended data flow rate to the terminal device when network congestion is detected.

[0077] In the embodiment of the present application, the total recommended data stream rate is the sum of all recommended data stream encoding rates within the bandwidth capacity of the network device.

[0078] The network device can configure the corresponding total recommended data flow rate according to the congestion level and the bandwidth capacity of the network device. For example, the total recommended data flow rate can be 80% of the bandwidth. If the bandwidth is 100Mbps, the recommended rate can be set to 80Mbps. As the congestion level increases, the network device can reduce the total recommended data flow rate according to the actual situation to reduce the congestion level.

[0079] It is understandable that the embodiment of the present application does not specifically limit the value of the total recommended rate of the data stream, and the above only uses 80% of the bandwidth as an example for introduction.

[0080] S105. The terminal device receives the total recommended rate of the data stream sent by the network device.

[0081] In a possible implementation, the terminal device receives recommended rate indication information sent by the network device, where the recommended rate indication information includes a total recommended rate of data streams configured by the network device and can be used to instruct the terminal device to adjust the encoding rate of each data stream.

[0082] In the embodiment of the present application, the network device may indicate the total recommended rate of the data stream corresponding to the logical channel or DRB, and the terminal device may determine the total recommended rate of the data stream based on the recommended rate indication information sent by the network device, and execute S106. The total recommended rate of the data stream may be greater than or equal to the sum of the adjusted coding rates of each data stream.

[0083] S106. The terminal device adjusts the coding rate of each data stream according to the total recommended rate of the data stream and the configuration information of each data stream to obtain the adjusted coding rate of each data stream.

[0084] In an embodiment of the present application, the terminal device can adjust the coding rate of each data stream according to the order of the congestion priority of the data stream. For example, there are a first data stream, a second data stream and a third data stream, and the congestion priorities of the three data streams decrease in sequence, then the coding rate of the first data stream can be adjusted first, then the coding rate of the second data stream can be adjusted, and finally the coding rate of the third data stream can be adjusted.

[0085] In one possible implementation, when the guaranteed bit rate of the first data stream is greater than or equal to the total recommended rate of the data stream, the terminal device adjusts the coding rate of the first data stream to the total recommended rate of the data stream, and adjusts the coding rates of other data streams in the data streams except the first data stream to 0.

[0086] The first data flow is the data flow with the highest congestion priority among all data flows.

[0087] Exemplarily, the guaranteed bit rate of the first data stream is 1M, and the total recommended rate of the data stream is 0.8M. At this time, the guaranteed bit rate of the first data stream is greater than the total recommended rate of the data stream, and the terminal device can adjust the encoding rate of the first data stream to 0.8M. If there are other data streams, the encoding rates of the other data streams can be adjusted to 0. That is, the adjusted encoding rate corresponding to the first data stream is 0.8M, and the adjusted encoding rates corresponding to the other data streams are 0M.

[0088] When the guaranteed bit rate of the first data stream is less than the total recommended rate of the data stream, the encoding rate of the first data stream is adjusted to the guaranteed bit rate of the first data stream, and the adjusted encoding rate corresponding to the first data stream is obtained as the guaranteed bit rate of the first data stream.

[0089] In this case, since there is still remaining rate to be allocated in the total recommended rate of the data stream, the coding rates of the other data streams can be adjusted separately based on the difference between the total recommended rate of the data stream and the guaranteed bit rate of the first data stream, and according to the congestion priority of other data streams in each data stream except the first data stream, to obtain the adjusted coding rates of the other data streams.

[0090] Exemplarily, the guaranteed bit rate of the first data stream is 1M, and the total recommended rate of the data stream is 1.5M. Since the guaranteed bit rate of the first data stream is greater than the total recommended rate of the data stream, the terminal device can adjust the encoding rate of the first data stream to 1M, and obtain the adjusted encoding rate of the first data stream as 1M. At this time, the remaining 0.5M recommended rate can continue to be allocated, and if there are other data streams, the remaining 0.5M recommended rate can be allocated to each data stream according to the congestion priority of other data streams.

[0091] In one possible implementation, when the guaranteed bit rate of the Nth data stream is greater than or equal to the first remaining recommended rate, the coding rate of the Nth data stream is adjusted to the first remaining recommended rate, and the coding rate of the data stream whose congestion priority is lower than the congestion priority of the Nth data stream is adjusted to 0.

[0092] Wherein, N is an integer greater than or equal to 2; the first remaining recommended rate is the difference between the total recommended rate of the data stream and the sum of the guaranteed bit rates of the first N-1 data streams, and the first remaining recommended rate is greater than 0; the congestion priority of the Nth data stream is lower than the congestion priority of the N-1th data stream.

[0093] Taking N as 3 as an example, if there are 4 data streams, the congestion priority of the first data stream is higher than the congestion priority of the second data stream, the congestion priority of the second data stream is higher than the congestion priority of the third data stream, and the congestion priority of the third data stream is higher than the congestion priority of the fourth data stream.

[0094] When the guaranteed bit rates of the first data stream, the second data stream, the third data stream, and the fourth data stream are all 1M, and the total recommended rate of the data stream is 2.5M, the terminal device can first adjust the encoding rate of the first data stream to 1M, and the remaining 1.5M recommended rate can be allocated. Since the second data stream is the data stream with the highest congestion priority among the unregulated data streams, the terminal device can allocate 1M to the second data stream from 1.5M to adjust the encoding rate of the second data stream to 1M, and the remaining 0.5M recommended rate can be allocated.

[0095] For the third data stream, its guaranteed bit rate is greater than the current remaining recommended rate, that is, the guaranteed bit rate of the third data stream is greater than the first remaining recommended rate. In this case, the terminal device can adjust the encoding rate of the third data stream to 0.5M.

[0096] After the encoding rate of the third data stream is adjusted to 0.5M, the remaining recommended rate is 0, indicating that there is no allocable recommended rate. At this time, the encoding rate of the fourth data stream can be adjusted to 0.

[0097] In another possible implementation, when the guaranteed bit rate of the Nth data stream is less than the first remaining recommended rate, the encoding rate of the Nth data stream is adjusted to the guaranteed bit rate.

[0098] Taking N as 3 as an example, there are 4 data streams, the congestion priority of the first data stream is higher than the congestion priority of the second data stream, the congestion priority of the second data stream is higher than the congestion priority of the third data stream, and the congestion priority of the third data stream is higher than the congestion priority of the fourth data stream.

[0099] When the guaranteed bit rates of the first data stream, the second data stream, the third data stream, and the fourth data stream are all 1M, and the total recommended rate of the data stream is 3.5M, the terminal device can first adjust the encoding rate of the first data stream to 1M, and the remaining 2.5M recommended rate can be allocated. Since the second data stream is the data stream with the highest congestion priority among the unregulated data streams, the terminal device can allocate 1M to the second data stream from 2.5M to adjust the encoding rate of the second data stream to 1M, and the remaining 1.5M recommended rate can be allocated.

[0100] For the third data stream, its guaranteed bit rate is less than the current remaining recommended rate, that is, the guaranteed bit rate of the third data stream is less than the first remaining recommended rate. In this case, the terminal device can adjust the encoding rate of the third data stream to 1M.

[0101] After adjusting the coding rate of the third data stream to 1M, the remaining 0.5M recommended rate can be allocated. At this time, since the guaranteed bit rate of the fourth data stream is 1M, which is greater than the current remaining recommended rate, the terminal device can adjust the coding rate of the fourth data stream to 0.5M.

[0102] In another possible implementation, a data stream without configuration information, such as a data stream without a codec such as control signaling, may be transmitted between the terminal device and the network device. The terminal device may not adjust the encoding rate of such data stream without configuration information.

[0103] For ease of understanding, the following Figure 6, an overall introduction is given to the first coding rate adjustment method provided in an embodiment of the present application.

[0104] S1100. The terminal device establishes a protocol data unit session with a base station and a core network in the network device.

[0105] S1101. The terminal device sends service initial signaling to the core network.

[0106] S1102. The core network sends configuration information of the first data stream to the terminal device in response to the service initial signaling.

[0107] The configuration information of the first data stream may include, but is not limited to, identification information of the first data stream, a guaranteed bit rate of the first data stream, and a congestion priority of the first data stream.

[0108] S1103. The core network sends configuration information of the second data flow to the terminal device in response to the service initial signaling.

[0109] The configuration information of the second data stream may include, but is not limited to, identification information of the second data stream, a guaranteed bit rate of the second data stream, and a congestion priority of the second data stream.

[0110] For example, the identification information of the data flow may be the information identification (QFI) of the quality service flow corresponding to the data flow, such as Figure 6 As shown, the configuration information of the first data flow sent by the core network to the terminal device includes a command to update the PDU Session, QFI, GBR, and congestion priority, wherein the QFI is 1, the GBR is 1M, and the congestion priority is 1.

[0111] The configuration information of the second data flow sent by the core network to the terminal device also includes a command to update the PDU Session, QFI, GBR, and congestion priority, wherein the QFI is 2, the GBR is 1M, and the congestion priority is 2.

[0112] It is understandable that the method of expressing the congestion priority in the embodiments of the present application is not specifically limited, and is only introduced here by taking the example that the smaller the value of the congestion priority, the higher the congestion priority of the corresponding data flow.

[0113] In the event of network congestion, execute S1104 and the base station sends a recommended rate indication to the terminal device.

[0114] like Figure 6 As shown, the recommended rate indication includes a total recommended data flow rate of 1.5M.

[0115] S1105. Based on the recommended rate indication and the configuration information of each data stream, the terminal device adjusts the coding rate of the first data stream corresponding to QFI1 to 1M, and adjusts the coding rate of the second data stream corresponding to QFI2 to 0.5M.

[0116] In summary, an embodiment of the present application provides a coding rate adjustment method, whereby a terminal device can determine a corresponding adjusted coding rate for each data stream based on the congestion priority of the data stream when the sending network is congested, thereby achieving coding rate adjustment at the data stream level.

[0117] Embodiment 2

[0118] like Figure 7 As shown, this figure is a timing diagram of the second coding rate adjustment method provided in the embodiment of the present application. Different from the above-mentioned embodiment 1, the embodiment of the present application adjusts the coding rate based on the congestion priority of each data stream while considering the recommended rate corresponding to the congestion level, so as to allocate coding rates to more data streams from the total recommended rate of the data stream as much as possible.

[0119] S201. A terminal device establishes a protocol data unit session with a network device.

[0120] It is understandable that S201 is the same as the above-mentioned S101 and will not be described in detail here.

[0121] S202: The terminal device sends service initialization signaling to the network device.

[0122] In the embodiment of the present application, the service initial signaling is used to indicate the configuration information of each data stream configured by the network device for the terminal device. The configuration information of the data stream may include but is not limited to the identification information of the data stream, the guaranteed bit rate of each data stream, the congestion priority of each data stream, and the recommended rate corresponding to each data stream under different congestion levels.

[0123] The recommended rate corresponding to the congestion level indicates that under the congestion level, it is recommended that the data stream be transmitted at the recommended rate. For example, the congestion level of the first congestion level is lower than that of the second congestion level, and the guaranteed bit rate of the first data stream may be 1M; its recommended rate under the first congestion level may be 0.8M, and its recommended rate under the second congestion level may be 0.5M.

[0124] It is understandable that in the embodiments of the present application, there is no specific limitation on the numerical value of the recommended rate corresponding to each congestion level of the data flow, which can be set according to actual needs, and the above is only an example.

[0125] S203: The terminal device receives configuration information of each data stream sent by the network device.

[0126] S204: The network device detects that network congestion occurs.

[0127] After detecting network congestion, the network device can determine the congestion level and configure the corresponding total recommended data flow rate according to the congestion level and the bandwidth capacity of the network device.

[0128] After determining the congestion level and the total recommended data flow rate, the network device may send the congestion level and the total recommended data flow rate to the terminal device.

[0129] In a possible implementation, the network device may send recommended rate indication information to the terminal device, where the recommended rate indication information includes the congestion level determined by the network device and the configured total recommended rate of the data flow.

[0130] S205. The terminal device receives the congestion level and the total recommended rate of the data flow sent by the network device.

[0131] In a possible implementation, the terminal device receives recommended rate indication information sent by the network device, where the recommended rate indication information includes a congestion level and a total recommended rate of data flows, and can be used to instruct the terminal device to adjust the encoding rate of each data flow.

[0132] In the embodiment of the present application, the terminal device can determine the congestion level and the total recommended rate of the data stream based on the recommended rate indication information, and execute S206. The total recommended rate of the data stream can be greater than or equal to the sum of the adjusted coding rates of the data streams.

[0133] S206. The terminal device adjusts the coding rate of each data stream according to the total recommended rate of the data stream, the recommended rate corresponding to each data stream under the congestion level, and the congestion priority of each data stream to obtain the adjusted coding rate of each data stream.

[0134] In the embodiment of the present application, the terminal device can adjust the coding rate of each data stream according to the order of the data stream congestion priority. Different from the above-mentioned embodiment 1, when adjusting the coding rate of each data stream, the embodiment of the present application takes into account the recommended rate corresponding to each data stream under the congestion level.

[0135] In one possible implementation, when the first recommended rate corresponding to the first data stream under the congestion level is greater than or equal to the total recommended rate of the data stream, the terminal device can adjust the coding rate of the first data stream to the total recommended rate of the data stream, and adjust the coding rates of other data streams in the data streams except the first data stream to 0.

[0136] The first data flow is the data flow with the highest congestion priority among all data flows.

[0137] Exemplarily, the current congestion level is 2, the guaranteed bit rate of the first data stream is 1M, and when the congestion level is 2, the first recommended rate of the first data stream is 0.5M. If the total recommended rate of the data stream is 0.3M, at this time, the first recommended rate corresponding to the first data stream at the current congestion level is greater than the total recommended rate of the data stream, and the terminal device can adjust the encoding rate of the first data stream to 0.3M. If there are other data streams, the encoding rates of the other data streams can be adjusted to 0. That is, the adjusted encoding rate corresponding to the first data stream is 0.3M, and the adjusted encoding rates corresponding to the other data streams are 0M.

[0138] When the first recommended rate corresponding to the first data flow under the congestion level is less than the total recommended rate of the data flow, the coding rate of the first data flow is adjusted to the first recommended rate, and the adjusted coding rate corresponding to the first data flow is obtained as the first recommended rate of the first data flow.

[0139] In this case, since there is still remaining rate to be allocated in the total recommended rate of the data flow, the terminal device can adjust the coding rates of other data streams based on the difference between the total recommended rate of the data flow and the first recommended rate, and according to the recommended rates corresponding to other data flows in each data flow except the first data flow under the congestion level, and the congestion priorities of other data flows, to obtain the adjusted coding rates of other data streams.

[0140] Exemplarily, the current congestion level is 2, the guaranteed bit rate of the first data stream is 1M, and when the congestion level is 2, the first recommended rate of the first data stream is 0.5M. If the total recommended rate of the data stream is 1M, then the first recommended rate corresponding to the first data stream at the current congestion level is less than the total recommended rate of the data stream, and the terminal device can adjust the encoding rate of the first data stream to 0.5M. At this time, the remaining 0.5M recommended rate can continue to be allocated. If there are other data streams, the remaining 0.5M recommended rate can be allocated to each data stream according to the recommended rates corresponding to other data streams at the congestion level and the congestion priorities of other data streams.

[0141] In one possible implementation, when the Nth recommended rate corresponding to the Nth data stream under the congestion level is greater than or equal to the second remaining recommended rate, the coding rate of the Nth data stream is adjusted to the second remaining recommended rate, and the coding rate of the data stream with a congestion priority lower than the congestion priority of the Nth data stream is adjusted to 0.

[0142] Wherein, N is an integer greater than or equal to 2; the second remaining recommended rate is the difference between the total recommended rate of the data flow and the sum of the recommended rates corresponding to the first N-1 data flows under the congestion level, and the second remaining recommended rate is greater than 0; the congestion priority of the Nth data flow is lower than the congestion priority of the N-1th data flow.

[0143] Taking N as 3 as an example, if there are 4 data streams, the congestion priority of the first data stream is higher than the congestion priority of the second data stream, the congestion priority of the second data stream is higher than the congestion priority of the third data stream, and the congestion priority of the third data stream is higher than the congestion priority of the fourth data stream.

[0144] The guaranteed bit rates of the first data stream, the second data stream, the third data stream and the fourth data stream are all 1M. Under the current congestion level, the recommended rates of the first data stream, the second data stream, the third data stream and the fourth data stream are all 0.5M. When the total recommended rate of the data stream is 1.3M, the terminal device can first adjust the encoding rate of the first data stream to 0.5M. At this time, the remaining 0.8M recommended rate can be allocated.

[0145] Since the second data stream is the data stream with the highest congestion priority among the unregulated data streams, the terminal device can allocate the recommended rate corresponding to the current congestion level from 0.8M to the second data stream, that is, allocate 0.5M to the second data stream to adjust the coding rate of the second data stream to 0.5M. At this time, the remaining 0.3M recommended rate can be allocated.

[0146] For the third data stream, the recommended rate corresponding to the current congestion level is greater than the current remaining recommended rate, that is, the third recommended rate of the third data stream is greater than the second remaining recommended rate. In this case, the terminal device can adjust the coding rate of the third data stream to 0.3M.

[0147] After the encoding rate of the third data stream is adjusted to 0.3M, the remaining recommended rate is 0, indicating that there is no allocable recommended rate. At this time, the encoding rate of the fourth data stream can be adjusted to 0.

[0148] In another possible implementation, when the Nth recommended rate corresponding to the Nth data stream under the congestion level is less than the second remaining recommended rate, the coding rate of the Nth data stream is adjusted to the Nth recommended rate.

[0149] Taking N as 3 as an example, there are 4 data streams, the congestion priority of the first data stream is higher than the congestion priority of the second data stream, the congestion priority of the second data stream is higher than the congestion priority of the third data stream, and the congestion priority of the third data stream is higher than the congestion priority of the fourth data stream.

[0150] The guaranteed bit rates of the first data stream, the second data stream, the third data stream and the fourth data stream are all 1M. Under the current congestion level, the recommended rates of the first data stream, the second data stream, the third data stream and the fourth data stream are all 0.5M. When the total recommended rate of the data stream is 2M, the terminal device can first adjust the encoding rate of the first data stream to 0.5M. At this time, the remaining 1.5M recommended rate can be allocated.

[0151] Since the second data stream is the data stream with the highest congestion priority among the unregulated data streams, the terminal device can allocate the recommended rate corresponding to the current congestion level from 1.5M to the second data stream, that is, allocate 0.5M to the second data stream to adjust the coding rate of the second data stream to 0.5M. At this time, the remaining 1M recommended rate can be allocated.

[0152] For the third data stream, the recommended rate corresponding to the current congestion level is less than the current remaining recommended rate, that is, the third recommended rate of the third data stream is less than the second remaining recommended rate. In this case, the terminal device can adjust the coding rate of the third data stream to 0.5M.

[0153] After the encoding rate of the third data stream is adjusted to 0.5M, the remaining 0.5M recommended rate can be allocated, and at this time the encoding rate of the fourth data stream can be adjusted to 0.5M.

[0154] In another possible implementation, the third remaining recommended rate is the difference between the guaranteed bit rate of the first data stream and the first recommended rate, and the fourth remaining recommended rate is the recommended rate remaining after allocating the total recommended rate of the data stream to all data streams.

[0155] When the third remaining recommended rate is greater than 0, it indicates that the current adjusted coding rate of the first data stream is less than the guaranteed bit rate. At this time, after allocating the recommended rates to all data streams, the current coding rate of the first data stream may continue to be adjusted.

[0156] Based on this, when the fourth remaining recommended rate is less than or equal to the third remaining recommended rate, the terminal device can adjust the coding rate of the first data stream from the first recommended rate to the sum of the first recommended rate and the fourth remaining recommended rate. In this case, the adjusted coding rate corresponding to the first data stream is still less than or equal to the guaranteed bit rate of the first data stream.

[0157] Exemplarily, if there are three data flows, the congestion priority of the first data flow is higher than the congestion priority of the second data flow, and the congestion priority of the second data flow is higher than the congestion priority of the third data flow.

[0158] The guaranteed bit rates of the first data stream, the second data stream and the third data stream are all 1M. Under the current congestion level, the recommended rates of the first data stream, the second data stream and the third data stream are all 0.5M. When the total recommended rate of the data stream is 1.8M, the terminal device can first adjust the encoding rate of the first data stream to 0.5M. At this time, the third remaining recommended rate is 0.5M, and the remaining 1.3M recommended rate in the total recommended rate of the data stream can be allocated.

[0159] Since the second data stream is the data stream with the highest congestion priority among the unregulated data streams, the terminal device can allocate the recommended rate corresponding to the current congestion level from 1.3M to the second data stream, that is, allocate 0.5M to the second data stream to adjust the coding rate of the second data stream to 0.5M. At this time, the remaining 0.8M recommended rate can be allocated.

[0160] For the third data stream, the recommended rate corresponding to the current congestion level is less than the current remaining recommended rate, that is, the third recommended rate of the third data stream is less than the second remaining recommended rate. In this case, the terminal device can adjust the coding rate of the third data stream to 0.5M.

[0161] After the coding rate of the third data stream is adjusted to 0.5M, the coding rates of all data streams are adjusted, but there is still 0.3M of the recommended rate left to be allocated, that is, the fourth remaining recommended rate is 0.3M. Since the third remaining recommended rate is 0.5M, which is greater than the fourth remaining recommended rate, the terminal device can allocate the remaining 0.3M to the first data stream with the highest congestion priority, and adjust the coding rate of the first data stream from 0.5M to 0.8M.

[0162] In another possible implementation, if the fourth recommended rate is greater than the third remaining recommended rate, it means that after allocating the recommended rate corresponding to the current congestion level to all data streams, the coding rate of the first data stream is adjusted to the guaranteed bit rate of the first data stream, and there will still be a remaining recommended rate that can be allocated.

[0163] Based on this, in the embodiment of the present application, when the fourth recommended rate is greater than the third remaining recommended rate, the terminal device adjusts the encoding rate of the first data stream from the first recommended rate to the guaranteed bit rate of the first data stream.

[0164] If the total recommended rate of the data stream still remains after the coding rate of the first data stream is adjusted from the first recommended rate to the guaranteed bit rate of the first data stream, the remaining recommended rate can be allocated to other data streams based on the congestion priority of other data streams.

[0165] For example, if there are three data streams, the guaranteed bit rates of the first data stream, the second data stream and the third data stream are all 1M, and under the current congestion level, the recommended rates of the first data stream, the second data stream and the third data stream are all 0.5M, and the total recommended rate of the data stream is 2.8M. The terminal device can first adjust the encoding rate of the first data stream to 0.5M. At this time, the third remaining recommended rate is 0.5M, and the remaining 2.3M recommended rate in the total recommended rate of the data stream can be allocated.

[0166] Since the second data stream is the data stream with the highest congestion priority among the unregulated data streams, the terminal device can allocate the recommended rate corresponding to the current congestion level from 2.3M to the second data stream, that is, allocate 0.5M to the second data stream to adjust the coding rate of the second data stream to 0.5M. At this time, the remaining 1.8M recommended rate can be allocated.

[0167] For the third data stream, the recommended rate corresponding to the current congestion level is less than the current remaining recommended rate, that is, the third recommended rate of the third data stream is less than the second remaining recommended rate. In this case, the terminal device can adjust the coding rate of the third data stream to 0.5M.

[0168] After the coding rate of the third data stream is adjusted to 0.5M, the coding rates of all data streams have been adjusted, but there is still 1.3M of recommended rates left to be allocated, that is, the fourth remaining recommended rate is 1.3M. Since the third remaining recommended rate is 0.5M, which is less than the fourth remaining recommended rate, the terminal device can allocate another 0.5M of recommended rate to the first data stream from the remaining 1.3M, so that the adjusted coding rate of the first data stream is equal to the guaranteed bit rate of the first data stream.

[0169] After adjusting the coding rate of the first data stream to 1M, 0.3M remains in the total recommended rate of the data stream. The current coding rate of the second data stream is 0.5M, which differs from the guaranteed bit rate of the second data stream by 0.5M and is greater than 0.3M. At this time, the remaining 0.3M can be allocated to the second data stream, and the adjusted coding rate of the second data stream is the sum of the second recommended rate corresponding to the second data stream and the remaining recommended rate under the current congestion level, that is, the adjusted coding rate of the second data stream is 0.8M.

[0170] In one possible implementation, the Nth data flow is the data flow with the lowest congestion priority; the second remaining recommended rate is the difference between the total recommended rate of the data flow and the sum of the recommended rates corresponding to the first N-1 data flows under the congestion level; the fifth remaining recommended rate is the difference between the second remaining recommended rate and the Nth recommended rate.

[0171] The fifth remaining recommended rate is greater than 0, indicating that after the coding rate of the Nth data stream is adjusted to the Nth recommended rate corresponding to the Nth data stream, there is still a remaining total recommended rate of the data stream.

[0172] The terminal device may directly allocate the remaining recommended rate to the first data stream, that is, the terminal device adjusts the coding rate of the first data stream from the first recommended rate to the sum of the first recommended rate and the fifth remaining recommended rate.

[0173] For example, if there are two data streams, the guaranteed bit rates of the first data stream and the second data stream are both 1M, and under the current congestion level, the recommended rates of the first data stream and the second data stream are both 0.5M, and the total recommended rate of the data stream is 1.8M, the terminal device can first adjust the encoding rate of the first data stream to 0.5M. At this time, the remaining 1.3M recommended rate in the total recommended rate of the data stream can be allocated, that is, the second remaining recommended rate is 1.3M.

[0174] The terminal device can allocate the recommended rate corresponding to the current congestion level to the second data stream from 1.3M, that is, allocate 0.5M to the second data stream to adjust the coding rate of the second data stream to 0.5M. At this time, the remaining 0.8M recommended rate can be allocated, and the remaining 0.8M is the fifth remaining recommended rate.

[0175] The terminal device can directly allocate the remaining 0.8M to the first data stream, so that the adjusted coding rate of the first data stream is the sum of 0.5M and 0.8M, which is 1.3M.

[0176] In another possible implementation, a data stream without configuration information, such as a data stream without a codec such as control signaling, may be transmitted between the terminal device and the network device. The terminal device may not adjust the encoding rate of such data stream without configuration information.

[0177] For ease of understanding, the following Figure 8 , an overall introduction is given to the second coding rate adjustment method provided in an embodiment of the present application.

[0178] S2100. The terminal device establishes a protocol data unit session with the base station and the core network in the network device.

[0179] S2101. The terminal device sends service initial signaling to the core network.

[0180] S2102. The core network sends configuration information of the first data stream to the terminal device in response to the service initial signaling.

[0181] The configuration information of the first data stream may include but is not limited to identification information of the first data stream, a guaranteed bit rate of the first data stream, a congestion priority of the first data stream, and recommended rates corresponding to the first data stream at different congestion levels.

[0182] S2103. The core network sends configuration information of the second data stream to the terminal device in response to the service initial signaling.

[0183] The configuration information of the second data stream may include but is not limited to identification information of the second data stream, a guaranteed bit rate of the second data stream, a congestion priority of the second data stream, and recommended rates corresponding to the second data stream at different congestion levels.

[0184] For example, the identification information of the data flow may be the information identification (QFI) of the quality service flow corresponding to the data flow, such as Figure 8 As shown, the configuration information of the first data flow sent by the core network to the terminal device includes the command to update the PDU Session, QFI, GBR, congestion priority, and the recommended rate corresponding to the first data flow at different congestion levels. Among them, QFI is 1; GBR is 1M; congestion priority is 1; when the congestion level is 1, the recommended rate corresponding to the first data flow is 0.8M; when the congestion level is 2, the recommended rate corresponding to the first data flow is 0.5M.

[0185] The configuration information of the second data stream sent by the core network to the terminal device also includes the command to update the PDU Session, QFI, GBR, congestion priority, and the recommended rate corresponding to the second data stream at different congestion levels. The QFI is 2; the GBR is 1M; the congestion priority is 1; when the congestion level is 1, the recommended rate corresponding to the second data stream is 0.5M; when the congestion level is 2, the recommended rate corresponding to the second data stream is 0.3M.

[0186] It can be understood that the method of expressing congestion priority and congestion level in the embodiments of the present application is not specifically limited. Here, it is only introduced as an example that the smaller the value of the congestion priority, the higher the congestion priority of the corresponding data flow, and the smaller the value of the congestion level, the lower the congestion level.

[0187] Meanwhile, the number of congestion levels is not specifically limited in the embodiments of the present application, and only two congestion levels corresponding to data flows are used as an example for introduction.

[0188] In the event of network congestion, execute S2104 and the base station sends a recommended rate indication to the terminal device.

[0189] like Figure 8 As shown, the recommended rate indication includes a total recommended data flow rate of 1M and a congestion level of 2.

[0190] S2105. Based on the recommended rate indication and the configuration information of each data stream, the terminal device adjusts the coding rate of the first data stream corresponding to QFI1 to 0.5M and adjusts the coding rate of the second data stream corresponding to QFI2 to 0.3M.

[0191] Since 0.2M is still left after the recommended rates corresponding to the congestion levels are allocated to the first data stream and the second data stream, S2106 may be executed, where the terminal device allocates the remaining 0.2M to the first data stream.

[0192] After the terminal device allocates the remaining 0.2M to the first data stream, the adjusted coding rate of the first data stream is 0.7M.

[0193] In summary, the coding rate adjustment method provided in the embodiment of the present application can, when the sending network is congested, determine the corresponding adjusted coding rate for each data stream based on the congestion priority of the data stream and the recommended rate corresponding to the congestion level, thereby implementing data stream-level coding rate adjustment. Since the recommended rate corresponding to each data stream under the current congestion level is taken into account in the embodiment of the present application, the coding rate can be allocated to more data streams from the total recommended rate of the data stream as much as possible.

[0194] Embodiment 3

[0195] Different from the above-mentioned embodiment 1 and embodiment 2, in the embodiment of the present application, when the network device detects that network congestion occurs, the network device can determine the adjusted coding rate corresponding to each data stream according to the congestion priority of each data stream. The terminal device can directly receive the adjusted coding rate corresponding to each data stream determined by the network device, thereby achieving data stream-level coding rate adjustment without the terminal device being aware of it, thereby improving the operating efficiency of the terminal device. Fig. 9 As shown, this figure is a timing diagram of the third coding rate adjustment method provided in an embodiment of the present application.

[0196] S301: A terminal device establishes a protocol data unit session with a network device.

[0197] S302: The terminal device sends service initial signaling to the network device.

[0198] In the embodiment of the present application, the service initial signaling is used to instruct the network device to configure the configuration information of each data stream for the terminal device. The configuration information of the data stream may include but is not limited to the identification information of the data stream, the guaranteed bit rate of each data stream, and the congestion priority of each data stream.

[0199] S303: The network device configures configuration information of each data flow.

[0200] S304: The network device detects that network congestion occurs.

[0201] In a possible implementation, the network device may detect the network status in real time. When it is detected that network congestion occurs, S305 is executed, where the network device determines the total recommended rate of the data flow.

[0202] In another possible implementation, the terminal device may send a network status acquisition request to the network device, and the network device may detect the network status after receiving the network status acquisition request. When the network device detects that network congestion occurs, S305 is executed, and the network device determines the total recommended rate of the data flow.

[0203] S306: The network device adjusts the coding rate of each data stream according to the total recommended rate of the data stream and the configuration information of each data stream to obtain the adjusted coding rate of each data stream.

[0204] In one possible implementation, when the guaranteed bit rate of the first data stream is greater than or equal to the total recommended rate of the data stream, the encoding rate of the first data stream is adjusted to the total recommended rate of the data stream, and the encoding rates of other data streams in the data streams except the first data stream are adjusted to 0.

[0205] The first data flow is the data flow with the highest congestion priority among all data flows.

[0206] When the guaranteed bit rate of the first data stream is less than the total recommended rate of the data stream, the coding rate of the first data stream is adjusted to the guaranteed bit rate of the first data stream; based on the difference between the total recommended rate of the data stream and the guaranteed bit rate of the first data stream, and according to the congestion priority of other data streams in each data stream except the first data stream, the coding rates of other data streams are adjusted respectively to obtain the adjusted coding rates of other data streams.

[0207] In another possible implementation, when the guaranteed bit rate of the Nth data stream is greater than or equal to the first remaining recommended rate, the coding rate of the Nth data stream is adjusted to the first remaining recommended rate, and the coding rate of the data stream whose congestion priority is lower than the congestion priority of the Nth data stream is adjusted to 0.

[0208] When the guaranteed bit rate of the Nth data stream is less than the first remaining recommended rate, the encoding rate of the Nth data stream is adjusted to the guaranteed bit rate.

[0209] It is understandable that S306 is similar to the above-mentioned S106 and will not be described in detail here.

[0210] S307: The network device sends the adjusted coding rate of each data stream to the terminal device.

[0211] After receiving the adjusted coding rates of the various data streams, the terminal device may directly adjust the coding rates of the various data streams based on the adjusted coding rates of the various data streams.

[0212] In another possible implementation, a data stream without configuration information, such as a data stream without a codec such as control signaling, may be transmitted between the terminal device and the network device. The terminal device may not adjust the encoding rate of such data stream without configuration information.

[0213] For ease of understanding, the following Fig.10 , an overall introduction is given to the third coding rate adjustment method provided in an embodiment of the present application.

[0214] S3100. The terminal device establishes a protocol data unit session with the base station and the core network in the network device.

[0215] S3101. The terminal device sends service initial signaling to the core network.

[0216] S3102. The core network sends configuration information of the first data flow to the base station in response to the service initial signaling.

[0217] The configuration information of the first data stream may include, but is not limited to, identification information of the first data stream, a guaranteed bit rate of the first data stream, and a congestion priority of the first data stream.

[0218] S3103. The core network sends configuration information of the second data flow to the base station in response to the service initial signaling.

[0219] The configuration information of the second data stream may include, but is not limited to, identification information of the second data stream, a guaranteed bit rate of the second data stream, and a congestion priority of the second data stream.

[0220] For example, the identification information of the data flow may be the information identification (QFI) of the quality service flow corresponding to the data flow, such as Fig.10 As shown, the configuration information of the first data flow sent by the core network to the terminal device includes a command to update the PDU Session, QFI, GBR, and congestion priority, wherein the QFI is 1, the GBR is 1M, and the congestion priority is 1.

[0221] The configuration information of the second data flow sent by the core network to the terminal device also includes a command to update the PDU Session, QFI, GBR, and congestion priority, wherein the QFI is 2, the GBR is 1M, and the congestion priority is 2.

[0222] It is understandable that the method of expressing the congestion priority in the embodiments of the present application is not specifically limited, and is only introduced here by taking the example that the smaller the value of the congestion priority, the higher the congestion priority of the corresponding data flow.

[0223] In the event of network congestion, S3104 is executed and the base station determines that the total recommended rate of the data flow is 1.5M.

[0224] S3105. The base station determines, based on the recommended rate indication and the configuration information of each data stream, that the adjusted coding rate of the first data stream corresponding to QFI1 is 1M, and the adjusted coding rate of the second data stream corresponding to QFI2 is 0.5M.

[0225] S3106. The base station sends recommended rate indication information to the terminal device.

[0226] The recommended rate indication information includes that the adjusted coding rate of the first data stream corresponding to QFI1 is 1M, and the adjusted coding rate of the second data stream corresponding to QFI2 is 0.5M. Therefore, the terminal device can directly adjust the coding rate of each data stream based on the recommended rate indication information.

[0227] In summary, the coding rate adjustment method provided by the embodiment of the present application can determine the corresponding adjusted coding rate for each data stream based on the congestion priority of the data stream when the sending network is congested, and send the adjusted coding rate corresponding to each data stream to the terminal device. In this way, the coding rate adjustment at the data stream level can be achieved while making the terminal device unaware, thereby improving the operating efficiency of the terminal device.

[0228] Embodiment 4:

[0229] like Fig.11 As shown, this figure is a timing diagram of the fourth coding rate adjustment method provided in the embodiment of the present application. Different from the above-mentioned embodiment 3, the embodiment of the present application adjusts the coding rate based on the congestion priority of each data stream while considering the recommended rate corresponding to the congestion level, so as to allocate coding rates to more data streams from the total recommended rate of the data stream as much as possible.

[0230] S401: A terminal device establishes a protocol data unit session with a network device.

[0231] It is understandable that S401 is the same as the above-mentioned S101 and will not be described in detail here.

[0232] S402: The terminal device sends service initialization signaling to the network device.

[0233] In the embodiment of the present application, the service initial signaling is used to indicate the configuration information of each data stream configured by the network device for the terminal device. The configuration information of the data stream may include but is not limited to the identification information of the data stream, the guaranteed bit rate of each data stream, the congestion priority of each data stream, and the recommended rate corresponding to each data stream under different congestion levels.

[0234] S403: The network device configures configuration information of each data flow.

[0235] S404: The network device and the terminal device detect that network congestion occurs.

[0236] In a possible implementation, the network device may detect the network status in real time. When it is detected that network congestion occurs, S405 is executed, where the network device determines the congestion level and the total recommended rate of the data flow.

[0237] In another possible implementation, the terminal device may send a network status acquisition request to the network device, and the network device may detect the network status after receiving the network status acquisition request. When the network device detects that network congestion occurs, S405 is executed, and the network device determines the congestion level and the total recommended rate of the data flow.

[0238] The total recommended rate of the data stream may be greater than or equal to the sum of the adjusted coding rates of the data streams.

[0239] S406. The network device adjusts the coding rate of each data stream according to the total recommended rate of the data stream, the recommended rate corresponding to each data stream under the congestion level, and the congestion priority of each data stream to obtain the adjusted coding rate of each data stream.

[0240] In one possible implementation, when the first recommended rate corresponding to the first data flow under the congestion level is greater than or equal to the total recommended rate of the data flow, the network device may determine the coding rate of the first data flow as the total recommended rate of the data flow, and determine the coding rates of other data flows in each data flow except the first data flow as 0.

[0241] The first data flow is the data flow with the highest congestion priority among all data flows.

[0242] When the first recommended rate corresponding to the first data flow under the congestion level is less than the total recommended rate of the data flow, the network device determines the coding rate of the first data flow as the first recommended rate, and obtains the adjusted coding rate corresponding to the first data flow as the first recommended rate of the first data flow.

[0243] In this case, since there is still remaining rate to be allocated in the total recommended rate of the data flow, the network device can determine the coding rates of other data streams based on the difference between the total recommended rate of the data flow and the first recommended rate, and according to the recommended rates corresponding to other data flows in each data flow except the first data flow under the congestion level, and the congestion priorities of other data flows, to obtain the adjusted coding rates of other data streams.

[0244] In one possible implementation, when the Nth recommended rate corresponding to the Nth data stream under the congestion level is greater than or equal to the second remaining recommended rate, the network device may adjust the coding rate of the Nth data stream to the second remaining recommended rate, and adjust the coding rate of the data stream with a congestion priority lower than the congestion priority of the Nth data stream to 0.

[0245] In another possible implementation, when the Nth recommended rate corresponding to the Nth data stream under the congestion level is less than the second remaining recommended rate, the network device may adjust the coding rate of the Nth data stream to the Nth recommended rate.

[0246] In another possible implementation, the third remaining recommended rate is the difference between the guaranteed bit rate of the first data stream and the first recommended rate, and the fourth remaining recommended rate is the recommended rate remaining after allocating the total recommended rate of the data stream to all data streams.

[0247] When the fourth remaining recommended rate is less than or equal to the third remaining recommended rate, the network device may adjust the encoding rate of the first data stream from the first recommended rate to the sum of the first recommended rate and the fourth remaining recommended rate.

[0248] In another possible implementation, when the fourth recommended rate is greater than the third remaining recommended rate, the network device may adjust the encoding rate of the first data stream from the first recommended rate to the guaranteed bit rate of the first data stream.

[0249] If the total recommended rate of the data stream still remains after the coding rate of the first data stream is adjusted from the first recommended rate to the guaranteed bit rate of the first data stream, the remaining recommended rate can be allocated to other data streams based on the congestion priority of other data streams.

[0250] In a possible implementation, after allocating recommended rates corresponding to congestion levels to all data streams, the network device may directly adjust the coding rate of the first data stream from the first recommended rate to the sum of the first recommended rate and the fifth remaining recommended rate.

[0251] In another possible implementation, a data stream without configuration information, such as a data stream without a codec such as control signaling, may be transmitted between the terminal device and the network device. The terminal device may not adjust the encoding rate of such data stream without configuration information.

[0252] It is understandable that S406 is similar to the above-mentioned S206 and will not be elaborated here.

[0253] S407: The network device sends the adjusted coding rate of each data stream to the terminal device.

[0254] After receiving the adjusted coding rates of the various data streams, the terminal device may directly adjust the coding rates of the various data streams based on the adjusted coding rates of the various data streams.

[0255] In another possible implementation, a data stream without configuration information, such as a data stream without a codec such as control signaling, may be transmitted between the terminal device and the network device. The terminal device may not adjust the encoding rate of such data stream without configuration information.

[0256] For ease of understanding, the following Fig.12 , an overall introduction is given to the fourth coding rate adjustment method provided in an embodiment of the present application.

[0257] S4100. The terminal device establishes a protocol data unit session with the base station and the core network in the network device.

[0258] S4101. The terminal device sends service initial signaling to the core network.

[0259] S4102. The core network sends configuration information of the first data flow to the base station in response to the service initial signaling.

[0260] The configuration information of the first data stream may include but is not limited to identification information of the first data stream, a guaranteed bit rate of the first data stream, a congestion priority of the first data stream, and recommended rates corresponding to the first data stream at different congestion levels.

[0261] S4103. The core network sends configuration information of the second data flow to the base station in response to the service initial signaling.

[0262] The configuration information of the second data stream may include but is not limited to identification information of the second data stream, a guaranteed bit rate of the second data stream, a congestion priority of the second data stream, and recommended rates corresponding to the second data stream at different congestion levels.

[0263] For example, the identification information of the data flow may be the information identification (QFI) of the quality service flow corresponding to the data flow, such as Fig.11 As shown, the configuration information of the first data flow sent by the core network to the base station includes a command to update the PDU Session, QFI, GBR, congestion priority, and the recommended rate corresponding to the first data flow at different congestion levels. Among them, QFI is 1; GBR is 1M; congestion priority is 1; when the congestion level is 1, the recommended rate corresponding to the first data flow is 0.8M; when the congestion level is 2, the recommended rate corresponding to the first data flow is 0.5M.

[0264] The configuration information of the second data flow sent by the core network to the base station also includes the command to update the PDU Session, QFI, GBR, congestion priority, and the recommended rate corresponding to the second data flow at different congestion levels. The QFI is 2; the GBR is 1M; the congestion priority is 1; when the congestion level is 1, the recommended rate corresponding to the second data flow is 0.5M; when the congestion level is 2, the recommended rate corresponding to the second data flow is 0.3M.

[0265] It can be understood that the method of expressing congestion priority and congestion level in the embodiments of the present application is not specifically limited. Here, it is only introduced as an example that the smaller the value of the congestion priority, the higher the congestion priority of the corresponding data flow, and the smaller the value of the congestion level, the lower the congestion level.

[0266] Meanwhile, the number of congestion levels is not specifically limited in the embodiments of the present application, and only two congestion levels corresponding to data flows are used as an example for introduction.

[0267] In the event of network congestion, S4104 is executed, and the base station determines that the total recommended rate of the data flow is 1M and the congestion level is 2.

[0268] S4105. The base station adjusts the coding rate of the first data stream corresponding to QFI1 to 0.5M and the coding rate of the second data stream corresponding to QFI2 to 0.3M based on the total recommended rate of the data stream, the congestion level and the configuration information of each data stream.

[0269] Since 0.2M is still left after the recommended rates corresponding to the congestion levels are allocated to the first data stream and the second data stream, S4106 can be executed, where the base station allocates the remaining 0.2M to the first data stream and determines the adjusted coding rate of the first data stream to 0.7M.

[0270] S4107. The base station sends recommended rate indication information to the terminal device.

[0271] The recommended rate indication information includes that the adjusted coding rate of the first data stream corresponding to QFI1 is 0.7M, and the adjusted coding rate of the second data stream corresponding to QFI2 is 0.3M. Therefore, the terminal device can directly adjust the coding rate of each data stream based on the recommended rate indication information.

[0272] In summary, the coding rate adjustment method provided by the embodiment of the present application can, in the case of transmission network congestion, determine the corresponding adjusted coding rate for each data stream based on the congestion priority of the data stream and the recommended rate corresponding to the congestion level, thereby realizing data stream-level coding rate adjustment. At the same time, since the embodiment of the present application takes into account the recommended rate corresponding to each data stream under the current congestion level, the coding rate can be allocated to more data streams from the total recommended rate of the data stream as much as possible.

[0273] The terminal device can directly receive the adjusted coding rate of each data stream sent by the network device, thereby improving the operating efficiency of the terminal device.

[0274] like Fig.13 As shown, this figure is a schematic diagram of the hardware composition of a terminal device provided in an embodiment of the present application. The terminal device includes but is not limited to a mobile phone, a smart wearable device (such as a smart watch) and other terminal devices. Taking a mobile phone as an example, the terminal device may include a processor 110, a display screen 120, an audio module 130, an antenna 1, an antenna 2, a mobile communication module 140, and a wireless communication module 150, etc.

[0275] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the terminal device. In other embodiments, the terminal device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0276] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0277] For example, in an embodiment of the present application, the processor 110 can determine the total recommended rate of the data stream; according to the total recommended rate of the data stream and according to the congestion priority of each data stream, adjust the coding rate of each data stream respectively to obtain the adjusted coding rate of each data stream.

[0278] The electronic device implements the display function through a GPU, a display screen 120, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 120 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0279] The display screen 120 is used to display image streams, video streams, etc. In some embodiments, the electronic device may include 1 or N display screens 120 , where N is a positive integer greater than 1.

[0280] Electronic devices can compress or decompress digital videos through video codecs. Electronic devices can support one or more video codecs. In this way, electronic devices can play or record video streams in multiple coding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0281] The electronic device can implement audio functions, such as playing audio streams, through the audio module 130 , the speaker 130A, the headphone interface 130B, and the application processor.

[0282] The audio module 130 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 130 can also be used to encode and decode audio signals. In some embodiments, the audio module 130 can be arranged in the processor 110, or some functional modules of the audio module 130 can be arranged in the processor 110.

[0283] The speaker 130A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device can listen to music or listen to a hands-free call through the speaker 130A.

[0284] The earphone interface 130B is used to connect a wired earphone and can be a USB interface, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0285] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 140, wireless communication module 150, modem processor and baseband processor.

[0286] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0287] The mobile communication module 140 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to terminal devices. The mobile communication module 140 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 140 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 140 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 140 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 140 can be set in the same device as at least some of the modules of the processor 110.

[0288] In some embodiments, the terminal device initiates or receives a call request through the mobile communication module 140 and the antenna 1.

[0289] Exemplarily, in an embodiment of the present application, the terminal device can establish a protocol data unit session with a network device based on the mobile communication module 140 and the antenna 1, send service initial signaling to the network device, receive configuration information of the data stream sent by the network device, and recommended rate indication information, etc.

[0290] In addition, an operating system is running on the above components. For example, an iOS operating system, an Android operating system, a Windows operating system, etc. Applications can be installed and run on the operating system. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the explanation and beneficial effects of the relevant contents in any of the terminal devices provided above can refer to the corresponding method embodiments provided above, and will not be repeated here.

[0291] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A coding rate adjustment method, characterized in that: include: Determine the total recommended rate for data flow; According to the total recommended rate of the data streams and according to the congestion priority of each data stream, the coding rate of each data stream is adjusted respectively to obtain the adjusted coding rate of each data stream.

2. The method according to claim 1, characterized in that The step of adjusting the coding rates of the respective data streams according to the total recommended rate of the data streams and the congestion priority of the respective data streams to obtain the adjusted coding rates of the respective data streams includes: When the guaranteed bit rate of the first data stream is greater than or equal to the total recommended rate of the data stream, the encoding rate of the first data stream is adjusted to the total recommended rate of the data stream, and the encoding rates of the other data streams among the data streams except the first data stream are adjusted to 0; the first data stream is the data stream with the highest congestion priority among the data streams.

3. The method according to claim 1, characterized in that The step of adjusting the coding rates of the respective data streams according to the total recommended rate of the data streams and the congestion priority of the respective data streams to obtain the adjusted coding rates of the respective data streams includes: When the guaranteed bit rate of the first data stream is less than the total recommended rate of the data stream, adjusting the encoding rate of the first data stream to the guaranteed bit rate of the first data stream; Based on the difference between the total recommended rate of the data stream and the guaranteed bit rate of the first data stream, and according to the congestion priority of other data streams among the data streams except the first data stream, the coding rates of the other data streams are adjusted respectively to obtain the adjusted coding rates of the other data streams.

4. The method according to claim 3, characterized in that The step of adjusting the coding rates of the other data streams based on the difference between the total recommended rate of the data stream and the guaranteed bit rate of the first data stream and according to the congestion priorities of the other data streams except the first data stream in the respective data streams to obtain the adjusted coding rates of the other data streams includes: When the guaranteed bit rate of the Nth data stream is greater than or equal to the first remaining recommended rate, the coding rate of the Nth data stream is adjusted to the first remaining recommended rate, and the coding rate of the data stream whose congestion priority is lower than the congestion priority of the Nth data stream is adjusted to 0; the first remaining recommended rate is the difference obtained by subtracting the sum of the guaranteed bit rates of the first N-1 data streams from the total recommended rate of the data stream; the first remaining recommended rate is greater than 0; the congestion priority of the Nth data stream is lower than the congestion priority of the N-1th data stream, and N is an integer greater than or equal to 2; When the guaranteed bit rate of the Nth data stream is less than the first remaining recommended rate, the encoding rate of the Nth data stream is adjusted to the guaranteed bit rate.

5. The method according to claim 1, characterized in that According to the total recommended rate of the data stream and according to the congestion priority of each data stream, respectively adjusting the coding rate of each data stream, and obtaining the adjusted coding rate of each data stream, it also includes: Determine the level of congestion; The step of adjusting the coding rates of the respective data streams according to the total recommended rate of the data streams and the congestion priority of the respective data streams to obtain the adjusted coding rates of the respective data streams includes: According to the total recommended rate of the data streams, the recommended rate corresponding to each data stream under the congestion level, and the congestion priority of each data stream, the coding rate of each data stream is adjusted respectively to obtain the adjusted coding rate of each data stream.

6. The method according to claim 5, characterized in that The step of adjusting the coding rates of the respective data streams according to the total recommended rate of the data streams, the recommended rate corresponding to each data stream under the congestion level, and the congestion priority of each data stream to obtain the adjusted coding rates of the respective data streams includes: When the first recommended rate corresponding to the first data stream under the congestion level is greater than or equal to the total recommended rate of the data stream, the encoding rate of the first data stream is adjusted to the total recommended rate of the data stream, and the encoding rates of the other data streams among the data streams except the first data stream are adjusted to 0.

7. The method according to claim 5, characterized in that The step of adjusting the coding rates of the respective data streams according to the total recommended rate of the data streams, the recommended rate corresponding to each data stream under the congestion level, and the congestion priority of each data stream to obtain the adjusted coding rates of the respective data streams includes: When a first recommended rate corresponding to the first data stream under the congestion level is less than the total recommended rate of the data streams, adjusting the encoding rate of the first data stream to the first recommended rate; Based on the difference between the total recommended rate of the data stream and the first recommended rate, and according to the recommended rates corresponding to the other data streams in the data streams except the first data stream under the congestion level, and the congestion priorities of the other data streams, the coding rates of the other data streams are adjusted respectively to obtain the adjusted coding rates of the other data streams.

8. The method according to claim 6, characterized in that The adjusting the coding rates of the other data streams respectively based on the difference between the total recommended rate of the data stream and the first recommended rate, according to the recommended rates corresponding to the other data streams except the first data stream in the respective data streams at the congestion level, and the congestion priorities of the other data streams, to obtain the adjusted coding rates of the other data streams, includes: When the Nth recommended rate corresponding to the Nth data stream under the congestion level is greater than or equal to the second remaining recommended rate, the coding rate of the Nth data stream is adjusted to the second remaining recommended rate, and the coding rate of the data stream whose congestion priority is lower than the congestion priority of the Nth data stream is adjusted to 0; the second remaining recommended rate is the difference obtained by subtracting the sum of the recommended rates corresponding to the first N-1 data streams under the congestion level from the total recommended rate of the data stream; the second remaining recommended rate is greater than 0; the congestion priority of the Nth data stream is lower than the congestion priority of the N-1th data stream, and N is an integer greater than or equal to 2; When the Nth recommended rate corresponding to the Nth data stream at the congestion level is less than the second remaining recommended rate, the encoding rate of the Nth data stream is adjusted to the Nth recommended rate.

9. The method according to claim 8, characterized in that When the Nth data stream is the data stream with the lowest congestion priority among the data streams, when the Nth recommended rate corresponding to the Nth data stream at the congestion level is less than the second remaining recommended rate, after adjusting the coding rate of the Nth data stream to the Nth recommended rate, the method further includes: When a fourth remaining recommended rate remaining after the total recommended rate of the data stream is allocated to all data streams is less than or equal to a third remaining recommended rate, adjusting the encoding rate of the first data stream from the first recommended rate to the sum of the first recommended rate and the fourth remaining recommended rate, the third remaining recommended rate being the difference between the guaranteed bit rate of the first data stream and the first recommended rate; When the fourth remaining recommended rate is greater than the third remaining recommended rate, the encoding rate of the first data stream is adjusted from the first recommended rate to the guaranteed bit rate of the first data stream.

10. The method according to claim 8, characterized in that When the Nth data stream is the data stream with the lowest congestion priority among the data streams, when the Nth recommended rate corresponding to the Nth data stream at the congestion level is less than the second remaining recommended rate, after adjusting the coding rate of the Nth data stream to the Nth recommended rate, the method further includes: The encoding rate of the first data stream is adjusted from the first recommended rate to the sum of the first recommended rate and a fifth remaining recommended rate, where the fifth remaining recommended rate is the difference between the second remaining recommended rate and the Nth recommended rate.

11. The method according to any one of claims 1 to 10, characterized in that: Before determining the total recommended data flow rate, the method further includes: When a terminal device establishes a protocol data unit session PDU Session with a network device, the terminal device sends a service initialization signaling to the network device, and the service initialization signaling is used to indicate the identification information of each data stream configured by the network device for the terminal device, the guaranteed bit rate of each data stream, and the congestion priority of each data stream.

12. The method according to any one of claims 1 to 10, characterized in that: The determining of the total recommended data flow rate includes: The total recommended rate for the data flow is received from the network device.

13. The method according to any one of claims 1 to 10, characterized in that: According to the total recommended rate of the data stream and according to the congestion priority of each data stream, the coding rate of each data stream is adjusted respectively, and after obtaining the adjusted coding rate of each data stream, the method further includes: The adjusted encoding rates of the respective data streams are received from the network device.

14. The method according to any one of claims 1 to 10, characterized in that: The determining of the total recommended data flow rate includes: Detecting the network status of the uplink logical channel; When the network status is congested, a total recommended rate of the data flow is determined.

15. A terminal device, characterized in that: The terminal device includes: a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of a coding rate adjustment method as described in any one of claims 1-13 according to the instructions in the program code.

16. A network device, characterized in that: The network device includes: a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of a coding rate adjustment method as described in any one of claims 1-10 or 14 according to the instructions in the program code.

Citation Information

Patent Citations

  • Data transmission method and device and computer storage medium

    CN109818874A

  • Method and device for adjusting sending rate

    CN112714072A

  • Explicit congestion control method in named data network

    CN113746748A

  • Coupling multi-stream TCP congestion control method based on available bandwidth allocation

    CN114629847A

  • Coding rate adjusting method and equipment

    CN118101134A