Abstract: Tens of millions of people at the same time online live broadcast room, so that all people can at the same time fair to buy, and to ensure the stability of the system operation, this is a very big test. What is the technical support behind it, and what are the challenges encountered in the process? Let’s find out.
This article is shared from huawei cloud community “618 Technology Special (iii) Live tape King, behind” OMG Buy it “, why a series of technical challenges? Torchbearer of technology.
“OMG, buy it buy it!” The live broadcast room of some popular anchor is very lively. Millions of people are online at once, their right thumbs strung like arrows, waiting for the host to say, “3,2,1, link!” Order quickly.
That’s right, livestreaming has become a popular way of shopping for people who want to cut their hands off on 618 this year. By 2020, there will be 265 million e-commerce livestreaming users among 904 million Internet users in China.
Tens of millions of people are online at the same time. Once the baby link is on the shelves, it takes seconds to reach consumers. Getting everyone to see the links at the same time, buying them fairly, and making sure the system works reliably is a big test. What is the technical support behind it, and what are the challenges encountered in the process? Let’s find out.
Traditional live broadcast: card delay, hand speed is always slow one step
The timeliness and interactivity of live broadcasting make it a new medium for information access and interactive communication, maximizing the authentic offline interaction scenes between people. But is the live interaction good enough?
The whole Internet live link can be divided into 7 steps: acquisition, coding, sending, distribution, receiving, decoding and rendering. In the stage of transmission and distribution, due to a variety of uncontrollable factors such as network jitter, the delay of live broadcast is uncontrollable.
-
Online teaching, students put forward questions, due to the delay of live broadcast, the teacher has to talk about the next knowledge point before the question pops up, can only go back and reply again;
-
E-commerce live, fans ask baby information, due to live delay, obviously just heard the anchor to sell, but it is not;
-
In the live match, the goal was only found in the shouts of others…
Many live broadcasts begin cross-platform and cross-regional live broadcasts. How to achieve remote and cross-platform live broadcasts requires some technologies to push and pull streams. Pushing stream is the process of transferring the content sealed in the acquisition stage to the server. Pull stream refers to the process of pulling live broadcast content from a specified address.
Currently, RTMP is used as the push stream protocol and RTMP/HTTP-FLV is used as the pull stream protocol. The delay is about 3-5 seconds. On THE H5, the delay of more than 10 seconds is HLS system. In other words, when an anchor is holding a panic sale in the studio, every time you hear the anchor yell, “Three, two, one, link!” Several seconds had already passed during the live broadcast.
In addition to delay caused by the live broadcast protocol itself, traditional live broadcast also has delay due to architectural reasons. The technical architecture of traditional live broadcasting is divided into three layers, namely, the edge node of single-line CDN, the central node of multi-line CDN and the source station carrying some value-added services. In the whole live broadcast, from push stream to pull stream, the general scheduling system will send the anchor to the most appropriate edge node, which will receive the stream and forward to the source station of live broadcast through the central node of CDN. At this point, the audience is connected to the edge node of the pull stream through scheduling and statically returns to the source station of the live broadcast through the central node of CDN.
However, based on the overall experience, the following three points are not applicable to low-latency scenarios. First of all, the biggest consumption is in the last kilometer from the audience side to the edge of the CDN pull stream, where TCP protocol is not suitable for low delay. The second is based on the static tree distribution architecture, which is not particularly good for cost considerations. The third is the transcoding on the whole live broadcast source site. At present, there is a relatively large delay, generally around 500ms, which can not be solved with low delay.
The core technology behind “3, 2, 1 up link” : massive ultra-low latency
Traditional live broadcast technology suffers from the bottleneck between high concurrency and low delay, which hinders the implementation of live broadcast in some scenes and can no longer meet some live broadcast scenes with higher interactive requirements. The next upgrade of livestreaming industry: low delay livestreaming technology is emerging and is expected to become the new focus of livestreaming technology.
Different players realize low-delay live broadcasting in different ways. Huawei Cloud audio and video R&D department has significantly reduced the delay of traditional live broadcasting from 3-5s to less than 800ms through protocol optimization of CDN transmission, dynamic optimization of internal links, ultra-low delay transcoding and other technologies. Transcoding delay is controlled within 150ms. At the same time, ultra-low delay live broadcasting can be fully compatible with traditional live broadcasting, reducing the impact on the original technical architecture and reducing the cost of architecture optimization.
Architecture parsing
In addition to the selection of live broadcast protocol to reduce the delay, we can further reduce the live broadcast delay by optimizing the details of some architectures, so that users can have a better viewing experience.
The architecture design above achieves the forward compatibility of the original traditional live broadcast architecture and can maintain the push stream of the original RTMP protocol. Notifications for transcoding media and some functional message callbacks are seamlessly compatible on the live source. Meanwhile, on the basis of the original live broadcast protocol, H5 terminal extends the support for standard RTC protocol playback, and iOS and Android terminal supports private RTC protocol playback.
The core of huawei cloud ultra-low delay livestream technology optimization is as follows:
Firstly, the last kilometer is based on the transformation of UDP plan by TCP, and huawei cloud algorithm is introduced to reduce the delay of traditional live broadcast to within the order of milliseconds, while ensuring good loss resistance and smooth experience.
Second, the traditional tree-like static planning and scheduling architecture is changed into an intelligent dynamic network architecture, which brings that the path of distribution back to the source within CDN is dynamically planned, instead of the previous statically planned link.
Thirdly, the ultra-low delay transcoding technology is introduced to reduce the delay of the whole transcoding from the original about 500ms to the stable control within 150ms.
Intelligent dynamic mesh architecture
Why is it called intelligent dynamic mesh architecture? For example, we three people to access the path to do analysis, such as a host of shenzhen telecom users, with the original architecture, access to the shenzhen telecom near the edge of the cover node, then push to a central node, to the source, and access to the audience through an inherent static center to obtain this information. No matter how far away the user is from the audience, it will go to the edge center source station, and then down, it will need to go through the distribution of 5 layers of nodes.
And in today’s architecture, if there is an audience of shenzhen telecom user 1, through dynamic architecture will be real-time scheduling to him and anchor nodes in the same node, the access path is the host to node B, then to the audience, but is passed a, the link of the quality and cost can be very good ascension. For a user 2 of Guangxi Telecom, if he is directly scheduled to the flow push point, the whole network will be uncontrollable, and the dynamic intelligent mesh architecture will connect him to the nearest node. Because the network between B and C is relatively more reliable, the scheduling system judges that the access quality of this area is feasible. Therefore, the access path of user 2 is 2-C-B, which goes through two points. However, if the user 3 is connected to Beijing, the host and the audience are far away from each other. In this case, the nearby access may cause great damage to the quality, so the original way will be used to pull the flow to ensure the high-quality access.
Intelligent scheduling of streaming brain
The above example is the audience’s presentation of the final result of the overall anchor link, but behind it, it also depends on an intelligent scheduling system based on streaming information. The architecture of this scheduling system is based on the intelligent scheduling streaming media brain built on the source station, which is mainly composed of four core modules:
1. Content management center, can be understood as is streaming eyes, can pass report on the fringes of real-time flow information, such as some point such as anchor when online, offline message notification, accurately know each anchor online, each audience’s access, can clearly know where the flow is pushed, the entire network which node.
2. Quality map, which is used to construct the network between nodes of the whole CDN, including the real-time network status between users and nodes. By delivering some scheduling tasks to the nodes located at the edge detection Agent, the detection Agent initiates periodic detection tasks and reports the detection results to the big data center, and finally analyzes the coverage quality of the whole network in real time.
3. Scheduling controller, which grasps the basic data of the platform on which scheduling depends, such as node traffic, node planning, and some data on the user side.
4. Scheduling and decision center. The output of the first three blocks will serve as the input of the scheduling decision center. As the brain of the final scheduling, the scheduling decision center generates a network-wide scheduling policy in real time, including the scheduling policy for user access and the internal source policy between nodes, and sends the policy to the scheduling executor. At first, Huawei deployed the scheduling executer on the cloud. Later, in order to create end-to-end low latency, it sank this part to the edge nodes of CDN, and tried its best to reduce the scheduling delay between users.
Ultra low delay transcoding technology
When it comes to video low delay, we have to mention video transcoding. At present, video transcoding has become a standard feature of major live broadcast platforms. However, in order to achieve low end-to-end delay, transcoding delay needs to be further reduced due to different network conditions of end users. Huawei transcoding technology can stabilize the delay within 150ms, and the low delay transcoding technology also supports the hd low code technology. With the same picture quality, the bit rate of the player can be reduced by more than 30%, saving the bandwidth cost of the entire platform. Based on the high quality of the image, the low-latency transcoding also supports image quality enhancement and ROI enhancement, as well as precise directional optimization of the detail and texture of the image.
With the application and promotion of 5G technology, the “live +” mode is accelerating to extend to all vertical fields, and the application of online live broadcasting is growing rapidly. The traditional live broadcasting will be transformed into ultra-low delay live broadcasting this year, and will take the lead in the implementation of four industry scenes of online education, e-commerce live broadcasting, sports live broadcasting and show live broadcasting.
2021 will be the year when traditional live broadcasting will move towards ultra-low delay live broadcasting. It is estimated that 20% of Internet live broadcasting will be upgraded to ultra-low delay live broadcasting by the end of this year. In the next 2-3 years, ultra-low delay livestream will completely replace traditional livestream and eventually lead a new business model and a new round of development of the livestream industry.
Commercial innovation has promoted the vigorous growth of the e-commerce live streaming industry, and it is the tremendous energy of technology that supports these boiling point scenes and transaction miracles. I believe that under the baptism of new technology, consumer’s personal demand, consumption environment, consumption concept can be further upgraded.
Click to follow, the first time to learn about Huawei cloud fresh technology ~