US-12621079-B2 - Coding rate adjustment method and related device
Abstract
A coding rate adjustment method, where a terminal device may determine a signal strength change rate of a wireless network, and send the signal strength change rate to a first access network device. The terminal device receives a first coding rate from a media processing device, where the first coding rate is determined based on the signal strength change rate. Then, the terminal device codes audio and video data based on the first coding rate, which can better reflect a current wireless network environment. The terminal device codes the audio and video data based on the first coding rate.
Inventors
- Yan Liu
- Jinzhou YE
Assignees
- HUAWEI TECHNOLOGIES CO., LTD.
Dates
- Publication Date
- 20260505
- Application Date
- 20230220
- Priority Date
- 20200821
Claims (20)
- 1 . A coding rate adjustment method, comprising: receiving, by a terminal device, a measurement control request message from a first access network device, wherein the measurement control request message comprises indication information instructing the terminal device to obtain a signal strength of a wireless network and a sampling periodicity of the signal strength; determining, by the terminal device, a signal strength change rate of the wireless network based on the signal strength and the sampling periodicity of the signal strength; sending the signal strength change rate to the first access network device; receiving, by the terminal device, a first coding rate from a media processing device, wherein the first coding rate is based on the signal strength change rate; and coding, by the terminal device, audio and video data based on the first coding rate.
- 2 . The coding rate adjustment method according to claim 1 , wherein before determining the signal strength change rate, the coding rate adjustment method further comprises sending, by the terminal device, a session establishment request message to a session processing device in the wireless network.
- 3 . The coding rate adjustment method according to claim 2 , wherein the session establishment request message comprises detection capability information of the terminal device.
- 4 . The coding rate adjustment method according to claim 3 , wherein the detection capability information indicates that the terminal device is capable of detecting the signal strength change rate.
- 5 . The coding rate adjustment method according to claim 4 , further comprising: receiving, by the terminal device, a session establishment response message from the session processing device, wherein the session establishment response message instructs the terminal device to detect the signal strength change rate; and starting, by the terminal device, to detect the signal strength change rate based on the session establishment response message.
- 6 . The coding rate adjustment method according to claim 1 , further comprising receiving, by the terminal device, a handover message from the first access network device when a condition for triggering a cell handover is reached.
- 7 . The coding rate adjustment method according to claim 6 , wherein the handover message comprises a second coding rate based on the signal strength change rate.
- 8 . The coding rate adjustment method according to claim 6 , wherein the cell handover is complete when the terminal device is handed over from the first access network device to a second access network device.
- 9 . A coding rate adjustment method, comprising: receiving, by a media processing device, a first notification message from a session processing device, wherein the first notification message comprises detection capability information of a terminal device, and wherein the detection capability information indicates that the terminal device is capable of detecting a signal strength change rate of a wireless network; receiving, by the media processing device, a second coding rate from a first access network device, wherein the second coding rate is based on the signal strength change rate, wherein the signal strength change rate is based on a signal strength of the wireless network and a sampling periodicity of the signal strength; determining, by the media processing device based on coding rate information and the second coding rate, a first coding rate at which the terminal device codes audio and video data; and sending, by the media processing device, the first coding rate to the terminal device.
- 10 . The coding rate adjustment method according to claim 9 , wherein the first notification message further comprises the coding rate information, and wherein the coding rate information comprises a coding rate set of the terminal device.
- 11 . The coding rate adjustment method according to claim 10 , wherein determining the first coding rate at which the terminal device codes audio and video data comprises obtaining, by the media processing device, the first coding rate from the coding rate set when the second coding rate does not belong to the coding rate set.
- 12 . The coding rate adjustment method according to claim 11 , wherein the first coding rate is less than and closest to the second coding rate.
- 13 . The coding rate adjustment method according to claim 9 , further comprising sending, by the media processing device, the coding rate information to the first access network device, wherein the coding rate information comprises a coding rate set of the terminal device.
- 14 . The coding rate adjustment method according to claim 13 , wherein determining the first coding rate at which the terminal device codes audio and video data comprises determining, by the media processing device, that the first coding rate is equal to the second coding rate when the second coding rate belongs to the coding rate set.
- 15 . A coding rate adjustment method, comprising: sending, by a first access network device, a measurement control request message to a terminal device, wherein the measurement control request message instructs the terminal device to measure a signal strength change rate of a wireless network based on a signal strength of the wireless network and a sampling periodicity of the signal strength; receiving, by the first access network device, the signal strength change rate from the terminal device; determining, by the first access network device, a second coding rate based on the signal strength change rate of the wireless network; and sending, by the first access network device, the second coding rate to a media processing device.
- 16 . The coding rate adjustment method according to claim 15 , wherein before receiving the signal strength change rate, the coding rate adjustment method further comprises receiving, by the first access network device, a second notification message from the media processing device, wherein the second notification message comprises detection capability information of the terminal device, and wherein the detection capability information indicates that the terminal device is capable of detecting the signal strength change rate.
- 17 . The coding rate adjustment method according to claim 16 , wherein the second notification message further comprises coding rate information of the terminal device, and wherein the coding rate information comprises a coding rate set of the terminal device.
- 18 . The coding rate adjustment method according to claim 17 , wherein determining the second coding rate based on the signal strength change rate comprises determining, by the first access network device, a coding rate that is in the coding rate set and that corresponds to the signal strength change rate as the second coding rate.
- 19 . The coding rate adjustment method according to claim 18 , wherein after determining the second coding rate, the coding rate adjustment method further comprises sending, by the first access network device, a handover message to a second access network device when a condition for triggering a cell handover is reached, wherein the handover message comprises the second coding rate, and wherein the cell handover is complete when the terminal device is handed over from the first access network device to the second access network device.
- 20 . A communication apparatus comprising: one or more memories configured to store instructions; and one or more processors coupled to the one or more memories and configured to execute the instructions to cause the communication apparatus to: receive a measurement control request message from a first access network device, wherein the measurement control request message comprises indication information instructing the communication apparatus to obtain a signal strength of a wireless network and a sampling periodicity of the signal strength; determine a signal strength change rate of the wireless network based on the signal strength and the sampling periodicity of the signal strength; send the signal strength change rate to the first access network device; receive a first coding rate from a media processing device, wherein the first coding rate is based on the signal strength change rate; and code audio and video data based on the first coding rate.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This is a continuation of International Patent Application No. PCT/CN2021/106044, filed on Jul. 13, 2021, which claims priority to Chinese Patent Application No. 202010848146.7, filed on Aug. 21, 2020. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD This disclosure relates to the field of communication technologies, and in particular, to a coding rate adjustment method and a related device. BACKGROUND In a communication system, a terminal device may adjust a coding scheme, a coding rate, or a quantity of bits of an error-correcting code as a wireless environment changes, to ensure speech quality and balance data compression and error tolerance. For example, the terminal device may perform adaptive multi-rate (AMR) coding rate adjustment on speech based on uplink quality, cell load, or an uplink signal-to-interference-plus-noise ratio (SINR). However, signal attenuation may be fast when the terminal device enters a weak coverage area (for example, a network edge area, a floor/indoor area, a shadow area, or a fast fading area) or an area with high network load (for example, an area with a large quantity of access users). For example, for a terminal device (for example, a vehicle supporting an internet of vehicles or a handheld terminal in a traveling vehicle) with high mobility, when the terminal device enters the weak coverage area, the terminal device may pass through the weak coverage area in a short period of time due to a fast-moving speed of the terminal device. If AMR coding rate adjustment is still performed based on the uplink quality, the terminal device may have passed through the weak coverage area when a base station deliver s an AMR coding rate adjustment message to the terminal device. In other words, an AMR coding rate is not adjusted when the terminal device passes through the weak coverage area. As a result, a probability of interrupting communication of the terminal device in the weak coverage area is increased. SUMMARY Embodiments of this disclosure provide a coding rate adjustment method and a related device, to reduce a probability of interrupting communication of a terminal device. According to a first aspect, an embodiment of this disclosure provides a coding rate adjustment method. The method may be performed by a terminal device. The terminal device may determine a signal strength change rate of a wireless network, and send the signal strength change rate to a first access network device. The terminal device receives a first coding rate from a media processing device. The first coding rate is determined based on the signal strength change rate. The terminal device codes audio and video data based on the first coding rate. It can be learned that the terminal device may obtain the signal strength change rate of the wireless network, and may obtain the first coding rate determined based on the signal strength change rate. The first coding rate more satisfies a current network environment, and the terminal device codes the audio and video data based on the first coding rate, to help reduce a packet loss rate, and reduce a probability of interrupting communication of the terminal device. In a possible design, the terminal device sends a session establishment request message to a session processing device. The session establishment request message includes detection capability information of the terminal device. The terminal device receives a session establishment response message from the session processing device. The session establishment response message is used to indicate the terminal device to detect the signal strength change rate. The terminal device starts to detect the signal strength change rate based on the session establishment response message. It can be learned that the terminal device needs to receive the response message from the session processing device, and then start to detect the signal strength change rate, to help the terminal device to obtain the signal strength change rate of the wireless network in a timely manner and adjust a coding rate when network signal strength rapidly changes. In a possible design, if a handover condition for triggering a cell handover is reached, the terminal device receives a handover message from the first access network device. The handover message includes a second coding rate. The second coding rate is determined based on the signal strength change rate, and the cell handover means that the terminal device is handed over from the first access network device to a second access network device. It can be learned that, when the network signal strength changes rapidly, the terminal device not only can adjust a coding rate of the audio and video data, but also can be handed over to a cell with better network signal strength, to help reduce a probability of interrupting communication. In a possible design, the terminal devic