Search

CN-121985174-A - Caching method and device for audio and video data and storage medium

CN121985174ACN 121985174 ACN121985174 ACN 121985174ACN-121985174-A

Abstract

The application discloses a caching method, a caching device and a storage medium for audio and video data, which relate to the technical field of network transmission and comprise the steps of determining a first predicted audio bandwidth and a first predicted video bandwidth based on an audio playing code rate and a video playing code rate, determining an audio caching window bandwidth based on an audio basic caching size and a first data round trip time delay, determining a video caching window bandwidth based on a video basic caching size and a first data round trip time delay, determining a target audio bandwidth based on a total bandwidth corresponding to a vehicle and a second predicted audio bandwidth, determining a target video bandwidth based on the total bandwidth, the second predicted video bandwidth and the target audio bandwidth, and caching the audio data based on the target audio bandwidth and the target video bandwidth. The application realizes the intelligent resource allocation based on the content characteristics of the audio and video, so that the user can obtain at least coherent audio experience, and the user experience is improved.

Inventors

  • TIAN CAN
  • ZHANG LONG
  • SHI JIAWEI
  • ZHOU XIQIN
  • CUI YINGJIE
  • HU XINKE
  • WANG MING
  • JIANG ZHONGLIN
  • CHEN YONG

Assignees

  • 浙江吉利控股集团有限公司
  • 吉利汽车研究院(宁波)有限公司

Dates

Publication Date
20260505
Application Date
20260123

Claims (10)

  1. 1. The caching method of the audio and video data is characterized by comprising the following steps of: if the round trip delay of first data corresponding to the current network data packet of the vehicle is larger than a preset weak network delay threshold, determining a first predicted audio bandwidth and a first predicted video bandwidth corresponding to the vehicle based on the audio playing code rate and the video playing code rate of the vehicle; determining an audio buffer window bandwidth based on the audio basic buffer size corresponding to the vehicle and the first data round trip delay, and determining a video buffer window bandwidth based on the video basic buffer size corresponding to the vehicle and the first data round trip delay; Determining a second predicted audio bandwidth based on the first predicted audio bandwidth and the audio buffer window bandwidth, and determining a second predicted video bandwidth based on the first predicted video bandwidth and the video buffer window bandwidth; Determining a target audio bandwidth based on a total bandwidth corresponding to the vehicle and the second predicted audio bandwidth, and determining a target video bandwidth based on the total bandwidth, the second predicted video bandwidth and the target audio bandwidth; and caching the audio data of the vehicle based on the target audio bandwidth, and caching the video data of the vehicle based on the target video bandwidth.
  2. 2. The method for buffering audio and video data according to claim 1, wherein the determining the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle based on the audio playback rate and the video playback rate of the vehicle comprises: acquiring a first predicted running duration of the vehicle reaching a target weak network area and a second predicted running duration of the vehicle in the target weak network area; And determining a first predicted audio bandwidth and a first predicted video bandwidth corresponding to the vehicle based on the audio playing code rate, the video playing code rate, the first predicted running duration and the second predicted running duration of the vehicle.
  3. 3. The method for buffering audio and video data according to claim 2, wherein the determining the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle based on the audio playing code rate, the video playing code rate, the first predicted travel duration and the second predicted travel duration of the vehicle comprises: Determining an audio prediction loading data amount based on an audio safety cache, an audio playing code rate, the first prediction running duration and the second prediction running duration corresponding to the vehicle, and determining a video prediction loading data amount based on a video safety cache, a video playing code rate, the first prediction running duration and the second prediction running duration corresponding to the vehicle; the first predicted audio bandwidth is determined based on the audio predicted loading data amount and the first predicted travel duration, and the first predicted video bandwidth is determined based on the video predicted loading data amount and the first predicted travel duration.
  4. 4. The method for buffering audio and video data according to claim 2, wherein the obtaining a first predicted travel time period for the vehicle to reach a target weak network area and a second predicted travel time period for the vehicle in the target weak network area includes: Acquiring the current position and the current running speed of the vehicle, and determining the path distance between the vehicle and the target weak network area based on the current position; determining the first predicted travel duration based on the current travel speed and the path distance; Acquiring the area length corresponding to the target weak network area and the expected running speed of the vehicle in the target weak network area; the second predicted travel duration is determined based on the zone length and the expected travel speed.
  5. 5. The method for buffering audio and video data according to claim 2, wherein the buffering the audio data of the vehicle based on the target audio bandwidth and the buffering the video data of the vehicle based on the target video bandwidth comprises: acquiring the current speed, the minimum audio pre-load amount and the minimum video pre-load amount of the vehicle; Determining a target audio data amount based on the second predicted travel time length, the audio play code rate, the current speed, and a minimum audio preload; determining a target video data amount based on the second predicted travel time length, the video play code rate, the current speed, and a minimum video preload; And caching audio data of the vehicle based on the target audio bandwidth and the target audio data volume, and caching video data of the vehicle based on the target video bandwidth and the target video data volume.
  6. 6. The method for buffering audio-video data according to claim 1, wherein the determining a target audio bandwidth based on the total bandwidth corresponding to the vehicle and the second predicted audio bandwidth, and determining a target video bandwidth based on the total bandwidth, the second predicted video bandwidth, and the target audio bandwidth, comprises: acquiring an audio request bandwidth, a video request bandwidth, a preset reserved bandwidth and an audio bandwidth scale factor corresponding to the vehicle; determining a target audio bandwidth based on the total bandwidth, the audio bandwidth scaling factor, the audio request bandwidth, and the second predicted audio bandwidth; a target video bandwidth is determined based on the total bandwidth, the video request bandwidth, the preset reserve bandwidth, the second predicted video bandwidth, and the target audio bandwidth.
  7. 7. The method for buffering audio and video data according to claim 1, wherein the determining an audio buffer window bandwidth based on the audio base buffer size corresponding to the vehicle and the first data round trip delay, and determining a video buffer window bandwidth based on the video base buffer size corresponding to the vehicle and the first data round trip delay, comprises: Acquiring the round trip delay of preset data corresponding to the vehicle; Determining the bandwidth of the audio buffer window based on the first data round trip delay, the audio basic buffer size and the preset data round trip delay; And determining the bandwidth of the video buffer window based on the first data round trip time delay, the video basic buffer size and the preset data round trip time delay.
  8. 8. The method for buffering audio and video data according to any one of claims 1 to 7, wherein if the round trip delay of the first data corresponding to the current network packet of the vehicle is greater than a preset weak network delay threshold, the method further comprises, before the step of determining the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle based on the audio playback rate and the video playback rate of the vehicle: Based on the network interface of the vehicle, acquiring the instantaneous round trip delay corresponding to the network data packet; Acquiring a second data round trip delay at the previous moment; And determining the first data round trip delay based on the instantaneous round trip delay and the second data round trip delay.
  9. 9. An audio-video data caching device, characterized in that the audio-video data caching device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the audio-video data caching method according to any one of claims 1 to 8.
  10. 10. A storage medium, characterized in that the storage medium is a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the caching method of audio-video data according to any one of claims 1 to 8.

Description

Caching method and device for audio and video data and storage medium Technical Field The present application relates to the field of network transmission technologies, and in particular, to a method and apparatus for caching audio and video data, and a storage medium. Background The current intelligent network-connected automobile entertainment system is highly dependent on a network, and when a vehicle often enters a weak network environment such as a tunnel, an underground garage, a remote mountain area and the like in actual driving, network signals of the vehicle may be weakened or even interrupted, so that problems such as network delay increase, data packet loss and the like are caused, normal use of vehicle-mounted application is affected, for example, delay jamming and image quality reduction may occur in video playing, and audio jamming and interruption may occur in playing. The weak network solution of the related technology is often remained on the 'bottom protection' level, namely, the most basic safety communication and control system of the vehicle can be ensured to maintain operation, and the application layer experience cannot be finely maintained when the connection quality is deteriorated, so that services such as online music, video, navigation and the like of the vehicle are blocked, buffered, interrupted and even completely disabled, and the user experience is influenced. Therefore, how to realize the continuous playing of the audio in the weak network environment and improve the user experience is a problem that needs to be solved at present. The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present application and is not intended to represent an admission that the foregoing is prior art. Disclosure of Invention The application mainly aims to provide a caching method, a caching device and a storage medium for audio and video data, and aims to solve the technical problem of how to realize continuous playing of audio in a weak network environment and improve user experience. In order to achieve the above object, the present application provides a method for buffering audio and video data, where the method for buffering audio and video data includes: if the round trip delay of first data corresponding to the current network data packet of the vehicle is larger than a preset weak network delay threshold, determining a first predicted audio bandwidth and a first predicted video bandwidth corresponding to the vehicle based on the audio playing code rate and the video playing code rate of the vehicle; determining an audio buffer window bandwidth based on the audio basic buffer size corresponding to the vehicle and the first data round trip delay, and determining a video buffer window bandwidth based on the video basic buffer size corresponding to the vehicle and the first data round trip delay; Determining a second predicted audio bandwidth based on the first predicted audio bandwidth and the audio buffer window bandwidth, and determining a second predicted video bandwidth based on the first predicted video bandwidth and the video buffer window bandwidth; Determining a target audio bandwidth based on a total bandwidth corresponding to the vehicle and the second predicted audio bandwidth, and determining a target video bandwidth based on the total bandwidth, the second predicted video bandwidth and the target audio bandwidth; and caching the audio data of the vehicle based on the target audio bandwidth, and caching the video data of the vehicle based on the target video bandwidth. In an embodiment, the determining, based on the audio playing code rate and the video playing code rate of the vehicle, the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle includes: acquiring a first predicted running duration of the vehicle reaching a target weak network area and a second predicted running duration of the vehicle in the target weak network area; And determining a first predicted audio bandwidth and a first predicted video bandwidth corresponding to the vehicle based on the audio playing code rate, the video playing code rate, the first predicted running duration and the second predicted running duration of the vehicle. In an embodiment, the determining the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle based on the audio playing code rate, the video playing code rate, the first predicted running duration and the second predicted running duration of the vehicle includes: Determining an audio prediction loading data amount based on an audio safety cache, an audio playing code rate, the first prediction running duration and the second prediction running duration corresponding to the vehicle, and determining a video prediction loading data amount based on a video safety cache, a video playing code rate, the first prediction running dur