Audio and video data caching method and device and storage medium

By monitoring the round-trip latency and playback bitrate of network data packets in real time and dynamically allocating bandwidth for audio and video data caching, the problem of stuttering in audio and video applications under weak network conditions is solved, enabling smooth playback and efficient resource utilization, and improving the user experience.

CN121985174APending Publication Date: 2026-05-05ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG GEELY HLDG GRP CO LTD
Filing Date
2026-01-23
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In weak network environments, audio and video applications in intelligent connected vehicles are prone to stuttering, buffering, and interruptions, affecting user experience. Existing technologies cannot precisely maintain the application layer experience when network quality deteriorates.

Method used

By monitoring the round-trip latency of network data packets in real time, predicting audio and video bandwidth, and dynamically allocating target bandwidth for caching audio and video data based on audio and video playback bitrate and basic buffer size, intelligent resource allocation is achieved.

Benefits of technology

Achieving continuous audio playback in weak network environments significantly reduces the experience gap during network switching, improves user experience, and enhances the response efficiency of the vehicle's infotainment system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121985174A_ABST
    Figure CN121985174A_ABST
Patent Text Reader

Abstract

The invention discloses an audio and video data caching method and device and a storage medium, relates to the technical field of network transmission, and discloses an audio and video data caching method comprising the following steps: 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 cache window bandwidth based on the audio basic cache size and the first data round-trip delay, and determining a video cache window bandwidth based on the video basic cache size and the first data round-trip delay; 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; and caching the audio data based on the target audio bandwidth, and caching the video data based on the target video bandwidth. According to the invention, intelligent resource allocation based on audio and video content characteristics is realized, so that a user can at least obtain coherent audio experience, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network transmission technology, and in particular to a method, apparatus and storage medium for caching audio and video data. Background Technology

[0002] The audio-visual systems of current intelligent connected vehicles are highly dependent on the network. In actual driving, vehicles often enter environments with weak networks, such as tunnels, underground garages, and remote mountainous areas. The vehicle's network signal may weaken or even be interrupted, leading to increased network latency and data packet loss. This will affect the normal use of in-vehicle applications. For example, video playback may experience delays, stuttering, and reduced image quality, while audio playback may experience stuttering or interruptions.

[0003] The weak network solutions of related technologies often remain at the "basic" level, that is, ensuring that the vehicle's most basic security communication and control systems can maintain operation. However, they cannot provide fine-grained maintenance of the application layer experience when the connection quality deteriorates, which can cause the vehicle's online music, video, navigation and other services to lag, buffer, interrupt or even fail completely, affecting the user experience.

[0004] Therefore, how to achieve continuous audio playback in weak network environments and improve user experience is a problem that urgently needs to be solved.

[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main purpose of this application is to provide a method, device and storage medium for caching audio and video data, aiming to solve the technical problem of how to achieve continuous audio playback and improve user experience in a weak network environment.

[0007] To achieve the above objectives, this application proposes a method for caching audio and video data, the method comprising: If the first data round-trip delay corresponding to the current network data packet of the vehicle is greater than the preset weak network delay threshold, then the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle are determined based on the audio playback bitrate and video playback bitrate of the vehicle. Based on the audio base cache size corresponding to the vehicle and the first data round-trip delay, the audio cache window bandwidth is determined, and based on the video base cache size corresponding to the vehicle and the first data round-trip delay, the video cache window bandwidth is determined. The second predicted audio bandwidth is determined based on the first predicted audio bandwidth and the audio buffer window bandwidth, and the second predicted video bandwidth is determined based on the first predicted video bandwidth and the video buffer window bandwidth. Based on the total bandwidth corresponding to the vehicle and the second predicted audio bandwidth, the target audio bandwidth is determined, and based on the total bandwidth, the second predicted video bandwidth and the target audio bandwidth, the target video bandwidth is determined. The vehicle's audio data is cached based on the target audio bandwidth, and the vehicle's video data is cached based on the target video bandwidth.

[0008] In one embodiment, determining the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle based on the vehicle's audio playback bitrate and video playback bitrate includes: Obtain the first predicted travel time of the vehicle to the target weak network area, and the second predicted travel time of the vehicle in the target weak network area; Based on the vehicle's audio playback bitrate, video playback bitrate, first predicted driving time, and second predicted driving time, the first predicted audio bandwidth and first predicted video bandwidth corresponding to the vehicle are determined.

[0009] In one embodiment, determining the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle based on the vehicle's audio playback bitrate, video playback bitrate, the first predicted driving duration, and the second predicted driving duration includes: Based on the audio security cache, audio playback bitrate, first predicted driving time, and second predicted driving time corresponding to the vehicle, the amount of audio prediction loading data is determined, and based on the video security cache, video playback bitrate, first predicted driving time, and second predicted driving time corresponding to the vehicle, the amount of video prediction loading data is determined. The first predicted audio bandwidth is determined based on the predicted audio data load and the first predicted driving time, and the first predicted video bandwidth is determined based on the predicted video data load and the first predicted driving time.

[0010] In one embodiment, obtaining the first predicted travel time of the vehicle to the target weak network area and the second predicted travel time of the vehicle within the target weak network area includes: The current position and current speed of the vehicle are obtained, and the path distance between the vehicle and the target weak network area is determined based on the current position. The first predicted travel time is determined based on the current driving speed and the path distance; Obtain the length of the target weak network area and the expected driving speed of the vehicle within the target weak network area; The second predicted travel time is determined based on the length of the region and the expected travel speed.

[0011] In one embodiment, caching the vehicle's audio data based on the target audio bandwidth and caching the vehicle's video data based on the target video bandwidth includes: Obtain the vehicle's current speed, minimum audio preload, and minimum video preload. Based on the second predicted driving time, the audio playback bitrate, the current speed, and the minimum audio preload amount, the target audio data volume is determined; The target video data volume is determined based on the second predicted driving time, the video playback bitrate, the current speed, and the minimum video preload amount. The vehicle's audio data is cached based on the target audio bandwidth and the target audio data volume, and the vehicle's video data is cached based on the target video bandwidth and the target video data volume.

[0012] In one embodiment, determining the target audio bandwidth based on the total bandwidth corresponding to the vehicle and the second predicted audio bandwidth, and determining the target video bandwidth based on the total bandwidth, the second predicted video bandwidth, and the target audio bandwidth, includes: Obtain the audio request bandwidth, video request bandwidth, preset reserved bandwidth, and audio bandwidth scaling factor corresponding to the vehicle; The target audio bandwidth is determined based on the total bandwidth, the audio bandwidth scaling factor, the audio request bandwidth, and the second predicted audio bandwidth. The target video bandwidth is determined based on the total bandwidth, the video request bandwidth, the preset reserved bandwidth, the second predicted video bandwidth, and the target audio bandwidth.

[0013] In one embodiment, determining the audio buffer window bandwidth based on the audio base buffer size corresponding to the vehicle and the first data round-trip time, and determining the video buffer window bandwidth based on the video base buffer size corresponding to the vehicle and the first data round-trip time, includes: Obtain the preset round-trip time delay for the vehicle; The audio buffer window bandwidth is determined based on the first data round-trip time, the basic audio buffer size, and the preset data round-trip time. The bandwidth of the video cache window is determined based on the first data round-trip time, the basic video cache size, and the preset data round-trip time.

[0014] In one embodiment, before the step of determining the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle based on the vehicle's audio playback bitrate and video playback bitrate if the first data round-trip delay corresponding to the vehicle's current network data packet is greater than a preset weak network delay threshold, the method further includes: Based on the vehicle's network interface, obtain the instantaneous round-trip latency corresponding to the network data packet; Round-trip delay for obtaining the second data from the previous moment; The first data round-trip time is determined based on the instantaneous round-trip time and the second data round-trip time.

[0015] In addition, to achieve the above objectives, this application also proposes an audio and video data caching device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the aforementioned audio and video data caching method.

[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the aforementioned audio and video data caching method.

[0017] One or more technical solutions proposed in this application have at least the following technical effects: In weak network environments, by pre-allocating target audio bandwidth for audio data caching through data round-trip latency, audio and video playback bitrate, and basic audio and video caching, and by allocating target video bandwidth for video data caching based on the remaining bandwidth, intelligent resource allocation based on the content characteristics of audio and video is achieved. This ensures that users can at least obtain a continuous audio experience, significantly reduces or even eliminates the experience gap during network switching, improves the response efficiency of the entire vehicle system, and enhances the user experience. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1A flowchart illustrating the audio and video data caching method of this application is provided in Embodiment 1. Figure 2 This is a schematic diagram of the device structure of the hardware operating environment involved in the audio and video data caching method in the embodiments of this application.

[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0024] The main solution of this application embodiment is as follows: If the first data round-trip latency corresponding to the current network data packet of the vehicle is greater than a preset weak network latency threshold, then based on the audio playback bitrate and video playback bitrate of the vehicle, a first predicted audio bandwidth and a first predicted video bandwidth corresponding to the vehicle are determined; based on the audio base buffer size corresponding to the vehicle and the first data round-trip latency, an audio buffer window bandwidth is determined, and based on the video base buffer size corresponding to the vehicle and the first data round-trip latency, a video buffer window bandwidth is determined; based on the first predicted audio bandwidth and the audio buffer window bandwidth, a second predicted audio bandwidth is determined, and based on the first predicted video bandwidth and the video buffer window bandwidth, a second predicted video bandwidth is determined; based on the total bandwidth corresponding to the vehicle and the second predicted audio bandwidth, a target audio bandwidth is determined, and based on the total bandwidth, the second predicted video bandwidth, and the target audio bandwidth, a target video bandwidth is determined; based on the target audio bandwidth, the audio data of the vehicle is cached, and based on the target video bandwidth, the video data of the vehicle is cached.

[0025] In this embodiment, for ease of description, the following description will focus on the cache device for recognizing audio and video data.

[0026] The audio-visual systems of current intelligent connected vehicles are highly dependent on the network. In actual driving, vehicles often enter environments with weak networks, such as tunnels, underground garages, and remote mountainous areas. The vehicle's network signal may weaken or even be interrupted, leading to increased network latency and data packet loss. This will affect the normal use of in-vehicle applications. For example, video playback may experience delays, stuttering, and reduced image quality, while audio playback may experience stuttering or interruptions.

[0027] The weak network solutions of related technologies often remain at the "basic" level, that is, ensuring that the vehicle's most basic security communication and control systems can maintain operation, or performing simple network standard switching. They cannot provide fine-grained maintenance of the application layer experience when the connection quality deteriorates, which can cause the vehicle's online music, video, navigation and other services to lag, buffer, interrupt or even fail completely, affecting the user experience.

[0028] For example, online navigation relies on real-time traffic conditions and map data updates. Weak networks can lead to navigation delays, route planning errors, and even users getting lost at complex overpasses or unfamiliar intersections. When users are immersed in a high-fidelity online song or a captivating online video, sudden stutters, buffering icons, or complete silence / still frames create a precipitous drop in the user experience. This abrupt shift from smooth to choppy experiences—such as delayed online navigation causing getting lost or delayed online voice assistants causing control malfunctions—disrupts users' reliance on and expectations of vehicle intelligence, generating a strong sense of frustration and severely impacting the user experience.

[0029] Because different audio-visual content and services are sensitive to network fluctuations to varying degrees—for example, music playback can tolerate a few seconds of latency with some caching, while online games or real-time video calls are extremely sensitive to latency—the relevant technologies cannot distinguish between these scenarios, cannot make predictive adjustments based on network latency trends, and cannot differentiate resource allocation based on the characteristics of different applications (such as audio, which is extremely sensitive to latency, and video, which requires high bandwidth). As a result, the system cannot proactively adjust its caching strategy (such as increasing preloading) when it senses that network quality is starting to decline; nor can it perform smooth degradation (such as prioritizing audio streaming and reducing video quality) under extremely weak network conditions.

[0030] In weak network environments, due to the lack of intelligent dynamic resource scheduling mechanisms within the vehicle's infotainment system, audio and video applications may continuously initiate numerous retransmission requests in an attempt to rebuffer data. This consumes already strained CPU processing cycles and network I / O channels, leading to disorderly competition with critical vehicle data (such as status reporting and map preloading) for limited network bandwidth and CPU resources. This can result in either audio and video applications occupying critical data channels, affecting the responsiveness of safety-related services, or critical data "crowding out" audio and video resources, rendering entertainment functions completely unusable. It can also cause delays in some low-priority but crucial background data interactions (such as map tile preloading, vehicle software status queries, and even minor heartbeat packets related to cloud security). Continuous network retries and error handling increase system load, potentially causing sluggish responses to the entire infotainment interface, such as slow touch and swipe responses, longer application startup times, and a rigidification of the vehicle's system resource allocation mechanism.

[0031] Therefore, how to achieve continuous audio playback in weak network environments and improve user experience is a problem that urgently needs to be solved.

[0032] This application provides a solution that, in a weak network environment, pre-allocates target audio bandwidth for audio data caching by considering data round-trip latency, audio / video playback bitrate, and basic audio / video caching, and allocates target video bandwidth for video data caching based on the remaining bandwidth. This achieves intelligent resource allocation based on the content characteristics of audio and video, ensuring that users can at least obtain a continuous audio experience. It can significantly reduce or even eliminate the experience gap during network switching, improve the response efficiency of the entire vehicle system, and enhance the user experience.

[0033] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or audio / video data caching device capable of performing the above functions. The following description uses an audio / video data caching device as an example to illustrate this embodiment and the subsequent embodiments.

[0034] Based on this, embodiments of this application provide a method for caching audio and video data, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the audio and video data caching method of this application.

[0035] In this embodiment, the audio and video data caching method includes steps S110~S150: Step S110: If the first data round-trip delay corresponding to the current network data packet of the vehicle is greater than the preset weak network delay threshold, then the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle are determined based on the audio playback bitrate and video playback bitrate of the vehicle. In this embodiment, the vehicle can obtain the first data round-trip time corresponding to the current network data packet in real time. Specifically, in a feasible implementation, before step S110, the audio and video data caching method may further include steps A111~A113: Step A111: Based on the network interface of the vehicle, obtain the instantaneous round-trip time corresponding to the network data packet; Step A112: Obtain the round-trip time of the second data from the previous moment; Step A113: Determine the first data round-trip time based on the instantaneous round-trip time and the second data round-trip time.

[0036] In this embodiment, the instantaneous round-trip time corresponding to the network data packets is obtained in real time through the vehicle's network interface. Specifically, the underlying network interface of the vehicle system can be used to continuously collect the RTT (Round-Trip Time) of the network data packets. The RTT is sampled to obtain the instantaneous sampled value, which is the instantaneous round-trip time. At the same time, the second data round-trip time of the previous moment is obtained. That is, the first data round-trip time obtained at the previous sampling moment is used as the second data round-trip time at this moment.

[0037] After obtaining the round-trip time of the second data, the round-trip time of the first data is calculated based on the instantaneous round-trip time and the round-trip time of the second data. Specifically, the round-trip time of the first data is calculated using the following formula 1.

[0038] (Formula 1); in, For the current moment t First data round-trip latency, For the previous moment t The first data round-trip time is the same as the second data round-trip time. As a smoothing factor, , For the current moment t Instantaneous round-trip time delay.

[0039] It should be noted that after obtaining the round-trip time of the first smoothed data, the smoothed data can also be... Mapping to specific latency levels, for example, setting latency level thresholds T1 and T2, such as T1=50ms and T2=200ms, if the first data round-trip time is less than or equal to T1, then the latency level corresponding to the first data round-trip time is determined to be Level 1 latency, at which point the vehicle's network is good. If the first data round-trip time is greater than T2, then the latency level corresponding to the first data round-trip time is determined to be Level 3 latency, at which point the vehicle's network condition is poor, i.e., the vehicle is in a weak network environment. If the first data round-trip time is greater than T1 and less than or equal to T2, then the latency level is Level 2 latency, at which point the vehicle's network is average. This is achieved by establishing a refined latency level... RTT Latency levels can be dynamically bound to a specific set of audio and video caching algorithm parameters (such as cache size and preload amount) for each level, and can then be adjusted based on real-time monitoring. RTT The system automatically and seamlessly switches between different policy sets. At the same time, by transforming continuous and complex network conditions into discrete and actionable levels, the system's response becomes data-driven, avoiding policy instability and improving system stability.

[0040] In this embodiment, compared to traditional methods based on signal strength, RTTIt directly reflects the latency of data transmission and is highly correlated with the "lag" experienced by the user. This can improve the detection accuracy in weak network environments, making control more precise and timely.

[0041] In this embodiment, after obtaining the first data round-trip time delay, the preset network latency threshold of the vehicle is obtained. The preset network latency threshold can be reasonably set, for example, the preset network latency threshold can be T2. Then, it is determined whether the first data round-trip time delay is greater than the preset network latency threshold. Of course, if the latency level corresponding to the first data round-trip time delay has been obtained, it is determined whether the latency level is a level three latency.

[0042] In this embodiment, if the first data round-trip delay is greater than a preset weak network delay threshold, i.e., the delay level is level three, then the current audio playback bitrate and video playback bitrate are obtained, and the first predicted audio bandwidth and the first predicted video bandwidth of the vehicle are calculated based on the audio playback bitrate and video playback bitrate; furthermore, in a feasible implementation, step S110 may include steps B110~B120: Step B110: Obtain the first predicted travel time of the vehicle to the target weak network area, and the second predicted travel time of the vehicle in the target weak network area. Step B120: Based on the vehicle's audio playback bitrate, video playback bitrate, first predicted driving time, and second predicted driving time, determine the vehicle's corresponding first predicted audio bandwidth and first predicted video bandwidth.

[0043] In this embodiment, after obtaining the current audio playback bitrate and video playback bitrate, the first predicted travel time for the vehicle to reach the target weak network area and the second predicted travel time for the vehicle within the target weak network area are obtained. The first predicted travel time can be calculated based on the vehicle's current position and speed, and the second predicted travel time can be calculated based on the length of the target weak network area and the vehicle's possible speed within that area. Further, in a feasible implementation, step B110 may include steps B111 to B114: Step B111: Obtain the current position and current speed of the vehicle, and determine the path distance between the vehicle and the target weak network area based on the current position; Step B112: Determine the first predicted travel time based on the current driving speed and the path distance; Step B113: Obtain the length of the target weak network area and the expected driving speed of the vehicle within the target weak network area. Step B114: Determine the second predicted travel time based on the length of the region and the expected travel speed.

[0044] In this embodiment, the vehicle's current position and speed can be obtained through its current driving data. For example, the vehicle's real-time coordinates, speed, and heading angle can be obtained through its positioning system, and information such as acceleration and angular velocity can be obtained through its inertial measurement unit. Based on this data, the vehicle's current position and speed on its planned path can be obtained, and the path distance between the vehicle and the target weak network area can be determined. It should be noted that the vehicle's driving direction can also be obtained through the above data. If the driving direction is towards the target weak network area, the vehicle's current position and speed are obtained; otherwise, the process ends.

[0045] After obtaining the current driving speed, the first predicted driving time is determined based on the current driving speed and the path distance. Specifically, the first preset driving time is calculated using the following formula 2.

[0046] (Formula 2); in, The first preset driving time, The path distance. This represents the current driving speed.

[0047] Next, the length of the target weak network area (e.g., tunnel length) is obtained, and the expected driving speed of the vehicle within the target weak network area is also obtained. The expected driving speed can be estimated based on road speed limits and real-time traffic conditions.

[0048] After obtaining the expected driving speed, the second predicted driving time is determined based on the area length and the expected driving speed. Specifically, the second predicted driving time is calculated using the following formula 3.

[0049] (Formula 3); in, For the second predicted driving time, For the length of the region, This represents the expected driving speed.

[0050] In this embodiment, after obtaining the first predicted driving time and the second predicted driving time, the first predicted audio bandwidth corresponding to the vehicle is calculated based on the vehicle's audio playback bitrate, the first predicted driving time, and the second predicted driving time; the first predicted video bandwidth is calculated based on the video playback bitrate, the first predicted driving time, and the second predicted driving time. Further, in a feasible implementation, step B120 may include steps B121-B122: Step B121: Based on the audio security cache, audio playback bitrate, first predicted driving time and second predicted driving time corresponding to the vehicle, determine the amount of audio prediction loading data, and based on the video security cache, video playback bitrate, first predicted driving time and second predicted driving time corresponding to the vehicle, determine the amount of video prediction loading data. Step B122: Determine the first predicted audio bandwidth based on the predicted audio data loading amount and the first predicted driving time, and determine the first predicted video bandwidth based on the predicted video data loading amount and the first predicted driving time.

[0051] In this embodiment, after obtaining the first predicted driving time and the second predicted driving time, the audio security cache and video security cache corresponding to the vehicle are obtained. Based on the audio security cache corresponding to the vehicle, the audio playback bitrate, the first predicted driving time, and the second predicted driving time, the amount of audio prediction loading data is determined. Based on the video security cache corresponding to the vehicle, the video playback bitrate, the first predicted driving time, and the second predicted driving time, the amount of video prediction loading data is determined. Specifically, the following formulas 4 and 5 are used to calculate the amount of audio prediction loading data and the amount of video prediction loading data, respectively.

[0052] (Formula 4); (Formula 5); in, Load data volume for audio prediction Loading data for video prediction For audio media at any time t audio playback bitrate, For video media at all times t The video playback bitrate, For audio security caching, For secure video caching, The moment the vehicle leaves the target weak network area. The time when the vehicle enters the target weak network area, where... It is the current time plus the first predicted travel time. It is the current time + the first predicted travel time + the second predicted travel time.

[0053] After obtaining the amount of audio prediction data and the amount of video prediction data, the first predicted audio bandwidth is calculated based on the amount of audio prediction data and the first predicted driving time, and the first predicted video bandwidth is calculated based on the amount of video prediction data and the first predicted driving time. Specifically, the first predicted audio bandwidth and the first predicted video bandwidth are calculated using the following formulas 6 and 7, respectively. (Formula 6); (Formula 7); in, For the first predicted audio bandwidth, This is the second predicted audio bandwidth.

[0054] Step S120: Determine the audio buffer window bandwidth based on the audio base buffer size corresponding to the vehicle and the first data round-trip delay, and determine the video buffer window bandwidth based on the video base buffer size corresponding to the vehicle and the first data round-trip delay. In this embodiment, after obtaining the first data round-trip time, the audio base cache size and video base cache size corresponding to the vehicle are obtained. The audio cache window bandwidth is calculated based on the audio base cache size and the first data round-trip time, and the video cache window bandwidth is calculated based on the video base cache size and the first data round-trip time. Further, in a feasible implementation, step S120 may include steps C110~C130: Step C110: Obtain the preset round-trip time delay corresponding to the vehicle; Step C120: Determine the audio buffer window bandwidth based on the first data round-trip time, the basic audio buffer size, and the preset data round-trip time; Step C130: Determine the bandwidth of the video buffer window based on the first data round-trip time, the basic video buffer size, and the preset data round-trip time.

[0055] In this embodiment, after obtaining the first data round-trip time, the preset data round-trip time corresponding to the vehicle is obtained. The audio buffer window bandwidth is calculated based on the first data round-trip time, the audio base buffer size, and the preset data round-trip time. The video buffer window bandwidth is also calculated based on the first data round-trip time, the video base buffer size, and the preset data round-trip time. Specifically, the following formulas 8 and 9 are used to calculate the audio buffer window bandwidth and the video buffer window bandwidth, respectively.

[0056] = (Formula 8); = (Formula 9); in, For audio buffer window bandwidth, For video buffer window bandwidth, For the base audio cache size, This is the base cache size for the video. For the first data round-trip delay, To preset the data round-trip time, This is the audio adjustment coefficient. This is the video adjustment factor. > ,For example hour, .

[0057] Step S130: Determine the second predicted audio bandwidth based on the first predicted audio bandwidth and the audio buffer window bandwidth, and determine the second predicted video bandwidth based on the first predicted video bandwidth and the video buffer window bandwidth. In this embodiment, after obtaining the audio buffer window bandwidth and the video buffer window bandwidth, a second predicted audio bandwidth is determined based on the first predicted audio bandwidth and the audio buffer window bandwidth. For example, the average value between the first predicted audio bandwidth and the audio buffer window bandwidth is used as the second predicted audio bandwidth, or the maximum value between the first predicted audio bandwidth and the audio buffer window bandwidth is used as the second predicted audio bandwidth. Simultaneously, a second predicted video bandwidth is determined based on the first predicted video bandwidth and the video buffer window bandwidth. For example, the average value between the first predicted video bandwidth and the video buffer window bandwidth is used as the second predicted video bandwidth, or the maximum value between the first predicted video bandwidth and the video buffer window bandwidth is used as the second predicted video bandwidth.

[0058] Step S140: Determine the target audio bandwidth based on the total bandwidth corresponding to the vehicle and the second predicted audio bandwidth, and determine the target video bandwidth based on the total bandwidth, the second predicted video bandwidth and the target audio bandwidth; In this embodiment, after obtaining the second predicted audio bandwidth and the second predicted video bandwidth, the total bandwidth corresponding to the vehicle is obtained, and the target audio bandwidth is calculated based on the total bandwidth and the second predicted audio bandwidth. The target video bandwidth is also calculated based on the total bandwidth, the second predicted video bandwidth, and the target audio bandwidth. Further, in a feasible implementation, step S140 may include steps S141 to S143: Step S141: Obtain the audio request bandwidth, video request bandwidth, preset reserved bandwidth, and audio bandwidth scaling factor corresponding to the vehicle; Step S142: Determine the target audio bandwidth based on the total bandwidth, the audio bandwidth scaling factor, the audio request bandwidth, and the second predicted audio bandwidth; Step S143: Determine the target video bandwidth based on the total bandwidth, the video request bandwidth, the preset reserved bandwidth, the second predicted video bandwidth, and the target audio bandwidth.

[0059] In this embodiment, the vehicle obtains the audio request bandwidth, video request bandwidth, preset reserved bandwidth, and audio bandwidth ratio factor corresponding to the vehicle. The audio request bandwidth can be the request bandwidth of the current vehicle's audio, the video request bandwidth can be the request bandwidth of the current vehicle's video, the preset reserved bandwidth is a fixed bandwidth reserved for the vehicle's key data, and the audio bandwidth ratio factor is the bandwidth ratio factor allocated to audio.

[0060] Next, the target audio bandwidth is calculated based on the total bandwidth, audio bandwidth scaling factor, audio request bandwidth, and second predicted audio bandwidth. The target video bandwidth is then calculated based on the total bandwidth, video request bandwidth, preset reserved bandwidth, second predicted video bandwidth, and target audio bandwidth. Specifically, Formulas 10 and 11 are used to calculate the target audio bandwidth and target video bandwidth, respectively.

[0061] (Formula 10); (Formula 11); in, For the target audio bandwidth, For target video bandwidth, Total bandwidth This is the audio bandwidth scaling factor. , For audio request bandwidth, For the second predicted audio bandwidth, For video request bandwidth, To reserve bandwidth by default, This is the second predicted video bandwidth.

[0062] Step S150: Cache the vehicle's audio data based on the target audio bandwidth, and cache the vehicle's video data based on the target video bandwidth.

[0063] In this embodiment, when the target audio bandwidth and target video bandwidth are obtained, the vehicle's audio data is cached based on the target audio bandwidth, that is, the audio data that the vehicle needs to play in the target weak network area is cached using the target audio bandwidth. The vehicle's video data is cached based on the target video bandwidth, that is, the video data that the vehicle needs to play in the target weak network area is cached using the target video bandwidth. Further, in a feasible implementation, step S150 may include steps S151~S154: Step S151: Obtain the vehicle's current speed, minimum audio preload amount, and minimum video preload amount; Step S152: Determine the target audio data volume based on the second predicted driving time, the audio playback bitrate, the current speed, and the minimum audio preload amount; Step S153: Determine the target video data volume based on the second predicted driving time, the video playback bitrate, the current speed, and the minimum video preload amount; Step S154: Cache the vehicle's audio data based on the target audio bandwidth and the target audio data volume, and cache the vehicle's video data based on the target video bandwidth and the target video data volume.

[0064] In this embodiment, when the target audio bandwidth and target video bandwidth are obtained, the vehicle's current speed, minimum audio preload amount, and minimum video preload amount are obtained. The minimum audio preload amount is the minimum amount of audio data that the vehicle preloads, and the minimum video preload amount is the minimum amount of video data that the vehicle preloads.

[0065] The target audio data volume is calculated based on the second predicted driving time, audio playback bitrate, current speed, and minimum audio preload amount. The target video data volume is also calculated based on the second predicted driving time, video playback bitrate, current speed, and minimum video preload amount. Specifically, the target audio data volume and target video data volume are calculated using the following formulas 10 and 11, respectively.

[0066] (Formula 12); (Formula 13); in, For the target audio data volume, For the target video data volume, , Minimum audio preload amount, Minimum video preload size, For audio playback bitrate, For video playback bitrate, At the current speed, This is the second predicted travel time.

[0067] After obtaining the target audio data volume and target video data volume, the vehicle's audio data is cached based on the target audio bandwidth and target audio data volume. Specifically, the audio cache duration can be determined first based on the target audio bandwidth and target video data volume, for example, audio cache duration = target video data volume / target audio bandwidth. Based on the current time, audio cache duration, and the first predicted travel time, the cache start time is determined. Starting from the cache start time, the vehicle's audio data is cached based on the target audio bandwidth. Specifically, the time difference between the first predicted travel time and the cache start time and the current time is greater than the audio cache duration, so that the vehicle has sufficient time to cache the target video data volume, ensuring that the cached audio data reaches the target audio data volume. Simultaneously, the vehicle's video data is cached based on the target video bandwidth and target video data volume. The caching process for video data is similar to that for audio data.

[0068] In this embodiment, intelligent resource allocation based on the content characteristics of audio and video is implemented in a weak network environment to ensure that users can at least obtain a continuous audio experience, greatly alleviating the worst-case scenario of "no audio or video". It uses valuable bandwidth and computing resources where they are most needed, avoids the waste of resources by blindly retransmitting video streams, and thus indirectly improves the response efficiency of the entire vehicle system.

[0069] This embodiment predicts future network conditions by analyzing real-time RTT (Real-Time Tolerance) trends and proactively preloads content (pre-warming) in weak network environments. This significantly reduces or even eliminates the experience gap during network switching. Predictive caching ensures a smooth and natural user experience transition, avoiding the frustration of sudden stutters or interruptions and achieving a high-end, silky-smooth user experience. Simultaneously, intelligent resource arbitration and differentiated scheduling effectively resolve resource competition conflicts between audio entertainment applications and key vehicle system functions in weak network environments. This not only improves the audio entertainment experience but also ensures the smoothness and stability of the overall vehicle system by reducing disorderly competition, preventing the spread of stuttering effects.

[0070] This application is mainly implemented through algorithms and software logic, without relying on adding new hardware modules or improving network module performance. Therefore, it has excellent cost-effectiveness and deployability, and can be easily implemented on existing vehicle models via OTA (over-the-air) updates.

[0071] This embodiment provides a method for caching audio and video data. If the first round-trip time (RTT) of the current network data packet of a vehicle is greater than a preset weak network latency threshold, then based on the vehicle's audio playback bitrate and video playback bitrate, a first predicted audio bandwidth and a first predicted video bandwidth are determined. Next, based on the vehicle's basic audio buffer size and the first RTT, an audio buffer window bandwidth is determined, and based on the vehicle's basic video buffer size and the first RTT, a video buffer window bandwidth is determined. Then, based on the first predicted audio bandwidth and the audio buffer window bandwidth, a second predicted audio bandwidth is determined, and based on the first predicted video bandwidth and the video buffer window bandwidth, a second predicted video bandwidth is determined. Finally, based on the vehicle's... Based on the total bandwidth and the second predicted audio bandwidth, a target audio bandwidth is determined, and a target video bandwidth is determined based on the total bandwidth, the second predicted video bandwidth, and the target audio bandwidth. Finally, the vehicle's audio data is cached based on the target audio bandwidth, and the vehicle's video data is cached based on the target video bandwidth. In a weak network environment, the target audio bandwidth is pre-allocated for audio data caching through data round-trip latency, audio and video playback bitrate, and audio and video basic caching, and the target video bandwidth is allocated for video data caching based on the remaining bandwidth. This achieves intelligent resource allocation based on the content characteristics of audio and video, so that users can at least obtain a continuous audio experience. It can significantly reduce or even eliminate the experience gap during network switching, improve the response efficiency of the entire vehicle system, and enhance the user experience.

[0072] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the audio and video data caching method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0073] This application provides an audio and video data caching device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the audio and video data caching method in the first embodiment described above.

[0074] The following is for reference. Figure 2The diagram illustrates a structural schematic of an audio / video data caching device suitable for implementing embodiments of this application. The audio / video data caching device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 2 The audio and video data caching device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0075] like Figure 2 As shown, the audio / video data buffering device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the audio / video data buffering device. The processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the audio / video data buffering device to communicate wirelessly or wiredly with other devices to exchange data. Although various systems of audio / video data buffering devices are shown in the figures, it should be understood that it is not required to implement or possess all of the systems shown. More or fewer systems may be implemented alternatively.

[0076] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0077] The audio and video data caching device provided in this application, employing the audio and video data caching method in the above embodiments, can solve the technical problem of how to achieve continuous audio playback and improve user experience in weak network environments. Compared with the prior art, the beneficial effects of the audio and video data caching device provided in this application are the same as those of the audio and video data caching method provided in the above embodiments, and other technical features in this audio and video data caching device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0078] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0079] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0080] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the audio and video data caching method in the above embodiments.

[0081] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0082] The aforementioned computer-readable storage medium may be included in a buffer device for audio and video data; or it may exist independently and not be assembled into a buffer device for audio and video data.

[0083] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the audio / video data caching device, the audio / video data caching device: if the first data round-trip time corresponding to the current network data packet of the vehicle is greater than a preset weak network latency threshold, then, based on the audio playback bitrate and video playback bitrate of the vehicle, determines the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle; based on the audio base cache size corresponding to the vehicle and the first data round-trip time, determines the audio cache window bandwidth, and based on the video base cache size corresponding to the vehicle and the first data round-trip time, determines the video cache window bandwidth; based on the first predicted audio bandwidth and the audio cache window bandwidth, determines the second predicted audio bandwidth, and based on the first predicted video bandwidth and the video cache window bandwidth, determines the second predicted video bandwidth; based on the total bandwidth corresponding to the vehicle and the second predicted audio bandwidth, determines the target audio bandwidth, and based on the total bandwidth, the second predicted video bandwidth, and the target audio bandwidth, determines the target video bandwidth; caches the vehicle's audio data based on the target audio bandwidth, and caches the vehicle's video data based on the target video bandwidth.

[0084] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0085] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0086] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0087] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described audio and video data caching method. This solves the technical problem of how to achieve continuous audio playback and improve user experience in a weak network environment. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the audio and video data caching method provided in the above embodiments, and will not be repeated here.

[0088] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the audio and video data caching method described above.

[0089] The computer program product provided in this application can solve the technical problem of how to achieve continuous audio playback in a weak network environment and improve user experience. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the audio and video data caching method provided in the above embodiments, and will not be repeated here.

[0090] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for caching audio and video data, characterized in that, The method for caching the audio and video data includes: If the first data round-trip delay corresponding to the current network data packet of the vehicle is greater than the preset weak network delay threshold, then the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle are determined based on the audio playback bitrate and video playback bitrate of the vehicle. Based on the audio base cache size corresponding to the vehicle and the first data round-trip delay, the audio cache window bandwidth is determined, and based on the video base cache size corresponding to the vehicle and the first data round-trip delay, the video cache window bandwidth is determined. The second predicted audio bandwidth is determined based on the first predicted audio bandwidth and the audio buffer window bandwidth, and the second predicted video bandwidth is determined based on the first predicted video bandwidth and the video buffer window bandwidth. Based on the total bandwidth corresponding to the vehicle and the second predicted audio bandwidth, the target audio bandwidth is determined, and based on the total bandwidth, the second predicted video bandwidth and the target audio bandwidth, the target video bandwidth is determined. The vehicle's audio data is cached based on the target audio bandwidth, and the vehicle's video data is cached based on the target video bandwidth.

2. The audio and video data caching method as described in claim 1, characterized in that, Determining the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle based on the vehicle's audio playback bitrate and video playback bitrate includes: Obtain the first predicted travel time of the vehicle to the target weak network area, and the second predicted travel time of the vehicle in the target weak network area; Based on the vehicle's audio playback bitrate, video playback bitrate, first predicted driving time, and second predicted driving time, the first predicted audio bandwidth and first predicted video bandwidth corresponding to the vehicle are determined.

3. The audio and video data caching method as described in claim 2, characterized in that, The step of determining the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle based on the vehicle's audio playback bitrate, video playback bitrate, first predicted driving duration, and second predicted driving duration includes: Based on the audio security cache, audio playback bitrate, first predicted driving time, and second predicted driving time corresponding to the vehicle, the amount of audio prediction loading data is determined, and based on the video security cache, video playback bitrate, first predicted driving time, and second predicted driving time corresponding to the vehicle, the amount of video prediction loading data is determined. The first predicted audio bandwidth is determined based on the predicted audio data load and the first predicted driving time, and the first predicted video bandwidth is determined based on the predicted video data load and the first predicted driving time.

4. The audio and video data caching method as described in claim 2, characterized in that, The step of obtaining the first predicted travel time of the vehicle to the target weak network area and the second predicted travel time of the vehicle in the target weak network area includes: The current position and current speed of the vehicle are obtained, and the path distance between the vehicle and the target weak network area is determined based on the current position. The first predicted travel time is determined based on the current driving speed and the path distance; Obtain the length of the target weak network area and the expected driving speed of the vehicle within the target weak network area; The second predicted travel time is determined based on the length of the region and the expected travel speed.

5. The audio and video data caching method as described in claim 2, characterized in that, The step of caching the vehicle's audio data based on the target audio bandwidth and caching the vehicle's video data based on the target video bandwidth includes: Obtain the vehicle's current speed, minimum audio preload, and minimum video preload. Based on the second predicted driving time, the audio playback bitrate, the current speed, and the minimum audio preload amount, the target audio data volume is determined; The target video data volume is determined based on the second predicted driving time, the video playback bitrate, the current speed, and the minimum video preload amount. The vehicle's audio data is cached based on the target audio bandwidth and the target audio data volume, and the vehicle's video data is cached based on the target video bandwidth and the target video data volume.

6. The audio and video data caching method as described in claim 1, characterized in that, The step of determining the target audio bandwidth based on the total bandwidth corresponding to the vehicle and the second predicted audio bandwidth, and determining the target video bandwidth based on the total bandwidth, the second predicted video bandwidth, and the target audio bandwidth, includes: Obtain the audio request bandwidth, video request bandwidth, preset reserved bandwidth, and audio bandwidth scaling factor corresponding to the vehicle; The target audio bandwidth is determined based on the total bandwidth, the audio bandwidth scaling factor, the audio request bandwidth, and the second predicted audio bandwidth. The target video bandwidth is determined based on the total bandwidth, the video request bandwidth, the preset reserved bandwidth, the second predicted video bandwidth, and the target audio bandwidth.

7. The audio and video data caching method as described in claim 1, characterized in that, The step of determining the audio buffer window bandwidth based on the audio base buffer size corresponding to the vehicle and the first data round-trip latency, and determining the video buffer window bandwidth based on the video base buffer size corresponding to the vehicle and the first data round-trip latency, includes: Obtain the preset round-trip time delay for the vehicle; The audio buffer window bandwidth is determined based on the first data round-trip time, the basic audio buffer size, and the preset data round-trip time. The bandwidth of the video cache window is determined based on the first data round-trip time, the basic video cache size, and the preset data round-trip time.

8. The method for caching audio and video data as described in any one of claims 1 to 7, characterized in that, Before the step of determining the first predicted audio bandwidth and the first predicted video bandwidth corresponding to the vehicle based on the vehicle's audio playback bitrate and video playback bitrate, if the first data round-trip delay corresponding to the vehicle's current network data packet is greater than a preset weak network delay threshold, the method further includes: Based on the vehicle's network interface, obtain the instantaneous round-trip latency corresponding to the network data packet; Round-trip delay for obtaining the second data from the previous moment; The first data round-trip time is determined based on the instantaneous round-trip time and the second data round-trip time.

9. A buffering device for audio and video data, characterized in that, The audio and video data caching device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the audio and video data caching method as described in any one of claims 1 to 8.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the audio and video data caching method as described in any one of claims 1 to 8.