Data transmission method, related apparatus, device and storage medium
By receiving and analyzing data frame sequences and adaptively adjusting the transmission rate of the data buffer, it solves the delay problem caused by jitter in streaming media transmission, meets the needs of low-latency video services, and improves the stability of data transmission.
Patent Information
- Application Number
- PCT/CN2023/094411
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-07-28
- Filing Date
- 2023-05-16
- Publication Date
- 2024-09-12
AI Technical Summary
Existing streaming media transmission technology cannot ensure consistent data packet delay during upstream streaming, resulting in jitter. Moreover, the existing anti-jitter buffering solution has poor adaptability and cannot meet the needs of low-latency video services.
By receiving the data frame sequence sent by the source device, the jitter information of the data frame is determined, and the buffering duration threshold of the data buffer is set according to the jitter information. If the playback duration of the data frame in the buffer is greater than or equal to the threshold, the data frame is increased. Transfer rate to adaptively adjust the transfer rate of the buffer.
It effectively avoids high delays in content streaming, improves the satisfaction of low-latency video services, and resists about 20% uplink packet loss in a laboratory environment.
Smart Images

Figure CN2023094411_12092024_PF_FP_ABST
Abstract
Description
A data transmission method, related device, equipment and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on July 28, 2022, with application number 2022109005429 and application name “A method, related devices, equipment and storage medium for data transmission”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the fields of network technology and communication technology, and in particular to data transmission technology. Background Art
[0003] Streaming technology allows users to browse or play streaming media without having to wait for the entire data to be downloaded locally. To make streaming media transmission faster and more stable, a content delivery network (CDN) can be used to distribute streaming media from the source node to the service node closest to the user, allowing users to access the content nearby, thereby improving website responsiveness.
[0004] During streaming, due to factors such as differences in packet size and network routing, it's difficult to ensure consistent packet delays, which can easily lead to jitter during upstream streaming. Currently, CDN nodes primarily use group of pictures (GOP) as the minimum buffering unit to mitigate uplink jitter.
[0005] However, using GOP as the minimum buffering unit has poor adaptability for upstream networks. If the upstream streaming frame rate is stable, using a fixed buffer will increase content streaming latency. Therefore, the current anti-jitter buffering solution cannot meet the requirements of low-latency video services.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a data transmission method, related apparatus, device, and storage medium, which can effectively avoid content flow delays and better meet the needs of low-latency video services.
[0008] In view of this, the present application provides, on one hand, a data transmission method, executed by a computer device, comprising:
[0009] Receive a first data frame sequence sent by a source device within a first time window, wherein the first data frame sequence includes at least two data frames;
[0010] Determining data jitter information according to the first data frame sequence, wherein the data jitter information is used to describe a jitter condition of the data frames within a time window;
[0011] Setting a first buffering time threshold of the data buffer according to the data jitter information;
[0012] If the playback duration corresponding to the data frames currently contained in the data buffer is greater than or equal to the first buffer duration threshold, the transmission rate of the data frames in the data buffer to the destination device is increased.
[0013] Another aspect of the present application provides a data transmission device, comprising:
[0014] A receiving module, configured to receive a first data frame sequence sent by a source device within a first time window, wherein the first data frame sequence includes at least two data frames;
[0015] a determination module, configured to determine data jitter information based on the first data frame sequence, wherein the data jitter information is used to describe jitter conditions of the data frames within a time window;
[0016] The determination module is further configured to set a first buffering time threshold of the data buffer according to the data jitter information;
[0017] The transmission module is configured to increase a transmission rate of the data frames in the data buffer to a destination device if a playback duration corresponding to the data frames currently contained in the data buffer is greater than or equal to a first buffer duration threshold.
[0018] On the other hand, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned methods when executing the computer program.
[0019] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned methods when the computer program is executed by a processor.
[0020] Another aspect of the present application provides a computer program product, including a computer program, which implements the above-mentioned methods when executed by a processor.
[0021] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0022] An embodiment of the present application provides a method for data transmission, in which a server receives a first data frame sequence sent by a source device within a first time window, determines the jitter of the data frame based on the first data frame sequence, and determines the first buffering duration threshold of the data buffer in combination with the jitter of the data frame. If the playback duration corresponding to the data frame currently contained in the data buffer is greater than or equal to the first buffering duration threshold, the transmission rate of the data frame in the data buffer to the destination device is increased. In the above manner, a more accurate data frame jitter is obtained based on frame-level data, thereby adaptively adjusting the first buffering duration threshold of the data buffer based on the data frame jitter within the time window. In the case that the playback duration of the currently buffered data frame is greater than the first buffering duration threshold, the transmission rate of the data frame will be accelerated, thereby effectively avoiding high latency in the content stream and better meeting the needs of low-latency video services. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] FIG1 is a schematic diagram of the architecture of a data transmission system according to an embodiment of the present application;
[0024] FIG2 is another schematic diagram of the architecture of the data transmission system according to an embodiment of the present application;
[0025] FIG3 is a flow chart of a data transmission method according to an embodiment of the present application;
[0026] FIG4 is a schematic diagram of a working principle of an adaptive anti-jitter buffer according to an embodiment of the present application;
[0027] FIG5 is a schematic diagram of a process of adaptive anti-jitter buffering according to an embodiment of the present application;
[0028] FIG6 is a schematic diagram of implementing anti-jitter buffering based on frame rate jitter in an embodiment of the present application;
[0029] FIG7 is another schematic diagram of implementing anti-jitter buffering based on frame rate jitter in an embodiment of the present application;
[0030] FIG8 is a schematic diagram of a probability distribution histogram and a cumulative distribution function in an embodiment of the present application;
[0031] FIG9 is a schematic diagram of a customized data transmission mode for an e-commerce live broadcast scenario in an embodiment of the present application;
[0032] FIG10 is a schematic diagram of a customized data transmission mode for an online education scenario according to an embodiment of the present application;
[0033] FIG11 is a schematic diagram of a customized data transmission mode for a live show scenario according to an embodiment of the present application;
[0034] FIG12 is a schematic diagram of a customized data transmission mode for a game live broadcast scenario according to an embodiment of the present application;
[0035] FIG13 is another schematic diagram of a process of adaptive anti-jitter buffering according to an embodiment of the present application;
[0036] FIG14 is another schematic diagram of implementing anti-jitter buffering based on frame rate jitter in an embodiment of the present application;
[0037] FIG15 is another schematic diagram of implementing anti-jitter buffering based on frame rate jitter in an embodiment of the present application;
[0038] FIG16 is another schematic diagram of a customized data transmission mode for an e-commerce live broadcast scenario according to an embodiment of the present application;
[0039] FIG17 is another schematic diagram of a customized data transmission mode for an online education scenario according to an embodiment of the present application;
[0040] FIG18 is another schematic diagram of a customized data transmission mode for a live show scenario according to an embodiment of the present application;
[0041] FIG19 is another schematic diagram of a customized data transmission mode for a game live broadcast scenario according to an embodiment of the present application;
[0042] FIG20 is a schematic diagram of two adjacent time windows in an embodiment of the present application;
[0043] FIG21 is another schematic diagram of two adjacent time windows in an embodiment of the present application;
[0044] FIG22 is a schematic diagram of a data transmission device according to an embodiment of the present application;
[0045] Figure 23 is a structural diagram of the server in an embodiment of the present application. DETAILED DESCRIPTION
[0046] Streaming media technology is now widely used, encompassing many audio and video on-demand services, live streaming, and online advertising. This has put immense pressure on internet providers' servers. By building a Content Delivery Network (CDN), streaming media content is distributed to edge nodes closest to users, enabling them to access content locally. CDN edge nodes deliver content to the very end of low-bandwidth networks, such as mobile and broadband networks, ultimately serving end users. CDN edge computing primarily distributes large-scale resources to the appropriate nodes as efficiently as possible, providing a better network experience for each end user.
[0047] If the network has no packet loss, no jitter, and low latency, then each received frame can be played directly, resulting in excellent performance. However, real-world network conditions are more complex, especially for upstream networks, which have poor adaptability. Therefore, the probability of jitter during upstream streaming is also relatively high. Once the network deteriorates, the content stream will experience abnormalities such as lag. For this reason, buffering received data frames on the server is necessary. Buffering comes at the cost of latency. A higher latency improves the ability to cope with network jitter, but excessive latency can lead to poor real-time playback of the content stream.
[0048] The present application introduces an anti-jitter buffer (jitterbuffer) on the uplink or downlink, which can be used to adjust the buffer length according to the frame rate jitter method to avoid excessive delay introduced by the uplink buffer, and take into account the real-time and smoothness of the content stream playback. The data transmission method provided by the present application can be applied to the data transmission system shown in Figure 1 or Figure 2. As shown in Figure 1, the data transmission system includes CDN 110, edge node 120, source device 130 and destination device 140. The source device 130 pushes the locally collected content stream to CDN 110, and CDN 110 publishes the content stream to the edge node 120 closest to the destination device 140, so that the destination device 140 can obtain the required content nearby. As shown in Figure 2, the data transmission system includes a streaming media server 150, a source device 130 and a destination device 140. The source device 130 pushes the locally collected content stream to the streaming media server 150, and the destination device 140 pulls the content stream from the streaming media server 150.
[0049] The components of the above data transmission system will be introduced below.
[0050] (1) CDN: The functional entities in CDN include content caching devices, content switches, content routers, and CDN content management systems. Among them, the content caching device is located at the user access point and is a content provision device for end users. It can cache static content and streaming content, and realize edge dissemination and storage of content. The content switch is located at the user access concentration point and can balance the load of multiple content caching devices at a single point, and perform cache load balancing and access control on the content. The content router is responsible for dispatching user requests to the appropriate device. The content management system is responsible for the management of the entire CDN and can perform content management.
[0051] (2) Edge Node: An edge node refers to a service platform at the edge of the network close to users. It is used to provide storage, computing, and network resources, and to move some key business applications to the edge of the access network to reduce bandwidth and latency losses caused by network transmission and multi-level forwarding. The jitterbuffer provided in this application can be deployed at the edge node of the CDN.
[0052] (3) Source device: The source device is the terminal used by the streaming user. The client is deployed on the terminal. The client can be run on the terminal in the form of a browser or an independent application (APP). There is no limitation on the specific presentation format of the client. The source device can be a mobile phone, tablet computer, laptop computer, PDA, personal computer, smart TV, smart watch, car device, wearable device, etc.
[0053] (4) Destination device: The destination device is the terminal used by the streaming user. The client can also be deployed on the destination device, and the destination device can also be a mobile phone, tablet computer, laptop computer, PDA, personal computer, smart TV, smart watch, car device, wearable device, etc.
[0054] (5) Streaming Media Server: A streaming media server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms. The jitterbuffer provided in this application can also be deployed on a streaming media server.
[0055] In combination with the above introduction, the data transmission method in the present application will be introduced below. Please refer to Figure 3. The data transmission method in the embodiment of the present application can be executed by a computer device, which can be a server or a terminal, including:
[0056] 210. Receive a first data frame sequence sent by a source device within a first time window, where the first data frame sequence includes at least two data frames;
[0057] In one or more embodiments, a source device pushes a content stream to a server (e.g., a CDN edge node or a streaming media server) via a communication protocol. The content stream is pushed in the form of data frames, so the server can collect all data frames within a time window. Taking the first time window as an example, the server can obtain a first data frame sequence within the first time window, where the first data frame sequence includes at least two data frames.
[0058] It should be noted that a time window can be set to 5 to 10 seconds, or other reasonable duration, and is not limited here. The communication protocol used by the source device can be real-time messaging protocol (RTMP), web real-time communication (WebRTC) protocol, or secure reliable transport (SRT), etc., and is not limited here.
[0059] 220. Determine data jitter information according to the first data frame sequence, where the data jitter information is used to describe jitter conditions of data frames within a time window;
[0060] In one or more embodiments, the server may deploy a monitoring device that measures frame rate changes in real time. The monitoring device may generate data jitter information based on the first data frame sequence collected within a first time window. The data jitter information is used to describe the jitter of the data frames within a time window. It should be noted that in this embodiment, the data jitter information represents the jitter of the data frames within the first time window. In other embodiments, the data jitter information may represent the jitter of the data frames within a second time window (or other time windows).
[0061] It should be noted that data frame jitter can refer to changes in the data frame transmission rate or the data frame transmission time interval. In many cases, due to factors such as network conditions, the data frame transmission rate may change, such as from 30 frames per second to 10 frames per second; or the data frame transmission time interval may change, such as the transmission time interval between two adjacent data frames from 0.03s to 0.1s. In the embodiment of the present application, data jitter information is used to describe the changes in the data frame transmission rate or the changes in the data frame transmission time interval within a specific time window.
[0062] For example, assume that the normal playback frame rate is 30 frames per second (fps), but due to unstable network conditions, the frame rate may be 10fps, or 35fps, etc., which will cause unstable transmission of data frames. Therefore, it is necessary to construct data jitter information to describe the jitter of data frames within a time window.
[0063] 230. Set a first buffering time threshold of the data buffer according to the data jitter information;
[0064] In one or more embodiments, a first buffering duration threshold corresponding to the data buffer is determined in conjunction with data jitter information. The first buffering duration threshold is a reference duration threshold used to determine whether to adjust the transmission rate of the data frame. If the jitter of the data frame within the first time window is determined to be relatively strong based on the data jitter information, the first buffering duration threshold corresponding to the data buffer is relatively large. Conversely, if the jitter of the data frame within the first time window is determined to be very weak (or even no jitter) based on the data jitter information, the first buffering duration threshold corresponding to the data buffer is relatively small, and the first buffering duration threshold may even be set to 0.
[0065] That is to say, it is necessary to set the first buffering time threshold of the data buffer area according to the data frame jitter situation within the first time window represented by the data jitter information; the first buffering time threshold is positively correlated with the data frame jitter situation represented by the data jitter information, that is, the stronger the data frame jitter situation represented by the data jitter information, the larger the first buffering time threshold, and the milder the data frame jitter situation represented by the data jitter information, the smaller the first buffering time threshold.
[0066] It should be noted that the data buffer in the embodiments of the present application is an intermediate node in the entire data transmission process. Specifically, in the embodiments of the present application, the source device can transmit its collected content stream to the streaming media server, and then the destination device can obtain the data uploaded by the source device from the streaming media server. The data buffer in the embodiments of the present application can be deployed on the above-mentioned streaming media server, serving as an intermediate node in the entire data transmission process to store the data uploaded by the source device.
[0067] 240. If the playback duration corresponding to the data frames currently contained in the data buffer is greater than or equal to the first buffer duration threshold, increase the transmission rate of the data frames in the data buffer to the destination device.
[0068] In one or more embodiments, the server can obtain the number of data frames currently stored in the data buffer in real time, and then determine the playback duration corresponding to the data frames currently stored in the data buffer. It should be noted that the playback duration here can be the complete playback duration corresponding to the data frames currently contained in the predicted data buffer (this part of the data frames has not yet been transmitted to the destination device). For example, the playback duration corresponding to the data frames currently stored in the data buffer can be calculated according to the normal playback frame rate. For example, assuming that the number of data frames currently stored in the data buffer is 60 frames, and assuming that the normal playback frame rate is 30fps, the data frame playback duration can be calculated to be 2 seconds.
[0069] It should be noted that, from the perspective of time dimension, the first time window in step 210 may be before the "current" in step 240, and the first time window is very close to the "current"; the first time window in step 210 may also be the time window to which the "current" in step 240 belongs.
[0070] The embodiment of the present application aims to use the data jitter of the source device to push the stream (i.e., the data jitter of the uplink) to control and adjust the data transmission rate of the stream to the destination device (i.e., the downlink), so that the CDN buffering strategy and the uplink push stream situation form a feedback loop. Specifically, if the data transmission of the uplink is relatively stable (i.e., the data jitter is relatively weak), the data transmission rate of the downlink can be increased, thereby avoiding the data backlog in the data buffer, accelerating the transmission of data stored in the data buffer, improving the overall data transmission efficiency of the uplink and downlink, and avoiding high latency.
[0071] Specifically, if the playback duration of the data frames currently included in the data buffer is greater than or equal to the first buffer duration threshold, it indicates that there are a large number of buffered data frames and the data frame transmission rate needs to be increased. That is, the data frames stored in the buffer are sent to the destination device at the first transmission rate, which is greater than the original transmission rate. For example, if the first transmission rate is 1.1 times the original transmission rate and the original transmission rate is 30 fps, then the first transmission rate can be 33 fps.
[0072] It should be noted that, in one case, the data frame can be stored directly in the data buffer. In another case, the index of the data frame is stored in the data buffer, and the data frame can be stored in a circular queue. Based on this, the destination device can start receiving the data frame from the most recent or second most recent I frame in the circular queue. Since the data frames stored in the circular queue are public, the occupancy rate of memory and processing resources can be reduced. In the embodiments of the present application, the data frames in the above two cases are collectively referred to as data frames contained in the data buffer.
[0073] For ease of understanding, please refer to Figure 4, which is a schematic diagram of the working principle of the adaptive anti-jitter buffer in an embodiment of the present application. As shown in the figure, taking the live broadcast scenario as an example, the source device pushes the real-time collected video stream to the live broadcast CDN. The live broadcast CDN receives the input video frames. Due to the instability of the uplink network, these video frames are jittery. Therefore, by identifying the changes in the frame rate, the buffering time threshold can be adaptively adjusted. As a result, smooth data frames are output to the destination device at a certain transmission rate, so that the destination device can stably play the live video.
[0074] An embodiment of the present application provides a method for data transmission. Through the above-mentioned method, a more accurate data frame jitter situation is obtained based on the frame-level data, thereby adaptively adjusting the first buffering duration threshold of the data buffer based on the data frame jitter situation within the time window. When the playback duration corresponding to the currently buffered data frame is greater than the first buffering duration threshold, the transmission rate of the data frame will be accelerated, thereby effectively avoiding high latency in the content stream and better meeting the needs of low-latency video services. At the same time, the method provided by the present application can resist about 20% uplink packet loss in a laboratory environment.
[0075] Optionally, based on the embodiments corresponding to FIG. 3 above, another optional embodiment provided in the embodiment of the present application may further include:
[0076] If the playback duration corresponding to the data frames currently contained in the data buffer is less than the first buffer duration threshold, the data frames in the data buffer are sent to the destination device at the original transmission rate.
[0077] In one or more embodiments, a data transmission method supporting two buffering duration intervals is described. As can be seen from the aforementioned embodiments, the server determines the playback duration corresponding to the data frames currently stored in the data buffer based on the number of data frames currently buffered and the normal playback frame rate. If the playback duration corresponding to the data frames currently stored in the data buffer is less than a first buffering duration threshold, indicating that the number of buffered data frames is reasonable, the data frames stored in the buffer are transmitted to the destination device at the original transmission rate.
[0078] The following is an introduction with reference to FIG5 , which is a flow chart of adaptive anti-jitter buffering in an embodiment of the present application. Specifically, as shown in the figure:
[0079] In step A1, the server receives a data frame sent by a source device.
[0080] In step A2, the server determines data jitter information based on data frames received within a time window.
[0081] In step A3, the server updates a first buffering duration threshold of the data buffer according to the data jitter information corresponding to the time window.
[0082] In step A4, the server calculates the playback duration of the data frame currently stored in the buffer based on the number of data frames currently buffered in the data buffer. The server then determines whether the playback duration is greater than or equal to the first buffering duration threshold. If so, the server proceeds to step A5; if not, the server proceeds to step A6.
[0083] In step A5, the smoothed data frame is sent to the destination device at the first transmission rate.
[0084] In step A6, the smoothed data frame is sent to the destination device at the original transmission rate.
[0085] In step A7, the buffer length of the buffer is updated in combination with the transmission status of the data frame, and the first buffer duration threshold of the data buffer is updated based on the data frame received in the next time window.
[0086] Secondly, embodiments of the present application provide a data transmission method that supports two buffering duration intervals. Through this approach, when the playback duration corresponding to the data frame currently stored in the data buffer is less than the first buffering duration threshold, the data frame is sent to the destination device at the original transmission rate. Consequently, corresponding transmission strategies are adopted for data frames in different buffering duration intervals, thereby enhancing the flexibility of the solution.
[0087] Optionally, based on the various embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, the data jitter information includes a frame rate variance or a frame rate standard deviation;
[0088] Determining a first buffering duration threshold corresponding to the buffer area according to the data jitter information may specifically include:
[0089] Determining the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or determining the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value;
[0090] A first buffering time threshold corresponding to the data buffer is determined according to the product of the adjustment coefficient and the configured time.
[0091] In one or more embodiments, a method for calculating a buffering duration threshold based on frame rate variance or frame rate standard deviation is described. As can be seen from the aforementioned embodiments, data jitter information includes frame rate variance or frame rate standard deviation. A larger frame rate variance or frame rate standard deviation calculated for a time window indicates greater data frame jitter within that time window.
[0092] Since the first buffering duration threshold of the buffer zone can be adjusted once every time window, for ease of introduction, one of the time windows (ie, the first time window) will be taken as an example for description below.
[0093] Specifically, for ease of understanding, please refer to Figure 6, which is a schematic diagram of implementing anti-jitter buffering based on frame rate jitter in an embodiment of the present application. As shown in the figure, all data frames in a time window are obtained, for example, the first data frame sequence from the first time window is obtained. Assuming that a time window is 10 seconds, based on this, the frame rate per second can be calculated, and then the frame rate variance or frame rate standard deviation for the time window is calculated based on the frame rate per second. For example, assuming that the frame rate variance corresponding to a certain time window is 1.8, and the frame rate variance corresponding to the previous time window is 3.6. The frame rate variance of the time window is reduced by 50% compared with the frame rate variance of the previous time window. Assuming that the deviation of the frame rate variance of two adjacent time windows is greater than 20%, it means that the frame rate variance is noise, then the frame rate variance corresponding to this time window can be eliminated, thereby achieving the filtering effect.
[0094] In the case where the frame rate variance or the frame rate standard deviation does not need to be eliminated, normalization processing is still required. One way is to determine the adjustment coefficient based on the ratio between the frame rate variance and the first preset parameter value, that is, the adjustment coefficient is calculated as follows: β = δ(f) / δ1; Formula (1)
[0095] Wherein, β represents the adjustment coefficient. δ(f) represents the frame rate variance. δ1 represents a first preset parameter value (e.g., 2). The smaller the first preset parameter value, the more sensitive the adjustment coefficient.
[0096] Another way is to determine the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value, that is, the adjustment coefficient is calculated in the following way: β = σ(f) / σ2; Formula (2)
[0097] Wherein, β represents the adjustment coefficient. σ(f) represents the standard deviation of the frame rate. σ2 represents the second preset parameter value (e.g., 1.2). The smaller the preset parameter value, the more sensitive the adjustment coefficient.
[0098] After the adjustment coefficient is calculated, the first buffering time threshold is calculated as follows: T = β * t; Formula (3)
[0099] Wherein, T represents the first buffering time threshold, β represents the adjustment coefficient, and t represents the configured time (e.g., 500 milliseconds).
[0100] It is understandable that when the uplink frame rate is stable, priority is given to reducing latency. At this time, the frame rate variance or frame rate standard deviation is very small, that is, the adjustment coefficient is close to 0. Therefore, almost no data frames are cached in the jitterbuffer on the server side. When the uplink frame rate is unstable, priority is given to smoothness. At this time, the frame rate variance or frame rate standard deviation is large, that is, the adjustment coefficient is positively correlated with the frame rate variance or frame rate standard deviation. Therefore, the jitterbuffer on the server side automatically adjusts the first buffer duration threshold and the transmission rate according to the degree of jitter, thereby improving the adaptability of the content distribution network in different scenarios.
[0101] Secondly, embodiments of the present application provide a method for calculating a buffering time threshold based on frame rate variance or frame rate standard deviation. This method automatically adjusts the first buffering time threshold and the data frame transmission rate based on the frame rate variance or frame rate standard deviation, improving the adaptability of the content distribution network in different scenarios. Furthermore, this method is relatively simple and easy to implement, and provides excellent real-time processing performance.
[0102] Optionally, based on the embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, determining data jitter information according to the first data frame sequence may specifically include:
[0103] Counting the frame rate corresponding to each time unit in a first time window according to the first data frame sequence, wherein the first time window includes K time units, and K is an integer greater than 1;
[0104] According to the frame rate corresponding to each time unit, the average frame rate is calculated;
[0105] The frame rate variance or frame rate standard deviation is calculated based on the frame rate corresponding to each time unit and the average frame rate.
[0106] In one or more embodiments, a method for calculating frame rate variance or frame rate standard deviation is described. As can be seen from the aforementioned embodiments, the corresponding frame rate variance or frame rate standard deviation can be calculated for each time window. The following description will be made using one of the time windows (i.e., the first time window) as an example.
[0107] Specifically, assuming that a time window is 10 seconds and a time unit is 1 second, the first time window includes 10 time units. Based on this, the frame rate corresponding to each time unit can be calculated based on the first data frame sequence obtained in the first time window. For example, if 20 data frames sent by the source device are received in one time unit, the frame rate of this time unit is 20fps. Therefore, the frame rates corresponding to K time units are spliced together to obtain the average frame rate. Based on the frame rate corresponding to each time unit and the average frame rate, the frame rate variance or frame rate standard deviation can be calculated.
[0108] Based on this, the frame rate variance can be calculated as follows:
[0109] Where δ(f) represents the frame rate variance. K represents the total number of time units. i Indicates the frame rate corresponding to the i-th time unit. Indicates the average frame rate.
[0110] Based on this, the frame rate standard deviation can be calculated as follows:
[0111] Where σ(f) represents the frame rate variance. K represents the total number of time units. i Indicates the frame rate corresponding to the i-th time unit. Indicates the average frame rate.
[0112] Again, in an embodiment of the present application, a method for calculating the frame rate variance or frame rate standard deviation is provided. By using the above method, the frame rate can be calculated using the collected data frame sequence, and thus the frame rate variance or frame rate standard deviation can be further calculated, thereby improving the feasibility and operability of the solution.
[0113] Optionally, based on the various embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, the data jitter information includes an inter-frame interval distribution function, wherein the inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability;
[0114] Setting a first buffering time threshold corresponding to the data buffer according to the data jitter information may specifically include:
[0115] Determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function;
[0116] A first buffering time threshold of the data buffer is determined according to the product of the interval time and the configuration coefficient.
[0117] In one or more embodiments, a method for calculating a buffering duration threshold based on an inter-frame spacing distribution function is described. As can be seen from the aforementioned embodiments, data jitter information includes an inter-frame spacing distribution function, wherein the inter-frame spacing distribution function is constructed based on the inter-frame spacing within a time window. The inter-frame spacing distribution function is used to describe the relationship between the inter-frame spacing and the confidence probability. Therefore, the larger the inter-frame spacing corresponding to a preset confidence probability (e.g., 95%), the greater the data frame jitter within the time window.
[0118] It is understandable that the preset confidence probability is usually set to a larger confidence probability, for example, 95%. Optionally, the preset confidence probability can also be set to other reasonable values, which are not limited here. It should be noted that the inter-frame interval distribution function in this application can adopt a cumulative distribution function (CDF) or a complementary cumulative distribution function (CCDF).
[0119] Since the first buffering duration threshold of the buffer zone can be adjusted once every time window, for ease of introduction, one of the time windows (ie, the first time window) will be taken as an example for description below.
[0120] Specifically, for ease of understanding, please refer to Figure 7, which is another schematic diagram of implementing anti-jitter buffering based on frame rate jitter in an embodiment of the present application. As shown in the figure, first obtain all data frames in a time window, for example, obtain the first data frame sequence from the first time window. Based on the inter-frame interval between each pair of adjacent data frames in the first data frame sequence, a probability distribution histogram is generated. Based on the probability distribution histogram, a probability density function (PDF) about the inter-frame interval is drawn, and the CDF can be obtained by integrating the PDF. This application uses CDF as the inter-frame interval distribution function, and thus, the interval duration can be calculated in the following way: α=F -1 (B%); Formula (6)
[0121] Where α represents the interval duration. F represents the inter-frame interval distribution function, F -1 represents the inverse function of the inter-frame spacing distribution function. B% represents a preset confidence probability, for example, 95%.
[0122] After the interval duration is calculated, the first buffer duration threshold is calculated as follows: T = α*w; Formula (7)
[0123] Where T represents the first buffering time threshold, α represents the interval time, and w represents the configuration coefficient (e.g., 1.2).
[0124] Secondly, in an embodiment of the present application, a method for calculating a buffering duration threshold based on an inter-frame interval distribution function is provided. Through the above method, the inter-frame interval distribution function is used to derive the interval duration corresponding to a preset confidence probability (for example, 95%), that is, the probability that the interval between two future frames will be less than the interval duration is predicted to be 95%. The first buffering duration threshold and the transmission rate of the data frame are automatically adjusted based on the interval duration, thereby improving the adaptability of the content distribution network in different scenarios. In addition, the above method has a relatively good effect in practical application.
[0125] Optionally, based on the embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, determining data jitter information according to the first data frame sequence may specifically include:
[0126] Counting, according to the first data frame sequence, at least one maximum inter-frame interval corresponding to each time unit in a first time window, wherein the first time window includes K time units, where K is an integer greater than 1;
[0127] generating a probability distribution histogram according to at least one maximum inter-frame interval corresponding to each time unit;
[0128] Construct the inter-frame interval distribution function based on the probability distribution histogram.
[0129] In one or more embodiments, a method for constructing an inter-frame interval distribution function is described. As can be seen from the aforementioned embodiments, the corresponding frame rate variance or frame rate standard deviation can be calculated for each time window interval. The following description will be made using one of the time windows (i.e., the first time window) as an example.
[0130] Specifically, assume that a time window is 10 seconds and a time unit is 1 second, i.e., the first time window includes 10 time units. Furthermore, assume that the first two maximum interframe intervals corresponding to each time unit are counted. Based on this, refer to Table 1, which shows the 20 maximum interframe intervals taken from the first time window.
[0131] Table 1
[0132] Combined with the 20 maximum inter-frame intervals shown in Table 1, a probability distribution histogram as shown in FIG8 (A) can be constructed. Specifically, the receiving time of the i-th data frame is denoted as a i , the receiving time of the i+1th data frame is a i+1 , then the interframe interval between the i-th data frame and the i+1-th data frame is equal to t i =a i+1 -a iBy analogy, the interframe intervals between adjacent data frames in a time window can be obtained, and thus, at least one maximum interframe interval can be further screened out from the interframe intervals in each time unit.
[0133] After obtaining the probability distribution histogram shown in Figure 8 (A), the inter-frame spacing distribution function can be constructed. Taking the inter-frame spacing distribution function as a CDF as an example, one approach is to sum all histograms before a specified point to obtain the CDF shown in Figure 8 (B). Another approach is to plot the PDF within the probability distribution histogram and integrate the PDF to obtain the CDF shown in Figure 8 (B).
[0134] Again, the embodiments of the present application provide a method for constructing an inter-frame interval distribution function. Through the above method, the relationship between the inter-frame interval and the confidence probability is reflected based on the inter-frame interval distribution function. In combination with the inter-frame interval distribution function, the interval duration corresponding to the confidence probability of a preset confidence probability (for example, 95%) can be derived, thereby improving the feasibility and operability of the solution.
[0135] Optionally, based on the various embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, the data jitter information includes a frame rate variance or a frame rate standard deviation, and the data jitter information includes an inter-frame interval distribution function, wherein the inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability;
[0136] Setting a first buffering time threshold corresponding to the data buffer according to the data jitter information may specifically include:
[0137] Determining the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or determining the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value;
[0138] Determine a first value according to the product of the adjustment coefficient and the configuration time;
[0139] Determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function;
[0140] Determine a second value according to the product of the interval length and the configuration coefficient;
[0141] If the first value is greater than the second value, the first value is used as the first buffering time threshold corresponding to the data buffer;
[0142] If the second value is greater than or equal to the first value, the second value is used as the first buffering time threshold corresponding to the data buffer.
[0143] In one or more embodiments, a method for determining a buffering duration threshold is described. As can be seen from the aforementioned embodiments, data jitter information may include not only frame rate variance or frame rate standard deviation, but also an inter-frame interval distribution function. Because the first buffering duration threshold of the buffer zone can be adjusted once per time window, for ease of description, the following description will use one of the time windows (i.e., the first time window) as an example.
[0144] Specifically, a first data frame sequence from a first time window is obtained. Thus, on the one hand, the frame rate per second can be calculated, and then the frame rate variance or frame rate standard deviation for the time window can be calculated based on the frame rate per second, and then the adjustment coefficient is calculated in combination with formula (1) or formula (2), and finally, the first value is calculated in combination with formula (3). Among them, the first value represents an optional first buffer duration threshold. On the other hand, a probability distribution histogram is generated based on the inter-frame interval between each pair of adjacent two frames of data frames in the first data frame sequence, and then an inter-frame interval distribution function is constructed based on the probability distribution histogram. Then, the interval duration is calculated in combination with formula (6), and finally, the second value is calculated in combination with formula (7). Among them, the second value represents another optional first buffer duration threshold.
[0145] Based on this, if the first value is greater than the second value, the first value is used as the first buffering time threshold corresponding to the data buffer. Conversely, if the second value is greater than or equal to the first value, the second value is used as the first buffering time threshold corresponding to the data buffer. It should be noted that the method for sending data frames based on the first buffering time threshold can be found in the previous embodiment and is not described in detail here.
[0146] Secondly, an embodiment of the present application provides a method for determining a buffering time threshold. Through the above method, a buffering time threshold to be selected can be calculated based on the frame rate variance or the frame rate standard deviation, and another buffering time threshold to be selected can be calculated based on the inter-frame interval distribution function. The larger of the two buffering time thresholds to be selected is used as the first buffering time threshold corresponding to the buffer zone. In this way, it is possible to better resist uplink network jitter, which is conducive to coping with complex uplink network environments.
[0147] Optionally, based on the embodiments corresponding to FIG. 3 above, another optional embodiment provided in the embodiment of the present application may further include:
[0148] Receive a service configuration request sent by a source device, wherein the service configuration request carries a service type identifier;
[0149] Determining data jitter information according to the first data frame sequence may specifically include:
[0150] If the service type identifier indicates a real-time service, determining data jitter information according to the first data frame sequence and the first configuration parameter set;
[0151] If the service type identifier indicates a smooth service, determining data jitter information according to the first data frame sequence and the second configuration parameter set;
[0152] The first configuration parameter set includes at least one of a configuration duration and a configuration coefficient, and the second configuration parameter set includes at least one of a configuration duration and a configuration coefficient;
[0153] The configuration duration included in the first configuration parameter set is shorter than the configuration duration included in the second configuration parameter set;
[0154] The configuration coefficients included in the first configuration parameter set are smaller than the configuration coefficients included in the second configuration parameter set.
[0155] In one or more embodiments, a method for supporting user-defined data transmission is introduced. As can be seen from the aforementioned embodiments, there are many types of streaming media, such as e-commerce live broadcasts, online education, live shows, live news broadcasts, online TV, radio services, sports events, etc. Different types of streaming media often have different playback requirements. Generally, for situations with more interactions during live broadcasts, lower latency is required, so it is recommended to use a smaller configuration duration or configuration coefficient. For situations with less interactions during live broadcasts, higher fluency is required, so it is recommended to use a larger configuration duration or configuration coefficient.
[0156] Specifically, three types of live broadcast scenarios will be introduced below with reference to diagrams.
[0157] 1. E-commerce live streaming scenarios;
[0158] For example, for ease of understanding, please refer to Figure 9, which is a schematic diagram of a customized data transmission mode for an e-commerce live broadcast scenario in an embodiment of the present application. As shown in the figure, usually, in an e-commerce live broadcast scenario, there is a lot of interaction between the live broadcaster and the audience. Therefore, the live broadcaster can trigger a service configuration request through the source device. Taking Figure 9 as an example, the service configuration request carries a service type identifier corresponding to "real-time service". Based on this, the server can adopt a first configuration parameter set based on the service type identifier. Among them, the first configuration parameter set includes at least one of a configuration duration and a configuration coefficient. For example, the configuration duration is 500 milliseconds and the configuration coefficient is 0.3.
[0159] 2. Online education scenarios;
[0160] For ease of understanding, please refer to Figure 10, which is a schematic diagram of a customized data transmission mode for an online education scenario in an embodiment of the present application. As shown in the figure, usually, in an online education scenario, there is more interaction between the live broadcaster and the audience. Therefore, the live broadcaster can trigger a service configuration request through the source device. Taking Figure 10 as an example, the service configuration request carries a service type identifier corresponding to "real-time service". Based on this, the server can adopt a first set of configuration parameters based on the service type identifier.
[0161] 3. Live show scene;
[0162] For ease of understanding, please refer to Figure 11, which is a schematic diagram of a customized data transmission mode for a live show scenario in an embodiment of the present application. As shown in the figure, in a live show scenario, there is usually a lot of interaction between the live broadcaster and the audience. Therefore, the live broadcaster can trigger a service configuration request through the source device. Taking Figure 11 as an example, the service configuration request carries a service type identifier corresponding to "real-time service". Based on this, the server can adopt the first configuration parameter set based on the service type identifier.
[0163] In the above scenario, the server can combine the first data frame sequence and the first configuration parameter set to obtain data jitter information using the process described in the above embodiment, so it is not described here in detail.
[0164] 4. Game live broadcast scene;
[0165] For example, for ease of understanding, please refer to Figure 12, which is a schematic diagram of a customized data transmission mode for a game live broadcast scenario in an embodiment of the present application. As shown in the figure, usually, in a game live broadcast scenario, there is less interaction between the broadcaster and the audience, and the audience hopes to be able to watch clear and smooth game content. Therefore, the broadcaster can trigger a service configuration request through the source device. Taking Figure 12 as an example, the service configuration request carries a service type identifier corresponding to "smooth service". Based on this, the server can adopt a second configuration parameter set based on the service type identifier. Among them, the second configuration parameter set includes at least one of a configuration duration and a configuration coefficient. For example, the configuration duration is 2000 milliseconds and the configuration coefficient is 2.0.
[0166] In the above scenario, the server can combine the first data frame sequence and the second configuration parameter set to obtain data jitter information using the process described in the above embodiment, so it is not described here in detail.
[0167] Compared with smooth services, the configuration duration and configuration coefficient corresponding to real-time services are smaller. It should be noted that the scenarios and related configuration parameters shown in Figures 9, 10, 11 and 12 are only for illustration and should not be understood as limiting the present application.
[0168] Secondly, the embodiment of the present application provides a method that supports user-defined data transmission. Through the above method, users can adjust the relevant configuration parameters according to the actual needs of the live broadcast scene, thereby improving the flexibility and feasibility of the solution. At the same time, the data frame buffering method provided by the present application can support frame-level adaptive anti-video jitter scenarios. Therefore, the buffer size and the uplink streaming frame rate or the receiving frame rate form a feedback loop, which improves the video smoothness while reducing the video delay, helps to improve the live broadcast experience, and ultimately improves the gross merchandise volume (GMV), conversion rate and payment rate of live broadcast scenarios such as e-commerce.
[0169] Optionally, based on the embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, determining the first buffering duration threshold corresponding to the buffer zone according to data jitter information may specifically include:
[0170] Setting a first buffering time threshold and a second buffering time threshold of the data buffer according to the data jitter information, wherein the second buffering time threshold is smaller than the first buffering time threshold;
[0171] It may also include:
[0172] If the playback duration corresponding to the data frames currently contained in the data buffer is less than or equal to the second buffer duration threshold, the transmission rate of the data frames in the data buffer to the destination device is reduced.
[0173] In one or more embodiments, another data transmission method is described. As can be seen from the aforementioned embodiments, the server determines a first buffering time threshold and a second buffering time threshold corresponding to the data buffer based on data jitter information, wherein the second buffering time threshold is less than the first buffering time threshold.
[0174] Specifically, the server can obtain the number of data frames currently stored in the data buffer in real time, and calculate the playback duration corresponding to the data frames currently stored in the data buffer according to the normal playback frame rate. If the playback duration corresponding to the data frames currently stored in the data buffer is less than or equal to the second buffer duration threshold, it means that there are fewer buffered data frames, and the sending rate of the data frames needs to be slowed down or the normal sending rate needs to be maintained. That is, the data frames stored in the buffer are sent to the destination device at the second transmission rate or the original transmission rate, and the second transmission rate is less than the original transmission rate. Taking the second transmission rate as 0.9 times the original transmission rate as an example, assuming that the original transmission rate is 30fps, the second transmission rate can be 27fps.
[0175] Secondly, an embodiment of the present application provides another method for data transmission. Through the above method, a more accurate data frame jitter situation is obtained based on frame-level data. Thus, based on the data frame jitter situation within the time window, the first buffering duration threshold and the second buffering duration threshold of the buffer are adaptively adjusted. Thereby, the adaptability of the CDN to different uplink networks is improved, and in particular, the jamming rate when transmitting low-latency videos is reduced. After large-scale testing, the delay of the present application approaches 0 when the uplink transmission quality does not jitter. When the uplink transmission quality jitters, it can automatically optimize the buffer length, reasonably increase the partial delay to combat the uplink jitter, and significantly reduce the video playback jamming rate.
[0176] Optionally, based on the embodiments corresponding to FIG. 3 above, another optional embodiment provided in the embodiment of the present application may further include:
[0177] If the playback duration corresponding to the data frames currently contained in the data buffer is greater than the second buffer duration threshold, and the playback duration corresponding to the data frames currently contained in the data buffer is less than the first buffer duration threshold, the data frames in the data buffer are sent to the destination device at the original transmission rate.
[0178] In one or more embodiments, a data transmission method that supports three buffering duration intervals is introduced. As can be seen from the aforementioned embodiments, the server determines the playback duration corresponding to the data frames currently stored in the data buffer based on the number of data frames currently buffered and the normal playback frame rate. The playback duration is recorded as T, the first buffering duration threshold is recorded as T1, and the second buffering duration threshold is recorded as T2. Based on this, if T is greater than or equal to T1, the buffer draining mode is entered, that is, the data frames corresponding to the buffer are accelerated to the downstream destination device. If T is greater than T2 and T is less than T1, the normal buffering mode is entered, that is, the data frames corresponding to the buffer are normally sent to the downstream destination device. If T is less than or equal to T2, the buffer accumulation interval is entered, that is, the downstream destination device decelerates or normally sends the data frames corresponding to the buffer. Among them, T1 and T2 are proportional to the received frame rate distribution and can be adaptively adjusted.
[0179] The following is an introduction with reference to FIG13 , which is another flowchart of adaptive anti-jitter buffering in an embodiment of the present application. Specifically, as shown in the figure:
[0180] In step B1, the server receives a data frame sent by a source device.
[0181] In step B2, the server determines data jitter information based on data frames received within a time window.
[0182] In step B3, the server updates a first buffering duration threshold and a second buffering duration threshold of the data buffer according to the data jitter information corresponding to the time window.
[0183] In step B4, the server calculates the playback duration (i.e., T) of the data frames currently stored in the data buffer based on the number of data frames currently buffered in the data buffer. The server then compares the playback duration of the data frames currently stored in the data buffer with the buffering duration threshold.
[0184] In step B5, if the data frame playback duration is less than or equal to the second buffering duration threshold (ie, T≤T2), the smoothed data frame is sent to the destination device at the original transmission rate or the second transmission rate.
[0185] In step B6, if the data frame playback duration is greater than the second buffering duration threshold and less than the first buffering duration threshold (ie, T2 < T < T1), the smoothed data frame is sent to the destination device at the original transmission rate.
[0186] In step B7, if the data frame playback duration is greater than or equal to the first buffering duration threshold (ie, T≥T1), the smoothed data frame is sent to the destination device at the first transmission rate.
[0187] In step B8, the buffer length of the buffer is updated in combination with the transmission status of the data frame, and the first buffer duration threshold and the second buffer duration threshold of the buffer are updated based on the data frame received in the next time window.
[0188] Furthermore, embodiments of the present application provide a data transmission method that supports three buffering duration intervals. Through this approach, since the buffering duration intervals can be divided into a normal buffer interval, a buffer accumulation interval, and a buffer drain interval, different transmission rates can be used for the playback duration corresponding to the data frames currently stored in the buffer within different buffering duration intervals. In other words, corresponding transmission strategies will be adopted for data frames in different buffering duration intervals, thereby improving the flexibility of the solution.
[0189] Optionally, based on the various embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, the data jitter information includes a frame rate variance or a frame rate standard deviation;
[0190] Setting a first buffering time threshold and a second buffering time threshold corresponding to the data buffer according to the data jitter information may specifically include:
[0191] Determining the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or determining the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value;
[0192] Determine a first buffering time threshold corresponding to the data buffer according to the product of the adjustment coefficient and the first configured time;
[0193] A second buffering time threshold corresponding to the data buffer is determined according to a product of the adjustment coefficient and the second configured time, wherein the second configured time is less than the first configured time.
[0194] In one or more embodiments, a method for calculating a buffering duration threshold based on frame rate variance or frame rate standard deviation is described. As can be seen from the aforementioned embodiments, data jitter information includes frame rate variance or frame rate standard deviation. A larger frame rate variance or frame rate standard deviation calculated for a time window indicates greater data frame jitter within that time window.
[0195] Since the first buffering time threshold and the second buffering time threshold of the data buffer can be adjusted once every time window, for ease of introduction, one of the time windows (ie, the first time window) will be used as an example for explanation below.
[0196] Specifically, for ease of understanding, please refer to Figure 14, which is another schematic diagram of implementing anti-jitter buffering based on frame rate jitter in an embodiment of the present application. As shown in the figure, all data frames in a time window are obtained, for example, a first data frame sequence from a first time window is obtained. Based on this, the frame rate variance or frame rate standard deviation for a time window is calculated in combination with (4) or formula (5). Filtering is then performed based on the frame rate variance or frame rate standard deviation. Then, for the frame rate variance or frame rate standard deviation that does not need to be filtered out, the adjustment coefficient is calculated in combination with formula (1) or formula (2). It should be noted that the specific implementation method can be found in the aforementioned embodiment and will not be described here.
[0197] After the adjustment coefficient is calculated, the first buffering time threshold is calculated as follows: T2 = β * t2; Formula (8)
[0198] Wherein, T2 represents the first buffering time threshold, β represents the adjustment coefficient, and t2 represents the first configured time (e.g., 500 milliseconds).
[0199] The second buffering time threshold is calculated as follows: T1 = β * t1; Formula (9)
[0200] Wherein, T1 represents the second buffering time threshold, β represents the adjustment coefficient, and t1 represents the second configuration time (for example, 100 milliseconds).
[0201] Furthermore, embodiments of the present application provide a method for calculating a buffering duration threshold based on frame rate variance or frame rate standard deviation. This method automatically adjusts the first and second buffering duration thresholds, as well as the data frame transmission rate, based on the frame rate variance or frame rate standard deviation, improving the adaptability of the content distribution network in different scenarios. Furthermore, this method is relatively simple and easy to implement, and provides excellent real-time processing performance.
[0202] Optionally, based on the various embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, the data jitter information includes an inter-frame interval distribution function, wherein the inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability;
[0203] Determining a first buffering duration threshold and a second buffering duration threshold corresponding to the buffer area according to the data jitter information may specifically include:
[0204] Determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function;
[0205] Determine a first buffering time threshold corresponding to the data buffer according to the product of the interval time and the first configuration coefficient;
[0206] A second buffering time threshold corresponding to the data buffer is determined according to the product of the interval time and the second configuration coefficient, wherein the second configuration coefficient is smaller than the first configuration coefficient.
[0207] In one or more embodiments, a method for calculating a buffering duration threshold based on an inter-frame interval distribution function is introduced. As can be seen from the aforementioned embodiments, the data jitter information includes an inter-frame interval distribution function, wherein the inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability. Therefore, the larger the inter-frame interval corresponding to the preset confidence probability (e.g., 95%), the stronger the data frame jitter within the time window. It is understandable that the preset confidence probability is usually set to a larger confidence probability, such as 95%. In addition, the inter-frame interval distribution function can adopt CDF or CCDF, etc.
[0208] Since the first buffering duration threshold and the second buffering duration threshold of the buffer zone can be adjusted once every time window, for ease of introduction, one of the time windows (ie, the first time window) will be used as an example for explanation below.
[0209] Specifically, for ease of understanding, please refer to Figure 15, which is another schematic diagram of implementing anti-jitter buffering based on frame rate jitter in an embodiment of the present application. As shown in the figure, first, all data frames within a time window are obtained. Then, based on the inter-frame interval between each pair of adjacent two frames in the first data frame sequence, an inter-frame interval distribution function is constructed. The interval duration is then calculated in combination with formula (6). It should be noted that the specific implementation method can be referred to the aforementioned embodiment and will not be repeated here.
[0210] After the interval duration is calculated, the first buffer duration threshold is calculated as follows: T2 = α*w2; Formula (10)
[0211] Wherein, T2 represents the first buffering time threshold, α represents the interval time, and w2 represents the first configuration coefficient (e.g., 1.2).
[0212] The second buffering time threshold is calculated as follows: T1 = α*w1; Formula (11)
[0213] Wherein, T1 represents the second buffering time threshold, α represents the interval time, and w1 represents the second configuration coefficient (for example, 0.2).
[0214] Again, an embodiment of the present application provides a method for calculating a buffering duration threshold based on an inter-frame interval distribution function. Through the above method, the inter-frame interval distribution function is used to derive the interval duration corresponding to a preset confidence probability (for example, 95%), that is, the probability that the interval between two frames in the future will be less than the interval duration is predicted to be 95%. The first buffering duration threshold, the second buffering duration threshold and the transmission rate of the data frame are automatically adjusted based on the interval duration, thereby improving the adaptability of the content distribution network in different scenarios. In addition, the above method has a relatively good effect in practical application.
[0215] Optionally, based on the various embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, the data jitter information includes a frame rate variance or a frame rate standard deviation, and the data jitter information includes an inter-frame interval distribution function, wherein the inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability;
[0216] Determining a first buffering duration threshold and a second buffering duration threshold corresponding to the buffer area according to the data jitter information may specifically include:
[0217] Determining the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or determining the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value;
[0218] Determine a first upper limit value according to the product of the adjustment coefficient and the first configuration time length;
[0219] Determine a first lower limit value according to a product of the adjustment coefficient and the second configuration time length, wherein the second configuration time length is less than the first configuration time length;
[0220] Determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function;
[0221] Determine a second upper limit value according to the product of the interval length and the first configuration coefficient;
[0222] Determine a second lower limit value according to the product of the interval duration and a second configuration coefficient, wherein the second configuration coefficient is smaller than the first configuration coefficient;
[0223] If the first upper limit value is greater than the second upper limit value, the first upper limit value is used as the first buffering time threshold corresponding to the data buffer;
[0224] If the second upper limit value is greater than or equal to the first upper limit value, the second upper limit value is used as the first buffering time threshold corresponding to the data buffer;
[0225] If the first lower limit value is greater than the second lower limit value, the first lower limit value is used as the second buffering time threshold corresponding to the data buffer;
[0226] If the second lower limit value is greater than or equal to the first lower limit value, the second lower limit value is used as the second buffering time threshold corresponding to the data buffer area.
[0227] In one or more embodiments, a method for determining a buffering duration threshold is described. As can be seen from the aforementioned embodiments, data jitter information may include not only frame rate variance or frame rate standard deviation, but also an inter-frame interval distribution function. Because the first and second buffering duration thresholds of a buffer zone can be adjusted once per time window, for ease of description, one of the time windows (i.e., the first time window) will be used as an example for the following description.
[0228] Specifically, a first data frame sequence from a first time window is obtained. Thus, on the one hand, the frame rate per second can be calculated, and then the frame rate variance or frame rate standard deviation for the time window can be calculated based on the frame rate per second, and then the adjustment coefficient is calculated in combination with formula (1) or formula (2). Based on this, a first upper limit value is calculated in combination with formula (8). The first upper limit value represents an optional first buffer duration threshold. The first lower limit value is calculated in combination with formula (9). The first lower limit value represents an optional second buffer duration threshold. On the other hand, a probability distribution histogram is generated based on the inter-frame interval between each pair of adjacent two frames of data in the first data frame sequence, and then an inter-frame interval distribution function is constructed based on the probability distribution histogram. Then, the interval duration is calculated in combination with formula (6). The second upper limit value is calculated in combination with formula (10). The second upper limit value represents another optional first buffer duration threshold. The second lower limit value is calculated in combination with formula (11). The second lower limit value represents another optional second buffer duration threshold.
[0229] If the first upper limit value is greater than the second upper limit value, the first upper limit value is used as the first buffering time threshold corresponding to the data buffer. Conversely, if the second upper limit value is greater than or equal to the first upper limit value, the second upper limit value is used as the first buffering time threshold corresponding to the data buffer.
[0230] If the first lower limit value is greater than the second lower limit value, the first lower limit value is used as the second buffering time threshold corresponding to the data buffer. Conversely, if the second lower limit value is greater than or equal to the first lower limit value, the second lower limit value is used as the second buffering time threshold corresponding to the data buffer. It should be noted that the method for sending data frames based on the first buffering time threshold and the second buffering time threshold can be found in the aforementioned embodiment and will not be described in detail here.
[0231] Again, embodiments of the present application provide a method for determining a buffering duration threshold. Through the above method, two buffering duration thresholds to be selected can be calculated based on the frame rate variance or the frame rate standard deviation, and two other buffering duration thresholds to be selected can be calculated based on the inter-frame interval distribution function. Thus, a first buffering duration threshold and a second buffering duration threshold are selected. This allows for better resistance to uplink network jitter and facilitates handling complex uplink network environments.
[0232] Optionally, based on the embodiments corresponding to FIG. 3 above, another optional embodiment provided in the embodiment of the present application may further include:
[0233] Receive a service configuration request sent by a source device, wherein the service configuration request carries a service type identifier;
[0234] Determining data jitter information according to the first data frame sequence may specifically include:
[0235] If the service type identifier indicates a real-time service, determining data jitter information according to the first data frame sequence and the first configuration parameter set;
[0236] If the service type identifier indicates a smooth service, determining data jitter information according to the first data frame sequence and the second configuration parameter set;
[0237] The first configuration parameter set includes at least one of a first configuration duration, a second configuration duration, a first configuration coefficient, and a second configuration coefficient; and the second configuration parameter set includes at least one of a first configuration duration, a second configuration duration, a first configuration coefficient, and a second configuration coefficient.
[0238] The first configuration duration included in the first configuration parameter set is shorter than the first configuration duration included in the second configuration parameter set;
[0239] The second configuration duration included in the first configuration parameter set is smaller than the second configuration duration included in the second configuration parameter set;
[0240] The first configuration coefficient included in the first configuration parameter set is smaller than the first configuration coefficient included in the second configuration parameter set;
[0241] The second configuration coefficient included in the first configuration parameter set is smaller than the second configuration coefficient included in the second configuration parameter set.
[0242] In one or more embodiments, a method for supporting user-defined data transmission is described. As can be seen from the aforementioned embodiments, there are many different types of streaming media, and different types of streaming media often have different playback requirements. Generally, for live broadcasts with high levels of interaction, lower latency is required. For live broadcasts with low levels of interaction, higher fluency is required.
[0243] Specifically, three types of live broadcast scenarios will be introduced below with reference to diagrams.
[0244] 1. E-commerce live streaming scenarios;
[0245] For example, for ease of understanding, please refer to Figure 16, which is another schematic diagram of a customized data transmission mode for an e-commerce live broadcast scenario in an embodiment of the present application. As shown in the figure, usually, in an e-commerce live broadcast scenario, there is more interaction between the live broadcaster and the audience. Therefore, the live broadcaster can trigger a service configuration request through the source device. Taking Figure 16 as an example, the service configuration request carries a service type identifier corresponding to "real-time service". Based on this, the server can adopt a first configuration parameter set based on the service type identifier. Among them, the first configuration parameter set includes at least one of a first configuration duration, a second configuration duration, a first configuration coefficient, and a second configuration coefficient. For example, the first configuration duration is 500 milliseconds, the second configuration duration is 100 milliseconds, the first configuration coefficient is 0.3, and the second configuration coefficient is 0.05.
[0246] 2. Online education scenarios;
[0247] For ease of understanding, please refer to Figure 17, which is another schematic diagram of a customized data transmission mode for an online education scenario in an embodiment of the present application. As shown in the figure, usually, in an online education scenario, there is more interaction between the live broadcaster and the audience. Therefore, the live broadcaster can trigger a service configuration request through the source device. Taking Figure 10 as an example, the service configuration request carries a service type identifier corresponding to "real-time service". Based on this, the server can adopt a first set of configuration parameters based on the service type identifier.
[0248] 3. Live show scene;
[0249] For ease of understanding, please refer to Figure 18, which is another schematic diagram of a customized data transmission mode for a live show scenario in an embodiment of the present application. As shown in the figure, in a live show scenario, there is usually a lot of interaction between the live broadcaster and the audience. Therefore, the live broadcaster can trigger a service configuration request through the source device. Taking Figure 11 as an example, the service configuration request carries a service type identifier corresponding to "real-time service". Based on this, the server can adopt the first configuration parameter set based on the service type identifier.
[0250] In the above scenario, the server can combine the first data frame sequence and the first configuration parameter set to obtain data jitter information using the process described in the above embodiment, so it is not described here in detail.
[0251] 4. Game live broadcast scene;
[0252] For example, for ease of understanding, please refer to Figure 19, which is another schematic diagram of a customized data transmission mode for a game live broadcast scenario in an embodiment of the present application. As shown in the figure, generally, in a game live broadcast scenario, there is less interaction between the live broadcaster and the audience, and the audience hopes to be able to watch clear and smooth game content. Therefore, the live broadcaster can trigger a service configuration request through the source device. Taking Figure 19 as an example, the service configuration request carries a service type identifier corresponding to "smooth service". Based on this, the server can adopt a second configuration parameter set based on the service type identifier. Among them, the second configuration parameter set includes at least one of the first configuration duration, the second configuration duration, the first configuration coefficient, and the second configuration coefficient. For example, the first configuration duration is 2000 milliseconds, the second configuration duration is 200 milliseconds, the first configuration coefficient is 2.0, and the second configuration coefficient is 0.5.
[0253] In the above scenario, the server can combine the first data frame sequence and the second configuration parameter set to obtain data jitter information using the process described in the above embodiment, so it is not described here in detail.
[0254] Compared with smooth services, the configuration duration and configuration coefficient corresponding to real-time services are smaller. It should be noted that the scenarios and related configuration parameters shown in Figures 16, 17, 18 and 19 are only for illustration and should not be understood as limiting the present application.
[0255] Again, the embodiment of the present application provides a method that supports user-defined data transmission. Through the above method, users can adjust the relevant configuration parameters according to the actual needs of the live broadcast scene, thereby improving the flexibility and feasibility of the solution. At the same time, the data frame buffering method provided by the present application can support frame-level adaptive anti-video jitter scenarios. Therefore, the buffer size and the uplink push frame rate or the receiving frame rate form a feedback loop, which improves the video smoothness while reducing the video delay, helps to improve the live broadcast experience, and ultimately improves the GMV, conversion rate and payment rate of live broadcast scenarios such as e-commerce and online education.
[0256] Optionally, based on the embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, receiving a first data frame sequence sent by a source device within a first time window may specifically include:
[0257] Receive the current data frame sent by the source device;
[0258] A first data frame sequence within a first time window is acquired according to the current data frame, wherein the first data frame sequence includes the current data frame.
[0259] In one or more embodiments, a method for updating a time window is introduced. As can be seen from the above embodiments, since the buffering time threshold of the buffer can be adjusted once every time window, the update of the time window reflects the update frequency of the buffering time threshold.
[0260] Specifically, for ease of understanding, please refer to Figure 20, which is a schematic diagram of two adjacent time windows in an embodiment of the present application. As shown in the figure, assuming that the second time window is "time window 2", the second time window includes 7 data frames, and these 7 data frames constitute the second data frame sequence. When the server receives the current data frame sent by the source device, the server updates the time window, that is, obtains "time window 1". Assuming that "time window 1" is the first time window, the first time window also includes 7 data frames, and these 7 data frames constitute the first data frame sequence, and the first data frame sequence includes the current data frame (that is, the 1 data frame in gray in the figure).
[0261] Secondly, the embodiments of the present application provide a method for updating the time window. Through the above method, the server can update the time window every time it receives a data frame sent by the source device, and then update the buffering duration threshold based on the time window. This improves the efficiency of updating the buffering duration threshold, thereby better coping with jitter in the upstream network.
[0262] Optionally, based on the embodiments corresponding to FIG. 3 above, in another optional embodiment provided by the embodiment of the present application, receiving a first data frame sequence sent by a source device within a first time window may specifically include:
[0263] After receiving the second data frame sequence sent by the source device within the second time window, receive the first data frame sequence sent by the source device within the first time window, wherein the second time window is the previous time window adjacent to the first time window, and the data frames included in the second data frame sequence do not overlap with the data frames included in the first data frame sequence.
[0264] In one or more embodiments, a method for updating a time window is introduced. As can be seen from the above embodiments, since the buffering time threshold of the buffer can be adjusted once every time window, the update of the time window reflects the update frequency of the buffering time threshold.
[0265] Specifically, for ease of understanding, please refer to Figure 21, which is another schematic diagram of two adjacent time windows in an embodiment of the present application. As shown in the figure, assuming that the second time window is "time window 2", the second time window includes 7 data frames, and these 7 data frames constitute the second data frame sequence. After the server receives the second data frame sequence sent by the source device in the second time window, the timing of the next time window is started, for example, a time window is set every 10 seconds. Based on this, the server can update the time window every 10 seconds. Taking "time window 1" as an example, the "time window 1" can be a first time window, wherein the first time window includes 6 data frames (that is, the 6 data frames in gray in the figure), and these 6 data frames constitute a first data frame sequence, and the data frames included in the first data frame sequence and the data frames included in the second data frame sequence are not repeated.
[0266] Secondly, the embodiment of the present application provides a method for updating the time window. Through the above method, the server can update the time window once every certain period of time, and then update the buffering time threshold based on the time window. In this way, it can periodically deal with jitter in the upstream network.
[0267] The data transmission device in the present application is described in detail below. Please refer to FIG22 , which is a schematic diagram of an embodiment of the data transmission device in the present application. The data transmission device 30 includes:
[0268] A receiving module 310 is configured to receive a first data frame sequence sent by a source device within a first time window, wherein the first data frame sequence includes at least two data frames;
[0269] A determination module 320 is configured to determine data jitter information based on the first data frame sequence, wherein the data jitter information is used to describe jitter conditions of the data frames within a time window;
[0270] The determination module 320 is further configured to set a first buffering time threshold of the data buffer according to the data jitter information;
[0271] The transmission module 330 is configured to increase a transmission rate of the data frames in the data buffer to the destination device if the playback duration corresponding to the data frames currently contained in the data buffer is greater than or equal to a first buffer duration threshold.
[0272] An embodiment of the present application provides a data transmission device that uses the aforementioned device to obtain a more accurate picture of data frame jitter based on frame-level data. Based on the jitter of the data frames within a time window, the first buffering duration threshold of the buffer is adaptively adjusted. If the playback duration corresponding to the data frames currently stored in the data buffer exceeds the first buffering duration threshold, the data frame transmission rate is accelerated, thereby effectively avoiding high latency in the content stream and better meeting the needs of low-latency video services.
[0273] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application,
[0274] The transmission module 330 is further configured to transmit the data frames in the data buffer to the destination device at the original transmission rate if the playback duration corresponding to the data frames currently contained in the data buffer is less than the first buffer duration threshold.
[0275] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application, the data jitter information includes a frame rate variance or a frame rate standard deviation;
[0276] The determination module 320 is specifically configured to determine the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or to determine the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value;
[0277] A first buffering time threshold of the data buffer is determined according to the product of the adjustment coefficient and the configured time.
[0278] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application,
[0279] The determination module 320 is specifically configured to count the frame rate corresponding to each time unit in a first time window according to the first data frame sequence, wherein the first time window includes K time units, where K is an integer greater than 1;
[0280] According to the frame rate corresponding to each time unit, the average frame rate is calculated;
[0281] The frame rate variance or frame rate standard deviation is calculated based on the frame rate corresponding to each time unit and the average frame rate.
[0282] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in an embodiment of the present application, the data jitter information includes an inter-frame spacing distribution function, wherein the inter-frame spacing distribution function is used to describe the relationship between the inter-frame spacing and the confidence probability;
[0283] The determination module 320 is specifically configured to determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function;
[0284] A first buffering time threshold of the data buffer is determined according to the product of the interval time and the configuration coefficient.
[0285] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application,
[0286] The determination module 320 is specifically configured to count at least one maximum inter-frame interval corresponding to each time unit in a first time window according to the first data frame sequence, wherein the first time window includes K time units, where K is an integer greater than 1;
[0287] generating a probability distribution histogram according to at least one maximum inter-frame interval corresponding to each time unit;
[0288] Construct the inter-frame interval distribution function based on the probability distribution histogram.
[0289] Optionally, based on the embodiment corresponding to FIG. 22 above, in another embodiment of the data transmission device 30 provided in an embodiment of the present application, the data jitter information includes a frame rate variance or a frame rate standard deviation, and the data jitter information includes an inter-frame interval distribution function, wherein the inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability;
[0290] The determination module 320 is specifically configured to determine the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or to determine the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value;
[0291] Determine a first value according to the product of the adjustment coefficient and the configuration time;
[0292] Determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function;
[0293] Determine a second value according to the product of the interval length and the configuration coefficient;
[0294] If the first value is greater than the second value, the first value is used as the first buffering time threshold of the data buffer;
[0295] If the second value is greater than or equal to the first value, the second value is used as the first buffering time threshold of the data buffer.
[0296] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application, the data transmission device 30 further includes a response module 340 ;
[0297] A response module 340 is configured to receive a service configuration request sent by a source device, wherein the service configuration request carries a service type identifier;
[0298] The determining module 320 is specifically configured to determine data jitter information based on the first data frame sequence and the first configuration parameter set if the service type identifier indicates a real-time service;
[0299] If the service type identifier indicates a smooth service, determining data jitter information according to the first data frame sequence and the second configuration parameter set;
[0300] The first configuration parameter set includes at least one of a configuration duration and a configuration coefficient, and the second configuration parameter set includes at least one of a configuration duration and a configuration coefficient;
[0301] The configuration duration included in the first configuration parameter set is shorter than the configuration duration included in the second configuration parameter set;
[0302] The configuration coefficients included in the first configuration parameter set are smaller than the configuration coefficients included in the second configuration parameter set.
[0303] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application,
[0304] The determination module 320 is specifically configured to set a first buffering time threshold and a second buffering time threshold of the data buffer according to the data jitter information, wherein the second buffering time threshold is smaller than the first buffering time threshold;
[0305] The transmission module 330 is further configured to reduce a transmission rate of the data frames in the data buffer to the destination device if the playback duration corresponding to the data frames currently contained in the data buffer is less than or equal to the second buffer duration threshold.
[0306] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application,
[0307] The transmission module 330 is also used to transmit the data frames in the data buffer to the destination device at the original transmission rate if the playback duration corresponding to the data frames currently contained in the data buffer is greater than the second buffer duration threshold, and the playback duration corresponding to the data frames currently contained in the data buffer is less than the first buffer duration threshold.
[0308] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application, the data jitter information includes a frame rate variance or a frame rate standard deviation;
[0309] The determination module 320 is specifically configured to determine the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or to determine the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value;
[0310] Determine a first buffering time threshold of the data buffer according to a product of the adjustment coefficient and the first configured time;
[0311] A second buffering time threshold of the data buffer is determined according to a product of the adjustment coefficient and the second configured time, wherein the second configured time is less than the first configured time.
[0312] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in an embodiment of the present application, the data jitter information includes an inter-frame spacing distribution function, wherein the inter-frame spacing distribution function is used to describe the relationship between the inter-frame spacing and the confidence probability;
[0313] The determination module 320 is specifically configured to determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function;
[0314] Determine a first buffering time threshold of the data buffer according to the product of the interval time and the first configuration coefficient;
[0315] A second buffering time threshold of the data buffer is determined according to a product of the interval time and a second configuration coefficient, wherein the second configuration coefficient is smaller than the first configuration coefficient.
[0316] Optionally, based on the embodiment corresponding to FIG. 22 above, in another embodiment of the data transmission device 30 provided in an embodiment of the present application, the data jitter information includes a frame rate variance or a frame rate standard deviation, and the data jitter information includes an inter-frame interval distribution function, wherein the inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability;
[0317] The determination module 320 is specifically configured to determine the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or to determine the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value;
[0318] Determine a first upper limit value according to the product of the adjustment coefficient and the first configuration time length;
[0319] Determine a first lower limit value according to a product of the adjustment coefficient and the second configuration time length, wherein the second configuration time length is less than the first configuration time length;
[0320] Determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function;
[0321] Determine a second upper limit value according to the product of the interval length and the first configuration coefficient;
[0322] Determine a second lower limit value according to the product of the interval duration and a second configuration coefficient, wherein the second configuration coefficient is smaller than the first configuration coefficient;
[0323] If the first upper limit value is greater than the second upper limit value, the first upper limit value is used as the first buffering time threshold of the data buffer;
[0324] If the second upper limit value is greater than or equal to the first upper limit value, the second upper limit value is used as the first buffering time threshold of the data buffer;
[0325] If the first lower limit value is greater than the second lower limit value, the first lower limit value is used as the second buffering time threshold of the data buffer;
[0326] If the second lower limit value is greater than or equal to the first lower limit value, the second lower limit value is used as the second buffering time threshold of the data buffer area.
[0327] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application,
[0328] The response module 340 is further configured to receive a service configuration request sent by the source device, wherein the service configuration request carries a service type identifier;
[0329] The determining module 320 is specifically configured to determine data jitter information based on the first data frame sequence and the first configuration parameter set if the service type identifier indicates a real-time service;
[0330] If the service type identifier indicates a smooth service, determining data jitter information according to the first data frame sequence and the second configuration parameter set;
[0331] The first configuration parameter set includes at least one of a first configuration duration, a second configuration duration, a first configuration coefficient, and a second configuration coefficient; and the second configuration parameter set includes at least one of a first configuration duration, a second configuration duration, a first configuration coefficient, and a second configuration coefficient.
[0332] The first configuration duration included in the first configuration parameter set is shorter than the first configuration duration included in the second configuration parameter set;
[0333] The second configuration duration included in the first configuration parameter set is smaller than the second configuration duration included in the second configuration parameter set;
[0334] The first configuration coefficient included in the first configuration parameter set is smaller than the first configuration coefficient included in the second configuration parameter set;
[0335] The second configuration coefficient included in the first configuration parameter set is smaller than the second configuration coefficient included in the second configuration parameter set.
[0336] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application,
[0337] The receiving module 310 is specifically configured to receive the current data frame sent by the source device;
[0338] A first data frame sequence within a first time window is acquired according to the current data frame, wherein the first data frame sequence includes the current data frame.
[0339] Optionally, based on the embodiment corresponding to FIG. 22 , in another embodiment of the data transmission device 30 provided in the embodiment of the present application,
[0340] The receiving module 310 is specifically used to receive a first data frame sequence sent by the source device within a first time window after receiving a second data frame sequence sent by the source device within a second time window, wherein the second time window is the previous time window adjacent to the first time window, and the data frames included in the second data frame sequence do not repeat the data frames included in the first data frame sequence.
[0341] Figure 23 is a schematic diagram of a server structure provided in an embodiment of the present application. The server 400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 422 (for example, one or more processors) and a memory 432, and one or more storage media 430 (for example, one or more massive storage devices) for storing application programs 442 or data 444. Among them, the memory 432 and the storage medium 430 can be temporary storage or permanent storage. The program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 422 can be configured to communicate with the storage medium 430 to execute a series of instruction operations in the storage medium 430 on the server 400.
[0342] The server 400 may also include one or more power supplies 426, one or more wired or wireless network interfaces 450, one or more input and output interfaces 458, and / or one or more operating systems 441, such as Windows Server 2003 or Windows Server 2003R. TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM etc.
[0343] The steps executed by the server in the above embodiment can be based on the server structure shown in Figure 23.
[0344] A computer device is also provided in an embodiment of the present application, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the methods described in the above embodiments are implemented.
[0345] A computer-readable storage medium is also provided in an embodiment of the present application, on which a computer program is stored. When the computer program is executed by a processor, the steps of the methods described in the above embodiments are implemented.
[0346] A computer program product is also provided in an embodiment of the present application, including a computer program. When the computer program is executed by a processor, the steps of the methods described in the above embodiments are implemented.
[0347] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0348] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data transmission method, performed by a computer device, comprising: Receive a first data frame sequence sent by a source device within a first time window, wherein the first data frame sequence includes at least two data frames; Determining data jitter information according to the first data frame sequence, wherein the data jitter information is used to describe a jitter condition of a data frame within a time window; Setting a first buffering time threshold of the data buffer area according to the data jitter information; If the playback duration corresponding to the data frames currently contained in the data buffer is greater than or equal to the first buffer duration threshold, the transmission rate of the data frames in the data buffer to the destination device is increased.
2. The method according to claim 1, further comprising: If the playback duration corresponding to the data frames currently contained in the data buffer is less than the first buffer duration threshold, the data frames in the data buffer are transmitted to the destination device at the original transmission rate.
3. The method according to claim 1 or 2, wherein the data jitter information comprises a frame rate variance or a frame rate standard deviation; The step of setting a first buffering duration threshold of the data buffer according to the data jitter information includes: Determining the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or determining the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value; The first buffering time threshold of the data buffer is determined according to the product of the adjustment coefficient and the configured time.
4. The method according to claim 3, wherein determining data jitter information according to the first data frame sequence comprises: According to the first data frame sequence, counting the frame rate corresponding to each time unit in the first time window, wherein the first time window includes K time units, and K is an integer greater than 1; Calculate the average frame rate according to the frame rate corresponding to each time unit; The frame rate variance or the frame rate standard deviation is calculated according to the frame rate corresponding to each time unit and the average frame rate.
5. The method according to any one of claims 1 to 4, wherein the data jitter information comprises an inter-frame spacing distribution function, wherein: The inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability; The step of setting a first buffering duration threshold of the data buffer according to the data jitter information includes: Determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function; The first buffering time threshold of the data buffer is determined according to the product of the interval time and the configuration coefficient.
6. The method according to claim 5, wherein determining data jitter information according to the first data frame sequence comprises: According to the first data frame sequence, counting at least one maximum inter-frame interval corresponding to each time unit in the first time window, wherein the first time window includes K time units, and K is an integer greater than 1; Generate a probability distribution histogram according to at least one maximum inter-frame interval corresponding to each time unit; The inter-frame spacing distribution function is constructed according to the probability distribution histogram.
7. The method according to claim 1 or 2, wherein the data jitter information comprises a frame rate variance or a frame rate standard deviation, and the data jitter information comprises an inter-frame spacing distribution function, wherein: The inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability; The step of setting a first buffering duration threshold of the data buffer according to the data jitter information includes: Determining the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or determining the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value; Determine a first value according to the product of the adjustment coefficient and the configuration duration; Determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function; Determine a second value according to the product of the interval duration and the configuration coefficient; If the first value is greater than the second value, using the first value as the first buffering time threshold of the data buffer; If the second value is greater than or equal to the first value, the second value is used as the first buffering time threshold of the buffer area.
8. The method according to any one of claims 1 to 7, further comprising: Receiving a service configuration request sent by the source device, wherein the service configuration request carries a service type identifier; The determining data jitter information according to the first data frame sequence includes: If the service type identifier indicates a real-time type service, determining data jitter information according to the first data frame sequence and the first configuration parameter set; If the service type identifier indicates a smooth type service, determining data jitter information according to the first data frame sequence and the second configuration parameter set; The first configuration parameter set includes at least one of a configuration duration and a configuration coefficient, and the second configuration parameter set includes at least one of a configuration duration and a configuration coefficient; The configuration duration included in the first configuration parameter set is shorter than the configuration duration included in the second configuration parameter set; The configuration coefficients included in the first configuration parameter set are smaller than the configuration coefficients included in the second configuration parameter set.
9. The method according to any one of claims 1 to 8, wherein setting a first buffering duration threshold of a data buffer according to the data jitter information comprises: According to the data jitter information, setting the first buffering time threshold and the second buffering time threshold of the data buffer, wherein the second buffering time threshold is smaller than the first buffering time threshold; The method further comprises: If the playback duration corresponding to the data frames currently contained in the data buffer is less than or equal to the second buffer duration threshold, the transmission rate of the data frames in the data buffer to the destination device is reduced.
10. The method according to claim 9, further comprising: If the playback duration corresponding to the data frames currently contained in the data buffer is greater than the second buffer duration threshold, and the playback duration corresponding to the data frames currently contained in the data buffer is less than the first buffer duration threshold, the data frames in the data buffer are transmitted to the destination device at the original transmission rate.
11. The method according to claim 9 or 10, wherein the data jitter information comprises a frame rate variance or a frame rate standard deviation; The step of setting the first buffering duration threshold and the second buffering duration threshold of the data buffer according to the data jitter information includes: Determining the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or determining the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value; Determining the first buffering time threshold of the data buffer according to the product of the adjustment coefficient and the first configuration time; The second buffering time length threshold of the data buffer is determined according to the product of the adjustment coefficient and the second configured time length, wherein the second configured time length is less than the first configured time length.
12. The method according to claim 9 or 10, wherein the data jitter information comprises an inter-frame spacing distribution function, wherein: The inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability; The step of setting the first buffering duration threshold and the second buffering duration threshold of the data buffer according to the data jitter information includes: Determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function; Determine the first buffering time of the data buffer according to the product of the interval time and the first configuration coefficient Threshold value; The second buffering time threshold of the data buffer is determined according to the product of the interval time and a second configuration coefficient, wherein the second configuration coefficient is smaller than the first configuration coefficient.
13. The method according to claim 9 or 10, wherein the data jitter information comprises a frame rate variance or a frame rate standard deviation, and the data jitter information comprises an inter-frame spacing distribution function, wherein: The inter-frame interval distribution function is used to describe the relationship between the inter-frame interval and the confidence probability; The step of setting the first buffering duration threshold and the second buffering duration threshold of the data buffer according to the data jitter information includes: Determining the adjustment coefficient according to the ratio between the frame rate variance and the first preset parameter value, or determining the adjustment coefficient according to the ratio between the frame rate standard deviation and the second preset parameter value; Determining a first upper limit value according to the product of the adjustment coefficient and the first configuration duration; Determine a first lower limit value according to the product of the adjustment coefficient and a second configuration duration, wherein the second configuration duration is less than the first configuration duration; Determine the interval duration corresponding to the preset signal probability according to the inter-frame interval distribution function; Determine a second upper limit value according to the product of the interval time and the first configuration coefficient; Determine a second lower limit value according to the product of the interval duration and a second configuration coefficient, wherein the second configuration coefficient is less than the first configuration coefficient; If the first upper limit value is greater than the second upper limit value, using the first upper limit value as the first buffering time threshold of the data buffer; If the second upper limit value is greater than or equal to the first upper limit value, using the second upper limit value as the first buffering time threshold of the data buffer; If the first lower limit value is greater than the second lower limit value, using the first lower limit value as the second buffering time threshold of the data buffer; If the second lower limit value is greater than or equal to the first lower limit value, the second lower limit value is used as the second buffering time threshold of the data buffer area.
14. The method according to any one of claims 9 to 13, further comprising: Receiving a service configuration request sent by the source device, wherein the service configuration request carries a service type identifier; The determining data jitter information according to the first data frame sequence includes: If the service type identifier indicates a real-time type service, determining the data jitter information according to the first data frame sequence and a first configuration parameter set; If the service type identifier indicates a smooth type service, determining the data jitter information according to the first data frame sequence and the second configuration parameter set; The first configuration parameter set includes at least one of a first configuration duration, a second configuration duration, a first configuration coefficient, and a second configuration coefficient, and the second configuration parameter set includes at least one of a first configuration duration, a second configuration duration, a first configuration coefficient, and a second configuration coefficient; The first configuration duration included in the first configuration parameter set is shorter than the first configuration duration included in the second configuration parameter set; The second configuration duration included in the first configuration parameter set is shorter than the second configuration duration included in the second configuration parameter set; The first configuration coefficient included in the first configuration parameter set is smaller than the first configuration coefficient included in the second configuration parameter set; The second configuration coefficient included in the first configuration parameter set is smaller than the second configuration coefficient included in the second configuration parameter set.
15. The method according to any one of claims 1 to 14, wherein the receiving a first data frame sequence sent by a source device within a first time window comprises: Receiving a current data frame sent by the source device; The first data frame sequence within the first time window is acquired according to the current data frame, wherein the first data frame sequence includes the current data frame.
16. The method according to any one of claims 1 to 14, wherein the receiving source device sends a first data frame sequence within a first time window, comprising: After receiving the second data frame sequence sent by the source device in the second time window, receiving the first data frame sequence sent by the source device in the first time window, wherein: The second time window is a previous time window adjacent to the first time window, and the data frames included in the second data frame sequence are not repeated with the data frames included in the first data frame sequence.
17. A data transmission device, comprising: A receiving module, configured to receive a first data frame sequence sent by a source device within a first time window, wherein the first data frame sequence includes at least two data frames; A determination module, configured to determine data jitter information according to the first data frame sequence, wherein the data jitter information is used to describe the jitter of the data frames within a time window; The determining module is further configured to set a first buffering duration threshold of the data buffer according to the data jitter information; The transmission module is used to increase the transmission rate of the data frames in the data buffer to the destination device if the playback duration corresponding to the data frames currently contained in the data buffer is greater than or equal to the first buffer duration threshold.
18. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 16 when executing the computer program.
19. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 16.
20. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 16.
