Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zhou Zhe, senior technical expert of CDN: in-depth analysis of the technical points of user experience optimization in the process of short video distribution.

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

2018 Shenzhen Yunqi Conference has come to a successful conclusion. In the special session of Feitian Technology Convergence-Elastic Computing, Network and CDN, Zhou Zhe, senior technical expert of Aliyun CDN, brought us the theme sharing of "Fast Distribution of massive short videos", leading us to introduce the overall plan from the perspective of video content capture, upload, storage and distribution, with emphasis on matters needing attention for short video acceleration and key points for user experience optimization.

The explanation is carried out from three parts: short video application scenario, Aliyun short video solution, and Aliyun's optimization of short video user experience.

Short video application scenario

Short video contains more information than pictures and text. Today, with the popularity of mobile Internet, short video applications are very extensive.

I. Community sharing scene

Users can record videos, edit special effects, upload them to the server, and share them with friends through the community.

Second, e-commerce scene

Merchants can quickly shoot and produce short films of goods and send video introductions of products to consumers, which can improve the purchase conversion rate.

Second, IM chat scene

In the process of communication, users can express their views more vividly and convey their feelings more realistically by taking short videos on demand.

III. New media scenes

Different from the traditional, single picture and text display form, short videos can quickly collect and release news and present the world with one click.

IV. Sports event scene

After integrating the short video SDK, users can shoot and edit it in real time on the spot, generate short videos with spread value, and synchronize the events across the network through sharing.

Aliyun provides a complete set of technical solutions for short video business scenarios. On the VJ side, video upload SDK and short video SDK are provided, video playback SDK is provided on the viewer side, and VOD service, OSS storage and CDN acceleration are provided on the server side.

For developers, the process of using a short video solution is as follows: first, the VJ uses the short video SDK to record, process and edit the user's video, then upload the video to the server by uploading the SDK, transcoding and video processing through the VOD service on the server, and then storing the processed video on OSS for persistent storage. When the player SDK is integrated on the player side, the player will request resources from the CDN. If there is a cache, the CDN will send the cached data to the client. If there is no data in the CDN cache, the data will be pulled from the OSS, returned to the client, and cached to the CDN. Using these technical components, developers can quickly develop short video services.

Below, we will describe the capabilities and characteristics of the solution one by one.

Video SDK in the solution, including short video, upload and playback. Short video SDK includes face mapping and advanced beauty features, which can be uploaded after users record the video. At the same time, it also provides professional filters, MV special effects, cropping and compression, and the function of adding music to popularize video clips. Uploading SDK can transmit video to the server through fast channel, supporting functions such as resuming breakpoint, background upload, multi-file management, etc. Player SDK supports Android, IOS, flash, H5 and other platforms, encrypted playback and secure download.

VOD and storage services, VOD services provide features related to video management, such as video transcoding. Narrowband HD can save 30% bandwidth in the same user experience; cloud editing can edit videos online; at the same time, VOD services provide rich data statistics, and developers use API provided by Aliyun to access real-time data.

At the same time, Aliyun has also opened AI technology in the video field, including content audit to reduce the risk of violations; intelligent cover, video structured processing and algorithm to select the best video frame as video cover; tag prediction, through AI to identify text, images, people and other information in the video, and automatically generate video tags.

Based on the huge amount of data generated by the short video service, Aliyun also provides highly reliable, strong security and low-cost storage services.

In order to meet the large-scale business needs of short videos, Aliyun CDN has built a lot of infrastructure.

First of all, Aliyun CDN has more than 1200 nodes around the world, distributed in various countries and regions around the world, close to user deployment, so that users can access video content more quickly and make the video experience better. At the same time, in order to face the sudden traffic, Aliyun provides more bandwidth reserves than 80TB to protect the growing business. Moreover, the cache capacity of a single node exceeds that of 1PB, which can improve the access speed of users by providing more cache space.

After introducing the solution, Mr. Zhou Zhe introduced some optimization techniques of Ali Yun in the field of short video.

Key metrics of short video user experience

The key indicators of short video user experience are first screen time, playback stutter and playback error.

The first screen time refers to the time difference between the time when the user clicks to play and the video starts to play during the steady playback of the video. The longer the time of the first screen, it will cause users to end the playback ahead of time.

Playing stutter refers to the unsmooth situation in the playback process, which will seriously affect the user experience.

Playback error means that the video is not played successfully when the user plays the video, or an exception causes early interruption.

Analysis of user experience Optimization

In order to solve these problems, we analyze the whole architecture.

First of all, the end user uses the video SDK provided by Aliyun to request the scheduling server, and the scheduling server returns the corresponding node IP, and then the player requests resources through the CDN node IP. The edge node of the CDN can send it to the player locally if it has no cache. If there is no cache, the secondary node will go to the OSS or the user origin server to pull the data.

Ali Cloud CDN has caching of first-level nodes and second-level nodes. The functions of second-level nodes are:

First, do resource convergence to avoid simultaneous origin-pull of the same request and reduce the pressure on the origin server.

Second, it is close to the edge node, and when the edge node is dead, the data can be obtained more quickly from the secondary node.

Third, provide more storage space and improve the hit.

At the same time, Aliyun conducts some data management related to user experience for the whole playback process, and obtains some optimization points through the analysis of these data.

The first is the player, whether the player is optimized or not determines the viewing quality of the end user. First of all, we have optimized the player SDK, for example, by reducing the first buffer time, we can start decoding and playing at the first P frame of the video, and provide dynamic cache size, which can dynamically increase the cache size and preload the data when there is network jitter, so as to reduce the stutter rate. Aiming at the playback error, the player SDK implements a network retry mechanism to provide the success rate of playback.

The second optimization is for the scheduling system, when the user visits the edge node, the user accesses the scheduling server, and whether the IP address returned by the scheduling server is the optimal network link, which greatly affects the video download speed of users. Aliyun has developed an intelligent scheduling system, which can select the optimal link from the user to the edge node to feedback to the client.

The third is that Aliyun provides a lot of network node coverage to make edge nodes closer to users to improve user access speed.

The fourth optimization point is that when users obtain data from the CDN server, when the network jitter occurs, the download speed will slow down. Aliyun CDN optimizes the TCP protocol stack and uses a more efficient protocol stack algorithm to improve the download speed.

The fifth optimization point is that developers can use the narrowband HD feature provided by Aliyun to reduce the bandwidth for playing videos.

Sixth, when users visit the edge node, if the request for MISS on the edge node will directly go back to the origin, the time will become slower, and if the edge node is hit, the download speed of the user will be strongly related to the performance of the cache server of the edge node. Aliyun has done a lot of optimization for the performance of the cache server to improve the access rate by increasing the space and intelligent optimization of the edge server.

Seventh, Aliyun also supports full-link monitoring to identify problems early, optimize targeted, and ensure stable services.

Optimization of intelligent scheduling system

The optimization of intelligent scheduling is introduced in detail here. Aliyun has optimized the scheduling system in five aspects. The first is that the accurate IP database will be continuously updated. Based on the third-party IP database data, some longitude and latitude information of whois platform and Taobao mobile phone users accessing the data, the IP database will be actively detected and calculated and generated based on the data of these dimensions. The accuracy of IP database data will provide data support for the scheduling system.

The second is to provide HTTPDNS service. When users request the scheduling server through localdns, the first problem is that there is a mismatch between the location of localdns and the user's ip. When scheduling based on localdns, the client ip seen by the scheduling system is inconsistent with the user's real ip, resulting in inaccurate scheduling.

The second problem is that when users query the dns server, the dns result will be changed in the query process. Through httpdns service, the problem of mismatch between localdns and ip addresses can be solved, and at the same time, the dns result can be prevented from being changed in series, which makes the scheduling more accurate. The player preloads the dns query based on httpdns and caches the results to reduce the slow time of the first screen caused by the dns query.

The third point is the automatic scheduling based on user experience, which is calculated based on the user's client IP, the network situation of the user to each node and the current state of each node, and predicts the optimal network link to which node the user is going to through some machine learning. This ensures that the optimal network link is returned to the user's IP address.

The fourth is the analysis of big data, choosing the best node. Through the current node coverage and user access traffic trends, data prediction, to select where to build points, and to calculate which users these nodes cover which users' network quality is the best, to provide data support for the scheduling system.

The last point is based on content scheduling, through 302 to do content granularity scheduling, scheduling the same URL to the same machine to improve the hit rate.

Cache performance optimization

Aliyun CDN has also made a lot of optimizations for the cache system.

Through the self-developed cache system, the cache system based on bare disk is developed. Using the three-level cache architecture of memory, SSD and SATA, the hottest resources are stored in memory, the secondary hot resources are stored in SSD, and the cold resources are stored in SATA, and through the way of hot migration, the hot resources in SATA are migrated to memory and SSD, and then the cold resources in memory and SSD are eliminated to SATA disk by elimination algorithm. In this way, it can provide the hit rate of memory and SSD, reduce the IO read and write of SATA disk, store more cold resources and improve the utilization of edge nodes. At the same time, the self-developed file system makes a lot of optimizations for IO operations, such as merging IP aligned writes to avoid serious degradation of IO performance caused by memory fragmentation and disk fragmentation. Large files are sliced and stored in different disks to avoid disk performance degradation caused by the overheating of a single video file.

Through the above optimization measures, the average hit rate of the cache is more than 95%, and the first byte time is lower than that of 10ms.

Optimization of TCP protocol stack based on user experience

The first optimization point is the packet loss detection mechanism based on time series, which mainly analyzes the time series of TCP packets in the TCP protocol stack, and then can identify which packets have been lost, quickly find packet loss and fast retransmission.

The second optimization point is the active packet loss discovery mechanism, which means that we actively detect packets when they are found, avoid finding lost packets through timeouts, reduce the time of packet loss discovery, and improve retransmission.

The third is an adaptive initialization window, which uses different initialization window sizes for different business scenarios.

The fourth is a more radical congestion avoidance algorithm, in view of the bad situation of the network, identify the status in the protocol stack, use a more radical packet strategy to solve the problem of slow download speed.

The fifth optimization point is to use a smaller link timeout to detect lost packets earlier.

Based on the above optimization, we use a third-party detection platform to compare the performance of 1.2m files of a short video service with that of other CDN vendors. The same file size can improve the performance of Aliyun CDN by 2% and 6% in terms of content download time. The rest of the data also performed well.

Welcome to use Aliyun VOD service, CDN and OSS storage to build short video applications.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report