【 Recommendation 】Why is it that our wallets are always empty when it comes to the big promotion? Is everyone’s self-control is not enough, or the e-commerce platform will read people’s hearts too, from the technical dimension, to find out.

Abstract:With tens of millions of people online at the same time, it is a big test for all people to buy the broadcast rooms fairly at the same time and to ensure the stability of the system. 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 the Huawei cloud community “618 technology special (3) live with the king of goods,” OMG buy it “behind, why is a series of technical challenges? The original author: Torchbearers of Technology.

“OMG, buy it buy it!” Inside the broadcast room of some popular anchor, bustle is extraordinary. With millions of people online at once, the right thumb is like a stringed arrow, waiting for the anchor to say “3,2,1, link up!” , order immediately.

Yes, this year’s 618, live with goods has become a popular form of shopping “shopaholic”. By 2020, among China’s 904 million Internet users, there will be 265 million e-commerce live streaming users.

There are dozens of millions of people online at the same time. Once the baby link is on the shelf, it takes seconds to reach consumers. Getting everyone to see the links at the same time, buying them up fairly, and making sure the system is stable is a big challenge. What is the technical support behind it, and what are the challenges encountered in the process? Let’s find out.

Traditional live broadcast: delayed, the speed of the hand is always one step behind the people

The timeliness and interactivity of live broadcast make it a new medium for information access and interactive communication, maximizing the real interaction scenes between people offline. But is the live interaction good enough?

The full link of Internet live broadcast can be divided into seven steps: acquisition, encoding, sending, distribution, receiving, decoding and rendering. However, in the transmission and distribution stage, due to a variety of uncontrollable factors such as network jitter, the delay of live broadcast is uncontrollable.

  • In the online class, students raised questions. Due to the delay of the live broadcast, the questions popped out after the teacher talked about the next knowledge point and could only be returned and replied again.
  • In e-commerce live broadcast, fans ask for baby information. Due to the delay of live broadcast, they just heard the anchor selling, but they just couldn’t get it.
  • Event live, in the shouts of others just found the goal…

Many live broadcasts begin to be broadcast across platforms and regions. How to achieve remote and cross-platform live broadcasts requires some technologies of push and pull streams. Push stream is the process of transferring the contents encapsulated in the acquisition stage to the server. Pulling stream refers to the process that the server has live broadcast content and pulls it with a specified address.

At present, RTMP is generally used as the push protocol and RTMP/HTTP-FLV as the pull protocol for live broadcast in the industry, with a delay of about 3-5 seconds. On the H5, the HLS system with a time delay of more than 10 seconds is more commonly used. In other words, every time you hear an anchor yell out “Three two one, link up!” when the anchor is having a run on the studio. In fact, several seconds had passed in the live broadcast.

In addition to the delay caused by the live broadcast protocol itself, the traditional live broadcast also has delay due to the structural reasons. The technical architecture of traditional live broadcasting is divided into three layers, namely, the single-line CDN edge node, the multi-line CDN center node 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 cut the anchors to the most appropriate edge nodes, and the edge nodes will receive the streams and then transfer them to the source stations of the live broadcast through the CDN central nodes. At this time, the audience is connected to the edge node of the pull stream through scheduling, and then it is statically returned to the source station of the live broadcast through the central node of CDN.

However, from experience, the following three points do not apply to scenarios with low latency. First, the biggest drain is on the last kilometer from the audience side to the CDN pull edge, where TCP is not suitable for low latency. The second is based on static tree distribution architecture, which is not particularly good in terms of cost. The third is transcoding on the whole live broadcast source station. At present, there is a relatively large delay, generally around 500ms, which is also unable to be solved by live broadcast with low delay.

The hard-core technology behind “links on 3, 2, 1” : massive ultra-low latency

Traditional live broadcast technology suffers from the bottleneck between high concurrency and low delay time, which hinders the landing of live broadcast in some scenes, and has been unable to meet some live broadcast scenes with higher requirements for interaction. The next upgrade of live broadcast industry: low delay live broadcast technology is rising, and is expected to become a new focus of live broadcast technology.

Ensemble, demonstrated different players live in different ways to implement low delay, huawei cloud of audio and r&d department through the CDN transmission protocol optimization and dynamic optimization of inner link, the combination of ultra low delay transcoding technology, the traditional live 3-5 s delay significantly reduced to less than 800 ms, transcoding time delay control within 150 ms. 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 choice of live broadcast protocol to reduce the delay, we can also further reduce the delay of live broadcast by optimizing some details of the architecture, so that users can have a better watching experience.

The above architecture design better achieves the forward compatibility of the original traditional broadcast architecture, and can maintain the push stream of the original RTMP protocol for anchors. On the source site of the live broadcast, the media transcoding and some function of the message callback notification can be seamlessly compatible. At the same time, on the basis of the original live broadcast protocol, the support for standard RTC protocol broadcasting is extended to H5 terminal, and private RTC protocol broadcasting is supported in iOS and Android terminal.

The core of Huawei Cloud’s ultra-low delay broadcast technology optimization includes three points:

First, the last kilometer is based on the transformation of UDP plan based on TCP, and Huawei cloud algorithm is introduced to reduce the delay of traditional live broadcasting to within the order of milliseconds, and at the same time, it can ensure 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 CDN internal distribution back to the source is dynamic planning instead of the previous static planning link.

Thirdly, ultra-low delay transcoding technology is introduced to reduce the time delay of the entire transcoding from about 500ms to 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 the distance between the user and the audience is, they will go to the edge center source station, and then go down, and 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 subscriber 2 of Guangxi Telecom, if he is directly dispatched to the point of push flow, the whole network will be uncontrollable, so 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 piece is feasible, so the access path of User 2 is 2-C-B, through two points. If the user is connected to Beijing 3, the anchor and the audience are all over the place, in this case, the damage to the quality may be relatively large to do the nearest access, or in accordance with the original way to pull the flow, to ensure high-quality access.

Intelligent Scheduling Streaming Brain

The above example is the audience’s presentation of the final result of the anchor’s overall link, but it also relies on a set of intelligent scheduling system based on stream 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 is used to construct the nodes of the entire CDN network, including the real-time status of the network between users and nodes. By sending some scheduling tasks to the node located on the edge detection Agent, the detection Agent initiates periodic detection tasks, and then reports the detection results to the big data middle station, and finally analyzes the coverage quality of the whole network in real time.
  2. Scheduling controller, which grasps the basic data of the platform on which scheduling depends, such as node traffic, node scheduling, and some data on the user side.
  3. Scheduling decision center. The output of the first three blocks will serve as the input to the scheduling decision center. The scheduling decision center, as the brain of the final scheduling, will generate a real-time scheduling strategy for the whole network, including the scheduling strategy for user access and the internal back-source strategy between nodes, and send it to the scheduling executor. At first, Huawei deployed the scheduling actuator on the cloud. Later, in order to create low end-to-end delay, Huawei sank this part to the edge node 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 function of the major broadcast platforms. However, due to the different network conditions of end users, in order to achieve low end-to-end delay, the delay of transcoding needs to be further reduced. Huawei transcoding technology can stably control the time delay within 150ms. Meanwhile, the transcoding technology with low time delay also supports high-definition and low code technology. Under the same picture quality, the code rate of the player end can be reduced by more than 30%, saving the bandwidth cost of the whole platform. Based on the demands of high quality images, low latency transcoding also supports image quality enhancement and ROI enhancement, as well as precise directional optimization of the details and textures of the picture.

With the application and promotion of 5G technology, the “live broadcasting +” mode has been extended to various vertical fields at an accelerated pace, and the application of online live broadcasting has seen a blowout growth. This year, the traditional live broadcast will be transformed into ultra-low delay live broadcast, and will take the lead in the promotion of online education, e-commerce live broadcast, event live broadcast and show live broadcast in four industry scenes.

2021 will be a turning point for traditional live streaming to ultra-low delay. By the end of this year, it is expected that 20% of Internet live streaming will be fully upgraded to ultra-low delay live streaming. In the next 2-3 years, ultra-low time delay live streaming will completely replace traditional live streaming, and eventually lead a new business model and a new round of development of the live streaming industry.

Commercial innovation has promoted the vigorous growth of the e-commerce live broadcast industry, and what supports these boiling point scenes and transaction miracles is inevitably the huge energy of technology. It is believed that under the baptism of new technology, consumers’ personal demand, consumption environment and consumption concept can be further upgraded.

Why can’t you stop buying and buying when your budget is three times over unconsciously? If you want to know why our wallets are always empty whenever we have a big promotion? Behind this is the lack of self-control, or the e-commerce platform is too good at reading people’s minds, we might as well from the technical dimension, to find out.

Why is it getting easier to grab seckill when millions of people place orders at the same time? When consumers are captured by the recommendation system of e-commerce, how do they ensure that you can buy the goods you want anytime and anywhere during the promotion period? And how can hundreds of millions of transaction data be circulated in an orderly manner to ensure that you can not only grab the goods, but also receive the goods in time? This article decrypts them all for you.

Click on the attention, the first time to understand Huawei cloud fresh technology ~