A method for testing the latency of loading live stream content
By constructing a latency testing method for live streaming, separating and labeling the video, audio, and network data of the live stream, and combining it with an environmental awareness model to simulate disturbances and generate a causal inference graph, this method solves the problems of fine-grained tracing and dynamic environment simulation in existing latency testing technologies, and achieves accurate analysis and optimization of latency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHONGSHIYUN (BEIJING) TECH CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-07-31
AI Technical Summary
Existing live streaming latency testing technologies cannot accurately trace the latency generation process and are unable to accurately simulate and analyze latency bottlenecks in dynamic environments, resulting in discrepancies between test results and real-world scenarios.
By acquiring the raw data array of the live stream, we separate and label the video stream fingerprint, audio stream fingerprint, and network packet timing mark, construct the initial contour of the delay trajectory, introduce an environmental awareness model to simulate disturbances, generate an extended contour of the delay trajectory, construct a causal inference graph, calculate the potential delay emergence location and aggregation intensity, and generate a compensation vector in reverse to simulate the test.
It enables refined breakdown and causal analysis of latency, identifies the main transmission paths and vulnerable points of latency, provides closed-loop optimization measures verification methods, and improves the accuracy and effectiveness of testing.
Smart Images

Figure CN121940568B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of streaming media live broadcast latency testing technology, specifically a latency testing method for loading live broadcast images. Background Technology
[0002] In the field of live streaming, live video loading latency is a key indicator affecting user experience. Existing latency testing technologies mainly fall into two categories: end-to-end total latency measurement and segmented monitoring of independent stages. End-to-end measurement only reflects the final latency result perceived by the user and cannot distinguish whether the latency specifically occurs during content transmission, decoding processing, or video rendering. Segmented monitoring methods can collect independent performance data for each stage, but the data lacks effective temporal correlation and causal logic, making it difficult to analyze the transmission, accumulation, and amplification effects of latency across different stages.
[0003] Another limitation of existing testing schemes lies in the static nature of their testing environment. Live streaming services face dynamically changing network conditions and diverse terminal devices, and the generation and evolution of latency are affected by a combination of various random disturbances. Current methods struggle to systematically introduce and simulate such environmental disturbances in testing, leading to discrepancies between test results and latency performance in real-world complex scenarios, and an inability to accurately predict the emergence and dynamic evolution of latency bottlenecks. Therefore, a testing method is needed that can precisely trace the source of latency generation and simulate and analyze the propagation mechanism of latency under disturbed environments. Summary of the Invention
[0004] This invention aims to solve at least one of the technical problems existing in the prior art; Therefore, this invention proposes a latency testing method for loading live stream images, comprising: Obtain the native data array of the live stream to be tested during its complete playback cycle. The native data array includes synchronously collected video stream fingerprints, audio stream fingerprints, and network packet timing markers. The original data array is subjected to delay trace separation and marking processing to generate an initial outline of the delay trajectory, which includes multiple interrelated rendering trajectories, playback trajectories and transmission trajectories. An environmental perception model is introduced to apply a perturbation simulation process to the initial contour of the time-delay trajectory, resulting in an extended contour of the time-delay trajectory containing the perturbation effect. Based on the extended contour of the time delay trajectory, a causal inference graph for time delay propagation is constructed. The emergence location and aggregation strength of potential time delay are calculated by traversing the nodes and edges of the causal inference graph. Based on the emergence location and aggregation intensity of the potential latency, compensation vectors are generated in reverse for the rendering trajectory, playback trajectory, and transmission trajectory. These compensation vectors are then applied to the native data array to complete the latency simulation test.
[0005] Preferably, the step of performing delay trace separation and marking processing on the native data array to generate an initial contour of the delay trajectory includes: The timestamp chain of the video stream fingerprint is extracted from the native data array, and an event sequence of the video frame from decoding readiness to rendering completion is established. The event sequence is differentiated to obtain the instantaneous change rate of the rendering trajectory. The waveform feature sequence of the audio stream fingerprint is extracted from the native data array and aligned segment by segment with the system audio clock to identify the retention interval of the audio data in the playback buffer. The length distribution of the retention interval constitutes the playback trajectory. The network packet timing markers are parsed from the native data array to reconstruct the transmission path of the data packet from the sender to the receiver, and the delay increment of each hop on the transmission path is calculated. The set of delay increments constitutes the transmission trajectory. The instantaneous change rate of the rendering trajectory, the playback trajectory, and the transmission trajectory are superimposed in a unified time coordinate system. During the superposition process, the intersection and separation points of the rendering trajectory, playback trajectory, and transmission trajectory on the timeline are marked. The intersection points, separation points, and the state values of each trajectory at the intersection and separation points together constitute the initial outline of the time delay trajectory.
[0006] Preferably, the step of introducing an environmental perception model to apply a perturbation simulation process to the initial contour of the time-delay trajectory to obtain an extended contour of the time-delay trajectory containing the perturbation effect includes: The real-time resource load spectrum of the playback terminal is collected, and the resource load spectrum includes the processor utilization rate change curve and the memory utilization rate change curve. A perturbation mapping relationship is constructed, mapping the peak position of the processor utilization rate change curve to the compression effect on the rendering trajectory, and mapping the trough position of the memory utilization rate change curve to the stretching effect on the playback trajectory. The historical fluctuation pattern of the current network link is obtained, the historical fluctuation pattern is simulated as a periodic noise signal, and the periodic noise signal is injected into the transmission trajectory to cause temporal distortion of the transmission trajectory; On the initial contour of the delay trajectory, the density of the rendering trajectory is dynamically adjusted according to the compression effect, the slope of the playback trajectory is dynamically modified according to the stretching effect, and virtual delay spikes are inserted on the transmission trajectory according to the timing distortion. By integrating the density-adjusted rendering trajectory, the slope-modified playback trajectory, and the transmission trajectory with inserted delay spikes, an extended contour of the delay trajectory that deforms under simulated environmental disturbances is formed.
[0007] Preferably, the step of constructing a causal inference graph of time delay propagation based on the extended contour of the time delay trajectory includes: Each feature change point in the extended contour of the delay trajectory is defined as a graph node. The feature change points include density abrupt change points of the rendering trajectory, slope inflection points of the playback trajectory, and delay peak vertices of the transmission trajectory. Define directed edges between nodes. The direction of the edges is determined by the time sequence and data flow dependency. The weight of the edges represents the strength of the influence of the upstream node on the downstream node. Based on the spatiotemporal interference relationship between different trajectories in the extended contour of the time-delay trajectory, virtual connection edges across trajectories are added to the causal inference graph. The virtual connection edges represent the implicit coupling effect between the three processes of rendering, playback, and transmission. Using a graph traversal algorithm, starting from the source node of the causal inference graph, the product of the weights of the connecting edges on each path is accumulated. The end nodes of the paths where the accumulated product exceeds a threshold are marked as the emergence positions of potential time delays, and the value of the accumulated product is recorded as the aggregation strength of the end nodes of the paths.
[0008] Preferably, the reverse generation of compensation vectors for the rendering trajectory, playback trajectory, and transmission trajectory includes: For each identified potential delay emergence location, backtrack to all its upstream cause nodes in the causal inference graph; Based on the type of the cause node, its corresponding aggregation intensity is decomposed into rendering compensation component, playback compensation component and transmission compensation component according to a preset ratio. The decomposed rendering compensation components are converted into preload time offsets for the rendering trajectory, the playback compensation components are converted into buffer level adjustments for the playback trajectory, and the transmission compensation components are converted into redundant packet sending suggestions for the transmission trajectory. The preload time offset, buffer level adjustment, and redundant packet suggestion amounts corresponding to all emerging positions are summarized to form system-level compensation vectors that act on the rendering trajectory, playback trajectory, and transmission trajectory, respectively.
[0009] Preferably, applying the compensation vector to the native data array to complete the latency simulation test includes: Read the preloaded time offset from the system-level compensation vector for the rendering trajectory, and embed a time preemption instruction based on the preloaded time offset into the video decoding thread scheduling strategy; Read the buffer level adjustment amount in the system-level compensation vector for the playback trajectory, dynamically reconstruct the management strategy of the audio playback buffer, and use the buffer level adjustment amount as the target level line; Read the redundant packet sending suggestion in the system-level compensation vector for the transmission trajectory, modify the data packet sending strategy of the network layer, and insert forward error correction data packets according to the redundant packet sending suggestion; After applying the time preemption command, target water level, and forward error correction data packet, the playback process of the live stream under test is restarted, and a new native data array is collected synchronously. By comparing the original data arrays before and after applying compensation, the morphological changes of the rendering trajectory, playback trajectory, and transmission trajectory are calculated, and the morphological changes are used as the output results of the simulation test.
[0010] Preferably, the construction of the perturbation mapping relationship includes: A correspondence table is established between processor utilization quantization levels and rendering queue processing latency. The correspondence table specifies the frame processing capability attenuation coefficient per unit time corresponding to different utilization ranges. Establish a correspondence table between memory occupancy quantification levels and audio buffer scheduling latency. The correspondence table specifies the additional waiting time coefficient for audio data blocks from being ready to being invoked under different memory levels. A mapping function is established between network fluctuation pattern characteristics and transmission jitter amplitude. The mapping function predicts the base delay surcharge in future time slices based on the spectral characteristics of the fluctuation pattern. The frame processing capability attenuation coefficient, the additional waiting time coefficient, and the basic latency escalation are collectively encoded into a set of perturbation parameters for the environment perception model, which are used to drive the perturbation simulation processing.
[0011] Preferably, the management strategy for the dynamically reconstructed audio playback buffer includes: Get the current water level status of the audio playback buffer and the bit rate of the input data stream; Calculate the instantaneous rate and direction of water level adjustment based on the difference between the target water level and the current water level. Based on the adjustment direction and instantaneous rate, a dynamic adjustment instruction for the buffer read and write pointers is generated, and the dynamic adjustment instruction controls the movement speed of the read pointer or the waiting period of the write pointer. Simultaneously monitor the bitrate changes of the input data stream. When the bitrate suddenly exceeds the threshold, temporarily cover the target water level and activate the emergency buffer management strategy based on bitrate prediction until the data stream stabilizes.
[0012] Preferably, the step of parsing network packet timing marks from the native data array, reconstructing the transmission path of data packets from the sender to the receiver, and calculating the delay increment of each hop on the transmission path, wherein the set of delay increments constitutes the transmission trajectory, includes: Obtain the network packet timing markers recorded in the native data array. The timing markers include at least the precise timestamp of the data packet arriving at the receiving end, the IP identifier of the data packet, and a decreasing sequence of the time-to-live field. Based on the decreasing sequence of the time-to-live field, the number of network hops that the data packet traverses from the sender to the receiver is deduced in reverse, and a logical sequence number is assigned to each hop; For data packets with the same IP identifier, they are grouped and sorted according to their logical sequence number, and the logical arrival time of each hop on the transmission path is reconstructed by matching the continuity of timestamps. Calculate the difference in logical arrival time between adjacent hops to obtain the delay increment of the data packet in each segment of the path; The delay increments of all data packets across all path segments are collected and arranged in chronological order to construct a continuous function curve with time as the horizontal axis and path segment delay as the vertical axis, thus forming the transmission trajectory.
[0013] Preferred options also include: After the simulation test is completed, the final weights of all connecting edges in the causal inference graph are extracted; The final weights are compared with the weight estimates when the causal inference graph was initially constructed to generate a weight error distribution map. Based on the weight error distribution map, the set of disturbance parameters in the environmental perception model is calibrated, and the values of the frame processing capability attenuation coefficient, the extra waiting time coefficient, and the basic latency rise are updated. Using the updated environment awareness model, a new round of latency trace separation and labeling processing is performed on the new live stream data, forming a closed-loop test model optimization process.
[0014] Compared with the prior art, the beneficial effects of the present invention are: By separating and marking latency traces, the mixed data consisting of synchronously acquired video stream fingerprints, audio stream fingerprints, and network packet timing marks is analyzed into rendering trajectories, playback trajectories, and transmission trajectories that are correlated on the timeline. This process achieves a fine-grained decomposition of total latency, attributing the overall delay to specific stages of content processing. It enables testing to clearly distinguish latency components caused by network transmission fluctuations, decoder buffering strategies, or graphics rendering performance, thus providing a time-correlated data foundation for locating the root cause of stuttering and analyzing audio-visual synchronization offsets.
[0015] Based on the extended contour of the time delay trajectory generated after perturbation simulation using an environmental perception model, a causal inference graph for time delay propagation is constructed. The nodes and edges of this graph are traversed to calculate the emergence location and aggregation strength of potential time delays, transforming the dynamic propagation process of time delay into a structured causal network for analysis. This method can reveal how initial perturbations are transmitted between different stages and may be amplified, quantitatively assess the cascading impact of transport layer anomalies on subsequent decoding and rendering stages, and thus identify the most vulnerable links in the system and the main propagation paths of time delay.
[0016] By generating a compensation vector based on the emergence location and aggregation intensity of potential latency, and applying it to the native data array, a closed-loop simulation and verification of the impact on latency is achieved. This technique can transform causal analysis conclusions into specific adjustment parameters that can be applied to each stage, thereby simulating the effects of implementing optimization measures in a test environment. This provides a direct technical means to evaluate the improvement effect of different optimization strategies on overall latency, extending testing from problem diagnosis to solution verification. Attached Figure Description
[0017] Figure 1 This is a step diagram of the latency testing method for loading live video according to the present invention; Figure 2 A bar chart showing the impact of environmental disturbances on different latency trajectories during a live stream loading latency test. Figure 3 A bar chart showing the latency reduction effects of different compensation strategies in a live stream loading latency test. Figure 4 A flowchart for constructing a causal inference graph of time delay propagation and calculating potential time delay; Figure 5 This is a flowchart for generating compensation vectors in reverse. Detailed Implementation
[0018] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] See Figure 1 The process involves acquiring the raw data array of the live stream under test throughout its complete playback cycle. This array, obtained through synchronous acquisition, includes video stream fingerprints, audio stream fingerprints, and network packet timing markers. The raw data array is processed to separate and mark the inherent latency traces, generating an initial latency trajectory profile composed of the interrelationships of rendering, playback, and transmission trajectories. An environment-aware model is introduced to simulate real-world environmental disturbances, influencing the initial latency trajectory profile and deforming it to generate an extended latency trajectory profile incorporating the disturbance effect. Based on this extended profile, a causal inference graph describing latency propagation relationships is constructed. By traversing the nodes and edges of this graph, the potential locations and aggregation strengths of latency can be calculated. Based on these calculations, compensation vectors acting on the rendering, playback, and transmission processes are derived in reverse. These compensation vectors are then applied back to the original raw data array or playback environment, thus completing the simulation test of the latency impact and compensation effect.
[0020] In one embodiment of the present invention, a timestamp chain corresponding to the video stream fingerprint is extracted from the native data array, and an event sequence of the video frame from decoding readiness to rendering completion is established. The event sequence is differentiated to obtain a rendering trajectory describing the instantaneous changes in the rendering process. A waveform feature sequence of the audio stream fingerprint is extracted from the native data array, and the sequence is aligned segment by segment with the system audio clock to identify the retention intervals of audio data in the playback buffer. The length distribution of these retention intervals constitutes the playback trajectory. The network packet timing markers are parsed from the raw data array. These timing markers include at least the precise timestamp of the data packet's arrival at the receiving end, the data packet's IP identifier, and a decreasing sequence of the Time-to-Live (TTL) field. Based on the decreasing sequence of the TTL field, the number of network hops the data packet traverses from the sender to the receiver is deduced, and a logical sequence number is assigned to each hop. Data packets with the same IP identifier are grouped and sorted according to their logical sequence numbers. By matching the continuity of timestamps, the logical arrival time of each hop on the transmission path is reconstructed. The difference in logical arrival times between adjacent hops is calculated to obtain the delay increment of the data packet in each path segment. The delay increments of all data packets across all path segments are collected and arranged in chronological order to construct a continuous function curve, forming the transmission trajectory. The instantaneous change rate of the rendered trajectory, the playback trajectory, and the transmission trajectory are superimposed on a unified time coordinate system. During the superposition process, the intersection and separation points of the three on the timeline are marked. These intersection and separation points, along with the state values of each trajectory at the intersection and separation points, together constitute the initial outline of the delay trajectory.
[0021] In practice, the native data array of the live stream under test is acquired within its complete playback cycle. This native data array includes synchronously acquired video stream fingerprints, audio stream fingerprints, and network packet timing markers. An example scenario involves capturing a five-minute live stream; its native data array records over ten thousand video frame fingerprints, corresponding audio waveform fingerprints for the time period, and arrival information for all network packets. Delay traces are separated and marked on the native data array to generate an initial outline of the delay trajectory. Specifically, the timestamp chain of the video stream fingerprints is extracted from the native data array. This timestamp chain records the precise time point from the completion of encoding to the capture of each video frame. An event sequence is established from the decoding readiness to the rendering completion of the video frame. This event sequence includes the frame decoding start time, decoding end time, time sent to the rendering queue, and the final time point displayed on the screen. The event sequence is differentiated to obtain the instantaneous change rate of the rendering trajectory, which reflects how quickly the video frame rendering state changes per unit time.
[0022] The waveform feature sequence of the audio stream fingerprint is extracted from the native data array. This sequence is obtained by calculating the short-time energy or zero-crossing rate of the audio signal and aligned segment by segment with the system audio clock, providing a high-precision continuous time reference for the system audio clock. The latency interval of audio data in the playback buffer is identified; this interval refers to the length of time an audio data block waits in the buffer to be retrieved by the playback thread. The length distribution of these latency intervals constitutes the playback trajectory. Network packet timing marks are parsed from the native data array. These marks contain the precise timestamp of the data packet's arrival at the receiver, the packet's IP identifier, and a decreasing sequence of the Time-to-Live (TTL) field. Based on the decreasing TTL field sequence, the number of network hops the data packet traversed from the sender to the receiver is deduced, and a logical sequence number is assigned to each hop. For example, if a data packet's initial TTL is 64 and it arrives at the receiver at 58, it is inferred that the data packet underwent 6 network hops.
[0023] In some embodiments, data packets with the same IP identifier are grouped and sorted according to their logical sequence number. The logical arrival time of each hop on the transmission path is reconstructed by matching the continuity of timestamps. The difference in logical arrival times between adjacent hops is calculated to obtain the delay increment of the data packet in each segment of the path. The delay increments of all data packets on all path segments are collected and arranged in chronological order to construct a continuous function curve with time as the horizontal axis and path segment delay as the vertical axis, forming the transmission trajectory. The instantaneous change rate of the rendering trajectory, the playback trajectory, and the transmission trajectory are superimposed on a unified time coordinate system. The unified time coordinate system is based on the absolute nanosecond time of system startup. During the superposition process, the intersection and separation points of the rendering trajectory, playback trajectory, and transmission trajectory on the timeline are marked. The intersection point indicates that multiple trajectories have experienced state-related events at the same time point, and the separation point indicates the time point when the influence relationship between the trajectories begins or ends. The intersection point, separation point, and the state values of each trajectory at the intersection point and separation point together constitute the initial outline of the delay trajectory.
[0024] Optionally, the delay increment during the transmission trajectory construction process can be quantitatively expressed using the following formula: in: Indicates the first The data packet in the first The latency increment on the hop network path segment Indicates the first obtained through reconstruction The data packet in the first The logic of the jump reaches its arrival time. Indicates the first The data packet in the first The logical arrival time of the jump. A specific data comparison is that when analyzing the same set of raw data arrays, directly using the total end-to-end delay of data packets to construct the trajectory will lose the fluctuation details of intermediate network nodes, while calculating the latency of each path segment using formulas... The transmission trajectory is formed, which clearly reveals that the third-hop network node has a significant accumulation of delay increments during the time axis period of 2.1 seconds to 2.5 seconds, while the end-to-end total delay analysis may smooth out this phenomenon.
[0025] In some embodiments, the extraction of the timestamp chain involves parsing the presentation timestamp and decoding timestamp fields from the video encoded data, and the alignment of the waveform feature sequence with the system audio clock involves calculating the peak position of the cross-correlation function between the audio fingerprint sequence and the reference clock signal. It can be understood that the reconstruction of the logical arrival time is based on network protocol analysis; each decrease in the time-to-live field corresponds to a routing hop, and by combining the packet capture timestamp and hop count information, an appropriate timestamp is assigned to each hop using an interpolation algorithm. It can also be understood that establishing a unified time coordinate system requires ensuring clock synchronization between video, audio, and network packet acquisition devices, or mapping timestamps from different sources to the same time base using a post-timestamp correction algorithm.
[0026] See Figure 2 This is a bar chart showing the impact of environmental disturbances on different latency trajectories during a live stream loading latency test. It clearly displays the relative impact of three types of environmental disturbances on the rendering, playback, and transmission latency trajectories. All trajectories have an impact value of 0, serving as a benchmark and verifying that environmental disturbances are the direct cause of latency trajectory deformation. This chart can directly guide the optimization direction of the live stream system; the differentiated impact of different disturbances on the trajectories provides a basis for targeted compensation. These quantified impact values can be directly used to calibrate the disturbance parameters in the environmental awareness model, improving the accuracy of latency prediction. By quantifying the degree of impact, ineffective compensation for low-impact aspects can be avoided, reducing waste of system resources.
[0027] In one embodiment of the present invention, the real-time resource load spectrum of the playback terminal is acquired, including processor utilization rate change curves and memory utilization rate change curves. A perturbation mapping relationship is constructed, establishing a correspondence table between processor utilization rate quantization levels and rendering queue processing latency. This table specifies the frame processing capability attenuation coefficient per unit time corresponding to different utilization rate intervals. A correspondence table between memory utilization rate quantization levels and audio buffer scheduling latency is also established, specifying the additional waiting time coefficient for audio data blocks from readiness to being invoked under different memory levels. A mapping function between network fluctuation pattern characteristics and transmission jitter amplitude is established. This mapping function predicts the base latency increase within future time slices based on the spectral characteristics of the fluctuation pattern. The frame processing capability attenuation coefficient, the additional waiting time coefficient, and the base latency increase are collectively encoded into a perturbation parameter set for the environment-aware model. The peak position of the processor utilization rate change curve is mapped to a compression effect on the rendering trajectory, and the trough position of the memory utilization rate change curve is mapped to a stretching effect on the playback trajectory. The historical fluctuation pattern of the current network link is obtained, and this historical fluctuation pattern is simulated as a periodic noise signal and injected into the transmission trajectory to induce timing distortion. The density of the rendering trajectory is dynamically adjusted based on the compression effect on the initial contour of the time-delay trajectory, the slope of the playback trajectory is dynamically modified based on the stretching effect, and virtual delay spikes are inserted into the transmission trajectory based on timing distortion. The density-adjusted rendering trajectory, the slope-modified playback trajectory, and the transmission trajectory with inserted delay spikes are integrated to form an extended contour of the time-delay trajectory that deforms under simulated environmental perturbations.
[0028] In practical implementation, an environmental awareness model is introduced to apply perturbation simulation processing to the initial contour of the latency trajectory, resulting in an extended contour of the latency trajectory containing the perturbation effect. Specifically, the real-time resource load spectrum of the playback terminal is collected. This real-time resource load spectrum includes processor utilization rate change curves and memory utilization rate change curves. An example scenario is testing a live stream in an outdoor mobile environment. The processor utilization rate change curve shows periodic spikes during periods of heavy video comment rendering, while the memory utilization rate change curve shows a step-like decrease when the application switches to the background. A perturbation mapping relationship is constructed, establishing a correspondence table between processor utilization rate quantification levels and rendering queue processing latency. The processor utilization rate quantification levels are divided into four intervals: 0%-30%, 31%-60%, 61%-90%, and 91%-100%. The correspondence table specifies the frame processing capability attenuation coefficient per unit time for different utilization rate intervals. For example, in the 91%-100% interval, the frame processing capability attenuation coefficient is set to 0.5, indicating a theoretical reduction of half the processing capability. A mapping table is established between memory occupancy quantization levels and audio buffer scheduling latency. Memory occupancy quantization levels are divided based on the percentage of available physical memory. The mapping table specifies the additional waiting time coefficient for audio data blocks from readiness to being invoked under different memory levels. A mapping function is established between network fluctuation pattern characteristics and transmission jitter amplitude. Network fluctuation pattern characteristics are obtained by analyzing the spectrum of historical network latency sequences. The mapping function predicts the base latency increase within future time slices based on the spectral characteristics of the fluctuation patterns. The frame processing capability attenuation coefficient, the additional waiting time coefficient, and the base latency increase are collectively encoded into a set of perturbation parameters for the environment-aware model, which is used to drive perturbation simulation processing.
[0029] In some embodiments, the process of constructing the perturbation mapping relationship involves mapping the peak position of the processor utilization rate change curve to a compression effect on the rendering trajectory. The peak position corresponds to a period of high processor load, and the compression effect is manifested in the reduction of the number of rendering events that can be completed per unit time on the rendering trajectory within the corresponding period, proportional to the frame processing capacity attenuation coefficient. The trough position of the memory utilization rate change curve is mapped to a stretching effect on the playback trajectory. The trough position corresponds to a period of tight memory resources, and the stretching effect is manifested in the increase of the length of the audio data block's dwell interval in the buffer on the playback trajectory within the corresponding period, proportional to the additional waiting time coefficient. The historical fluctuation pattern of the current network link is obtained. The historical fluctuation pattern is manifested as a delay oscillation with a period of approximately 2 seconds. The historical fluctuation pattern is simulated as a periodic noise signal, and the periodic noise signal is injected into the transmission trajectory, causing timing distortion of the transmission trajectory. The timing distortion is manifested as periodic fluctuations superimposed on the latency baseline of the transmission trajectory.
[0030] Optionally, the mathematical expression for applying a compression effect to the rendering trajectory can be described by the following formula: in: Indicates at simulation time point Rendering event density after applying compression effect, The initial contour representing the time delay trajectory at time point Nearby baseline rendering event density, This represents the compression strength coefficient derived from the frame processing capability attenuation coefficient. Indicates a point in time The collected processor utilization value, This is the processor utilization threshold that triggers the compression effect. A specific data comparison is, at a certain point in time... At this point, the baseline rendering event density of the initial outline For 60 events per second, the collected data It is 95%, assuming 90%, If the value is 0.02, then the calculated value is... At approximately 50 events per second, the rendering trajectory is compressed at this point compared to the baseline density.
[0031] In practical implementation, the density of the rendering trajectory is dynamically adjusted based on the compression effect on the initial contour of the latency trajectory. This adjustment is achieved by directly modifying the event distribution interval of the rendering trajectory at the corresponding time point based on the formula calculation results. The slope of the playback trajectory is dynamically modified based on the stretching effect. This is done by proportionally extending the dwell interval length of each audio data block on the playback trajectory within the time interval corresponding to the memory occupancy trough, thereby changing the slope of the playback process over time. Furthermore, virtual latency spikes are inserted into the transmission trajectory based on timing distortion. This insertion is done by superimposing a sudden latency increment, consistent with network fluctuation patterns, at the high latency phase point indicated by periodic noise signals on the continuous function curve of the transmission trajectory. Integrating the density-adjusted rendering trajectory, the slope-modified playback trajectory, and the transmission trajectory with inserted latency spikes forms an extended latency trajectory contour deformed under simulated environmental disturbances. This extended latency trajectory contour reflects the predicted changes in the rendering trajectory, playback trajectory, and transmission trajectory under the combined influence of simulated high processor load, memory constraints, and periodic network fluctuations.
[0032] It is understandable that determining the frame processing capability attenuation coefficient relies on benchmark testing of specific terminal hardware performance, while determining the additional latency coefficient relies on analyzing the operating system's memory scheduling mechanism. It is also understandable that the generation of periodic noise signals is based on extracting the main frequency components from historical network delay sequences using Fourier transform.
[0033] See Figure 3This is a bar chart showing the latency reduction effects of different compensation strategies in a live stream loading latency test, quantifying the optimization of total latency by four compensation strategies. The latency reduction from comprehensive compensation is less than the individual effects of adjusting the playback buffer or redundant packet transmission, indicating that there is some resource competition or diminishing marginal returns among different compensation strategies. Therefore, it is necessary to dynamically select the optimal strategy combination based on the scenario, rather than simply adding all compensations together. By comparing the input-output ratio of different strategies, it is possible to avoid over-investing in compensation methods with limited effects. For example, in scenarios with memory bottlenecks, there is no need to invest additional resources in optimizing rendering or transmission. The chart provides a quantitative basis for selecting compensation strategies in different scenarios. The insufficient synergistic effect of comprehensive compensation suggests the need to further optimize the multi-strategy synergy mechanism, such as dynamically adjusting the weights of each compensation strategy, to achieve a better overall latency reduction effect.
[0034] In one embodiment of the present invention, see [reference] Figure 4 Each feature change point in the extended latency trajectory profile is defined as a graph node. These feature change points include density abrupt change points in the rendering trajectory, slope inflection points in the playback trajectory, and latency peaks in the transmission trajectory. Directed edges are defined between nodes, with their directions determined by temporal order and data flow dependencies. The weights of the edges characterize the influence of upstream nodes on downstream nodes. Based on the spatiotemporal interference relationships between different trajectories in the extended latency trajectory profile, virtual edges across trajectories are added to the causal inference graph. These virtual edges represent implicit coupling between the rendering, playback, and transmission processes. A graph traversal algorithm is used to cumulatively calculate the product of edge weights on each path, starting from the source node of the causal inference graph. Path-end nodes where the cumulative product exceeds a threshold are identified as potential latency emergence points, and the value of this cumulative product is recorded as the aggregation strength of the path-end node.
[0035] In practical implementation, a causal inference graph of time delay propagation is constructed based on the time delay trajectory extension profile. The specific process is to define each feature change point in the time delay trajectory extension profile as a graph node. Feature change points include density abrupt change points of the rendering trajectory, slope inflection points of the playback trajectory, and delay peak vertices of the transmission trajectory. An example scenario is to analyze a time delay trajectory extension profile with stuttering. The rendering trajectory has a density abrupt change point at time t=15.3 seconds, indicating that the processing speed of the rendering queue suddenly drops. The playback trajectory has a slope inflection point at time t=15.8 seconds, indicating that the audio buffer begins to be cleared at an accelerated rate. The transmission trajectory records a delay peak vertices at time t=15.1 seconds. Define directed edges between nodes. The direction of the edges is determined by the chronological order and data flow dependency. The chronological order refers to the order in which feature change points appear on the timeline. The data flow dependency refers to the logical dependency that video data must be decoded before rendering and network data packets must arrive before entering the playback buffer. The weight of the edges represents the influence of upstream nodes on downstream nodes. The influence strength is quantified by analyzing the degree of change in the state of downstream nodes after an upstream node event occurs in historical data.
[0036] In some embodiments, based on the spatiotemporal interference relationship between different trajectories in the extended contour of the delay trajectory, virtual connection edges across trajectories are added to the causal inference graph. The spatiotemporal interference relationship refers to the occurrence of events on the rendering trajectory and events on the playback trajectory at similar time points, and the potential existence of resource competition or synchronization requirements. Virtual connection edges represent implicit coupling between the three processes of rendering, playback, and transmission. Implicit coupling includes sharing system bus bandwidth, competing for processor computing resources, or being regulated by global power management strategies. Using a graph traversal algorithm, starting from the source node of the causal inference graph, which is the earliest feature change point in time or the starting logical point of the data flow, the product of the weights of the connection edges on each path is accumulated. The end nodes of paths where the accumulated product exceeds a threshold are marked as the emergence positions of potential delays, and the value of the accumulated product is recorded as the aggregation strength of the end nodes of the path.
[0037] Optionally, the calculation of the cumulative product in the graph traversal algorithm can be described using the following formula: in: Indicates from the root node To the current node The cumulative product of the weights of all connecting edges on a given path. This represents a directed connection edge on the path. Indicates from the root node To the node A directed path, Indicates connecting edges The weight values. A specific data comparison is that, without constructing a causal inference graph and only observing the extended contour of the latency trajectory, the inflection point of the playback trajectory slope at time t=15.8 seconds may be viewed in isolation. Calculation using the formula reveals a path: from the transmission delay peak vertex at t=15.1 seconds (node A, weight 0.7) to the rendering density mutation point at t=15.3 seconds (node B, weight 0.9), and then through a virtual connection edge (weight 0.8) to the playback slope inflection point at t=15.8 seconds (node C). The calculation yields... Assuming a threshold of 0.5, node C is identified as the emerging location of potential latency with an aggregation strength of 0.504. This reveals the causal chain by which transmission issues ultimately affect playback through the rendering process, a connection that may not be established by isolated observations.
[0038] In practical implementation, the weights of connecting edges can be assigned based on statistical correlation analysis or a pre-defined rule mapping table. For connecting edges with direct data flow dependencies, the weights may be higher; for virtual connecting edges representing implicit coupling, the weights may be set based on the historical probability of shared resource conflicts. Graph traversal algorithms can use depth-first search or breadth-first search strategies to traverse all reachable paths originating from the source node in the causal inference graph. It can be understood that the threshold selection can be a pre-defined static value or dynamically adjusted based on the distribution of the cumulative product of all paths in the current causal inference graph. It can be understood that the root node... The choice can be a virtual starting node artificially set at the starting point of the time delay trajectory extended contour, and the weight of the connection edge from it to the first layer actual feature change point node is initialized to 1.
[0039] In one embodiment of the present invention, see [reference] Figure 5For each identified potential latency emergence location, the causal inference graph is traced back to all its upstream cause nodes. Based on the type of the cause node, its corresponding aggregation intensity is decomposed into rendering compensation components, playback compensation components, and transmission compensation components according to a preset ratio. The decomposed rendering compensation components are converted into preload time offsets for the rendering trajectory, playback compensation components into buffer level adjustments for the playback trajectory, and transmission compensation components into redundant packet sending suggestions for the transmission trajectory. The preload time offsets, buffer level adjustments, and redundant packet sending suggestions corresponding to all emergence locations are aggregated to form system-level compensation vectors that act on the rendering trajectory, playback trajectory, and transmission trajectory, respectively. The preload time offsets in the system-level compensation vectors for the rendering trajectory are read, and time preemption instructions based on these preload time offsets are embedded in the video decoding thread scheduling strategy. The buffer level adjustments in the system-level compensation vectors for the playback trajectory are read to dynamically reconstruct the audio playback buffer management strategy, using these buffer level adjustments as the target water level. The redundant packet sending suggestions in the system-level compensation vectors for the transmission trajectory are read, and the network layer's packet sending strategy is modified to insert forward error correction packets based on these redundant packet sending suggestions. When dynamically reconstructing the management strategy of the audio playback buffer, the current water level status of the audio playback buffer and the bitrate of the input data stream are obtained. The instantaneous rate and direction of water level adjustment are calculated based on the difference between the target water level and the current water level status. Dynamic adjustment instructions for the buffer read and write pointers are generated based on the adjustment direction and instantaneous rate. These instructions control the movement speed of the read pointer or the waiting period of the write pointer. Simultaneously, the bitrate changes of the input data stream are monitored. When a sudden change in bitrate exceeds a threshold, the target water level is temporarily overwritten, and an emergency buffer management strategy based on bitrate prediction is activated until the data stream stabilizes. After applying the time preemption instruction, the target water level, and forward error correction data packets, the playback process of the live stream under test is restarted, and a new native data array is simultaneously acquired. The native data arrays before and after compensation are compared, and the morphological changes of the rendering trajectory, playback trajectory, and transmission trajectory are calculated. This morphological change is used as the output result of the simulation test.
[0040] In practical implementation, compensation vectors for rendering, playback, and transmission trajectories are generated in reverse based on the emergence location and aggregation intensity of potential latency. For each identified emergence location of potential latency, the causal inference graph is traced back to all its upstream cause nodes. An example scenario is that node Z in the causal inference graph is identified as the emergence location of potential latency, with an aggregation intensity of 0.72. Tracing back reveals that node Z has three upstream cause nodes: node X, which is a density abrupt change point in the rendering trajectory; node Y, which is a latency peak in the transmission trajectory; and node W, which is a slope inflection point in the playback trajectory. Based on the type of cause node, the aggregation intensity corresponding to node Z is decomposed into rendering compensation, playback compensation, and transmission compensation components according to a preset ratio. This preset ratio is obtained based on historical impact statistical analysis of cause node types. The decomposed rendering compensation component is converted into a preload time offset for the rendering trajectory, representing the amount by which the decoding start time of the relevant video frames is advanced. The playback compensation component is converted into a buffer level adjustment for the playback trajectory, representing the target value to which the data storage in the audio playback buffer is adjusted. The transmission compensation components are converted into redundant packet transmission suggestions for the transmission trajectory. The redundant packet transmission suggestion represents the number of forward error correction packets or retransmission packets to be added in a specific network path segment. The preload time offset, buffer level adjustment, and redundant packet transmission suggestions corresponding to all emerging positions are aggregated to form system-level compensation vectors that act on the rendering trajectory, playback trajectory, and transmission trajectory, respectively.
[0041] In some embodiments, referring to Table 1, the decomposition of the preset ratio can be performed based on a predefined mapping relationship by querying the decomposition ratio table shown in Table 1.
[0042] Table 1: Mapping Table of Cause Node Types and Compensation Component Decomposition Ratios Optionally, the conversion of the buffer zone water level adjustment amount can be calculated using the following formula: in: This represents the calculated buffer water level adjustment amount (in milliseconds). This represents the adjustment coefficient derived from the playback compensation component. This represents the system throughput normalization factor. This represents the baseline value of the target buffer level derived from the playback compensation component. This indicates the current water level status value of the audio playback buffer. This indicates the current bitrate of the acquired input data stream. This represents the base rate of the input data stream. This represents the sensitivity factor to bitrate changes. A specific data comparison is shown below: for a playback class emergence position with an aggregation intensity of 0.5, the adjustment coefficient is obtained from the playback compensation component conversion. Assuming , , , , , Then the calculation yields This value will be aggregated into the system-level compensation vector for the playback trajectory.
[0043] In practical implementation, the management strategy for dynamically reconstructing the audio playback buffer is implemented. The current buffer level and input data stream bitrate are obtained. Based on the difference between the target buffer level and the current level, the instantaneous rate and direction of buffer level adjustment are calculated. The adjustment direction is to increase or decrease the buffer level, and the instantaneous rate is positively correlated with the difference. Based on the adjustment direction and instantaneous rate, dynamic adjustment instructions for the buffer read and write pointers are generated. These instructions control the movement speed of the read pointer or the waiting period of the write pointer. For example, when the buffer level needs to be increased, the dynamic adjustment instructions may slow down the movement speed of the read pointer or increase the waiting period after the write pointer writes data. Simultaneously, the bitrate changes of the input data stream are monitored. When a sudden change in bitrate exceeds a threshold, the target buffer level provided by the system-level compensation vector is temporarily overridden, and an emergency buffer management strategy based on bitrate prediction is activated until the data stream stabilizes. The preload time offset in the system-level compensation vector for the rendering trajectory is read, and a time preemption instruction based on the preload time offset is embedded in the video decoding thread scheduling strategy. This preemption instruction instructs the decoding thread to be awakened at an earlier system time point or to obtain a higher scheduling priority. The redundant packet sending suggestions in the system-level compensation vector for the transmission trajectory are read, the network layer packet sending strategy is modified, and forward error correction packets are inserted according to the redundant packet sending suggestions. After applying the time preemption command, target watermark, and forward error correction packets, the playback process of the live stream under test is restarted, and a new native data array is collected synchronously. The native data arrays before and after compensation are compared, and the morphological changes of the rendering trajectory, playback trajectory, and transmission trajectory are calculated. The morphological changes include the time offset of trajectory key points, the change in the slope of trajectory segments, or the difference in the area under the trajectory curve. The morphological changes are used as the output results of the simulation test.
[0044] In one embodiment of the present invention, after the simulation test is completed, the final weights of all connected edges in the causal inference graph are extracted. The final weights are compared with the weight estimates when the causal inference graph was initially constructed to generate a weight error distribution map. Based on the weight error distribution map, the set of perturbation parameters in the environmental awareness model is calibrated, and the values of the frame processing capability attenuation coefficient, the additional waiting time coefficient, and the base latency escalation are updated. The updated environmental awareness model is then used to perform a new round of latency trace separation and labeling processing on new live stream data, forming a closed-loop test model optimization process.
[0045] In practice, after the simulation test is completed, the final weights of all connecting edges in the causal inference graph are extracted. These final weights are the actual impact strength values derived from the analysis of the new native data array after applying compensation vectors and rerunning the test. An example scenario involves extracting the final weights of a total of 120 connecting edges from the updated causal inference graph after a test targeting a network fluctuation. The final weights are then compared with the weight estimates initially used when constructing the causal inference graph. These initial weight estimates are based on historical data or pre-set values from theoretical models, generating a weight error distribution graph. This graph uses the connecting edge identifiers as the x-axis and the difference between the final weight values and the initial weight estimates as the y-axis, forming a sequence of error points.
[0046] In some embodiments, the set of disturbance parameters in the environment-aware model is calibrated based on the weight error distribution map. The weight error distribution map shows that for connection edges originating from the peak of transmission trajectory delay, the weight errors are generally positive and concentrated in a certain range, indicating that the simulation strength of the network fluctuation impact in the environment-aware model is insufficient. The values of the frame processing capacity attenuation coefficient, the additional waiting time coefficient, and the base delay surcharge are updated, and the update operation is quantitatively adjusted based on the distribution pattern and magnitude of the weight errors.
[0047] Optionally, the update of the base delay rise can be calculated iteratively using the following formula: in: This indicates the increased base latency after the update. This represents the base delay increase before the update. Represents the learning rate factor. This represents the number of connection edges in the weighted error distribution graph that belong to the category affected by network fluctuations. Indicates the first The final weight of this type of connecting edge, Indicates the first The initial weight estimate for this type of connection edge. A specific data comparison is the base delay increase before a calibration. Set to 10 milliseconds, filter from the weighted error distribution plot For the connection edges significantly affected by network fluctuations, the mean weight error is calculated to be +0.15, and the learning rate factor is... If we set it to 0.5, then the calculation will yield... The base latency was increased to 10.075 milliseconds, resulting in a slight increase in the environment-aware model's simulated predictions of future network fluctuations.
[0048] In practical implementation, the updated environment-aware model is used to perform a new round of latency trace separation and labeling processing on the new live stream data, forming a closed-loop test model optimization process. The new live stream data can come from different network environments or different terminal devices. The updated environment-aware model will use a calibrated frame processing capability attenuation coefficient, additional waiting time coefficient, and basic latency escalation to drive a new round of perturbation simulation processing. It can be understood that the generation of the weight error distribution map not only includes the visualization of the overall error but also allows for hierarchical statistics based on the type of connection edges, such as distinguishing between internal connection edges within the rendering trajectory, internal connection edges within the playback trajectory, and virtual connection edges across trajectories. It can be understood that the learning rate factor... The value of can be dynamically adjusted based on the historical results of multiple optimization iterations to achieve more stable and faster model parameter convergence.
[0049] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A method for testing a time delay of a live picture loading, characterized in that, include: Obtain the native data array of the live stream to be tested during its complete playback cycle. The native data array includes synchronously collected video stream fingerprints, audio stream fingerprints, and network packet timing markers. The process involves separating and marking delay traces on the native data array to generate an initial outline of the delay trajectory. This includes extracting the timestamp chain of the video stream fingerprint, the waveform feature sequence of the audio stream fingerprint, and the network packet timing markers from the native data array. These constitute the instantaneous change rate of the rendering trajectory, the playback trajectory, and the transmission trajectory, respectively. The instantaneous change rate of the rendering trajectory, the playback trajectory, and the transmission trajectory are then marked to generate the initial outline of the delay trajectory. The initial outline of the delay trajectory includes multiple interrelated rendering trajectories, playback trajectories, and transmission trajectories. An environmental awareness model is introduced to apply perturbation simulation processing to the initial contour of the time-delay trajectory, resulting in an extended contour of the time-delay trajectory containing perturbation effects. This includes: constructing a perturbation mapping relationship based on the real-time resource load spectrum of the playback terminal to obtain the compression effect of the rendering trajectory and the stretching effect of the playback trajectory; simulating periodic noise based on the historical fluctuation pattern of the current network link and injecting it into the transmission trajectory to induce temporal distortion of the transmission trajectory; and adjusting the density of the rendering trajectory, modifying the slope of the playback trajectory, and inserting delay spikes into the transmission trajectory according to the compression effect, stretching effect, and temporal distortion, and integrating them to generate an extended contour of the time-delay trajectory containing perturbation effects. Based on the extended contour of the time delay trajectory, a causal inference graph for time delay propagation is constructed. Each feature change point in the extended contour of the time delay trajectory is defined as a graph node, and directed connection edges between nodes are defined. According to the spatiotemporal interference relationship between different trajectories in the extended contour of the time delay trajectory, virtual connection edges across trajectories are added to the causal inference graph. The emergence position and aggregation intensity of potential time delay are calculated by traversing the nodes and edges of the causal inference graph. Based on the emergence location and aggregation intensity of the potential latency, compensation vectors for the rendering trajectory, playback trajectory, and transmission trajectory are generated in reverse. The preload time offset in the system-level compensation vector for the rendering trajectory, the buffer level adjustment in the system-level compensation vector for the playback trajectory, and the redundant packet sending suggestion in the system-level compensation vector for the transmission trajectory are read. The time preemption command, target level line, and forward error correction data packet are processed and applied to the live stream under test to re-drive the playback process of the live stream under test. A new native data array is collected and compared with the native data array before and after the compensation is applied to complete the latency simulation test.
2. The method of claim 1, wherein the method further comprises: The step of performing delay trace separation and marking processing on the native data array to generate the initial contour of the delay trajectory specifically includes: The timestamp chain of the video stream fingerprint is extracted from the native data array, and an event sequence of the video frame from decoding readiness to rendering completion is established. The event sequence is differentiated to obtain the instantaneous change rate of the rendering trajectory. The waveform feature sequence of the audio stream fingerprint is extracted from the native data array and aligned segment by segment with the system audio clock to identify the retention interval of the audio data in the playback buffer. The length distribution of the retention interval constitutes the playback trajectory. The network packet timing markers are parsed from the native data array to reconstruct the transmission path of the data packet from the sender to the receiver, and the delay increment of each hop on the transmission path is calculated. The set of delay increments constitutes the transmission trajectory. The instantaneous change rate of the rendering trajectory, the playback trajectory, and the transmission trajectory are superimposed in a unified time coordinate system. During the superposition process, the intersection and separation points of the rendering trajectory, playback trajectory, and transmission trajectory on the timeline are marked. The intersection points, separation points, and the state values of each trajectory at the intersection and separation points together constitute the initial outline of the time delay trajectory.
3. The method of claim 2, wherein the method further comprises: The introduction of an environmental perception model applies a perturbation simulation process to the initial contour of the time-delay trajectory to obtain an extended contour of the time-delay trajectory containing the perturbation effect, specifically including: The real-time resource load spectrum of the playback terminal is collected, and the resource load spectrum includes the processor utilization rate change curve and the memory utilization rate change curve. A perturbation mapping relationship is constructed, mapping the peak position of the processor utilization rate change curve to the compression effect on the rendering trajectory, and mapping the peak position of the memory utilization rate change curve to the stretching effect on the playback trajectory. The historical fluctuation pattern of the current network link is obtained, the historical fluctuation pattern is simulated as a periodic noise signal, and the periodic noise signal is injected into the transmission trajectory to cause temporal distortion of the transmission trajectory; On the initial contour of the delay trajectory, the density of the rendering trajectory is dynamically adjusted according to the compression effect, the slope of the playback trajectory is dynamically modified according to the stretching effect, and virtual delay spikes are inserted on the transmission trajectory according to the timing distortion. By integrating the density-adjusted rendering trajectory, the slope-modified playback trajectory, and the transmission trajectory with inserted delay spikes, an extended contour of the delay trajectory that deforms under simulated environmental disturbances is formed.
4. The latency testing method for loading live stream images according to claim 1, characterized in that, The construction of the causal inference graph for time delay propagation based on the extended contour of the time delay trajectory specifically includes: Each feature change point in the extended contour of the delay trajectory is defined as a graph node. The feature change points include density abrupt change points of the rendering trajectory, slope inflection points of the playback trajectory, and delay peak vertices of the transmission trajectory. Define directed edges between nodes. The direction of the edges is determined by the time sequence and data flow dependency. The weight of the edges represents the strength of the influence of the upstream node on the downstream node. Based on the spatiotemporal interference relationship between different trajectories in the extended contour of the time-delay trajectory, virtual connection edges across trajectories are added to the causal inference graph. The virtual connection edges represent the implicit coupling effect between the three processes of rendering, playback, and transmission. Using a graph traversal algorithm, starting from the source node of the causal inference graph, the product of the weights of the connecting edges on each path is accumulated. The end nodes of the paths where the accumulated product exceeds a threshold are marked as the emergence positions of potential time delays, and the value of the accumulated product is recorded as the aggregation strength of the end nodes of the paths.
5. The latency testing method for loading live stream images according to claim 4, characterized in that, The reverse generation of compensation vectors for the rendering trajectory, playback trajectory, and transmission trajectory includes: For each identified potential delay emergence location, backtrack to all its upstream cause nodes in the causal inference graph; Based on the type of the cause node, its corresponding aggregation intensity is decomposed into rendering compensation component, playback compensation component and transmission compensation component according to a preset ratio. The decomposed rendering compensation components are converted into preload time offsets for the rendering trajectory, the playback compensation components are converted into buffer level adjustments for the playback trajectory, and the transmission compensation components are converted into redundant packet sending suggestions for the transmission trajectory. The preload time offset, buffer level adjustment, and redundant packet suggestion amounts corresponding to all emerging positions are summarized to form system-level compensation vectors that act on the rendering trajectory, playback trajectory, and transmission trajectory, respectively.
6. The latency testing method for loading live stream footage according to claim 5, characterized in that, The comparison of the original data arrays before and after compensation to complete the latency simulation test includes: Read the preloaded time offset from the system-level compensation vector for the rendering trajectory, and embed a time preemption instruction based on the preloaded time offset into the video decoding thread scheduling strategy; Read the buffer level adjustment amount in the system-level compensation vector for the playback trajectory, dynamically reconstruct the management strategy of the audio playback buffer, and use the buffer level adjustment amount as the target level line; Read the redundant packet sending suggestion in the system-level compensation vector for the transmission trajectory, modify the data packet sending strategy of the network layer, and insert forward error correction data packets according to the redundant packet sending suggestion; After applying the time preemption command, target water level, and forward error correction data packet, the playback process of the live stream under test is restarted, and a new native data array is collected synchronously. By comparing the original data arrays before and after applying compensation, the morphological changes of the rendering trajectory, playback trajectory, and transmission trajectory are calculated, and the morphological changes are used as the output results of the simulation test.
7. The latency testing method for loading live stream images according to claim 3, characterized in that, The construction of the perturbation mapping relationship includes: A correspondence table is established between processor utilization quantization levels and rendering queue processing latency. The correspondence table specifies the frame processing capability attenuation coefficient per unit time corresponding to different utilization ranges. Establish a correspondence table between memory occupancy quantification levels and audio buffer scheduling latency. The correspondence table specifies the additional waiting time coefficient for audio data blocks from being ready to being invoked under different memory levels. A mapping function is established between network fluctuation pattern characteristics and transmission jitter amplitude. The mapping function predicts the base delay surcharge in future time slices based on the spectral characteristics of the fluctuation pattern. The frame processing capability attenuation coefficient, the additional waiting time coefficient, and the basic latency escalation are collectively encoded into a set of perturbation parameters for the environment perception model, which are used to drive the perturbation simulation processing.
8. The latency testing method for loading live stream images according to claim 6, characterized in that, The management strategy for dynamically reconstructing the audio playback buffer includes: Get the current water level status of the audio playback buffer and the bit rate of the input data stream; Calculate the instantaneous rate and direction of water level adjustment based on the difference between the target water level and the current water level. Based on the adjustment direction and instantaneous rate, a dynamic adjustment instruction for the buffer read and write pointers is generated, and the dynamic adjustment instruction controls the movement speed of the read pointer or the waiting period of the write pointer. Simultaneously monitor the bitrate changes of the input data stream. When the bitrate suddenly exceeds the threshold, temporarily cover the target water level and activate the emergency buffer management strategy based on bitrate prediction until the data stream stabilizes.
9. The latency testing method for loading live stream images according to claim 2, characterized in that, The process involves parsing network packet timing markers from the native data array, reconstructing the transmission path of data packets from the sender to the receiver, and calculating the delay increment for each hop on the transmission path. The set of these delay increments constitutes the transmission trajectory, which includes: Obtain the network packet timing markers recorded in the native data array. The timing markers include at least the precise timestamp of the data packet arriving at the receiving end, the IP identifier of the data packet, and a decreasing sequence of the time-to-live field. Based on the decreasing sequence of the time-to-live field, the number of network hops that the data packet traverses from the sender to the receiver is deduced in reverse, and a logical sequence number is assigned to each hop; For data packets with the same IP identifier, they are grouped and sorted according to their logical sequence number, and the logical arrival time of each hop on the transmission path is reconstructed by matching the continuity of timestamps. Calculate the difference in logical arrival time between adjacent hops to obtain the delay increment of the data packet in each segment of the path; The delay increments of all data packets across all path segments are collected and arranged in chronological order to construct a continuous function curve with time as the horizontal axis and path segment delay as the vertical axis, thus forming the transmission trajectory.
10. The latency testing method for loading live stream footage according to claim 7, characterized in that, Also includes: After the simulation test is completed, the final weights of all connecting edges in the causal inference graph are extracted; The final weights are compared with the weight estimates when the causal inference graph was initially constructed to generate a weight error distribution map. Based on the weight error distribution map, the set of disturbance parameters in the environmental perception model is calibrated, and the values of the frame processing capability attenuation coefficient, the extra waiting time coefficient, and the basic latency rise are updated. Using the updated environment awareness model, a new round of latency trace separation and labeling processing is performed on the new live stream data, forming a closed-loop test model optimization process.