A streaming media distribution system and method in video conferencing

By combining the MCU and SFU structures and dynamically adjusting the mode, the problem of balancing calculation and bandwidth consumption in video conferencing is solved, high-quality and low-latency media stream distribution is achieved, and is suitable for multi-person video conferencing.

CN114640653BActive Publication Date: 2024-09-27EB INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210206909.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2024-09-27
Estimated Expiration
2042-03-04

AI Technical Summary

Technical Problem

In the existing video conferencing system, in the multi-person conference scenario, the two structures of SFU and MCU have their own advantages and disadvantages, and it is difficult to find a balance in the amount of calculation and bandwidth consumption, making it difficult to satisfy the video quality and delay at the same time.

Method used

Combining the two streaming media topologies of MCU and SFU, through the mode adjustment of the business server, the mode is dynamically switched according to the average bandwidth and CPU usage, reducing the amount of mixed flow calculation and bandwidth consumption, and adapting to different user needs.

Benefits of technology

It achieves a high-performance media topology, reduces latency, saves bandwidth, meets the low latency needs of conference users and the heterogeneous video quality requirements of bystander users, and is suitable for video conferences with a large number of people.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114640653B
    Figure CN114640653B
Patent Text Reader

Abstract

A streaming media distribution system and method in a video conference, including a streaming media server, a business server and multiple user terminals, wherein an MCU device and an SFU device are deployed on the streaming media server: the SFU device forwards the media stream sent by a user terminal to other user terminals and the MCU device, and forwards the mixed media stream sent by the MCU device to all spectating user terminals; the MCU device synthesizes the media stream sent by the SFU device into a mixed media stream and sends it to the SFU device; the user terminal, when the user is a user at the conference, collects the media stream and sends it to the SFU device, and then synthesizes the media streams of other user terminals at the conference sent by the SFU device into a mixed media stream for local playback; when the user is a spectating user, the mixed media stream sent by the SFU device is received and played. The present invention belongs to the field of information technology, and can combine the SFU and the MCU based on a real audio and video conference scenario to build a high-performance media topology structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a streaming media distribution system and method in a video conference, belonging to the field of information technology. Background Art

[0002] With the popularization of mobile Internet, enterprises and individuals have an increasing demand for real-time video communication, and remote work and remote business activities at home have gradually become a popular trend. Video conferencing solutions are highly interactive, accelerate information exchange, and overcome the barriers of geographical distance. They are an important scenario in real-time video communication. Due to the complexity and instability of network conditions, transmitting high-quality and low-latency video streams has become an important challenge in video conferencing scenarios.

[0003] The QoS (Quality of Service) of the video conferencing system depends largely on the design and implementation of the server. A well-designed streaming media distribution system can reasonably utilize network resources and computing resources to provide high-quality, low-latency media streams to each user, achieving a cost-effective streaming media distribution strategy. At present, there are three main mainstream communication architectures in multi-person video conferencing scenarios, namely Mesh, SFU, and MCU:

[0004] Mesh: Each party involved in the communication establishes a two-way connection with the other parties. Each party sends data to all other users and receives data from all other users, thus forming a mesh structure. The advantages of this structure are that there is no central node, the implementation is simple, and the server resources are saved, but the disadvantages are also obvious. In a conference with N users, each user has to upload N-1 copies of data and download N-1 copies of data, which consumes a lot of bandwidth for users and can only support small-scale conferences.

[0005] MCU (MultiPoint Control Unit): This architecture has a multipoint control unit MCU as the central node. Each user only needs to send his or her own data to the MCU server and only needs to obtain one channel of fused data from the MCU server. That is, in a conference with N users, each user only needs to upload one channel of data and download one channel of data, and the server only needs to provide N channels of data download, which greatly reduces the bandwidth requirements for both users and servers. It can also use codec technology to provide media stream heterogeneity capabilities to meet the needs of more users. However, this solution requires the MCU server to encode, decode and mix all media data, which is a computationally intensive behavior and has high requirements on server performance. It is difficult to meet the low-latency experience.

[0006] SFU (Selective Forwarding Unit): In this architecture, SFU is like a media stream router, which receives the audio and video streams of the terminal and forwards them to other terminals as needed. Each user only needs to send his or her own data to the SFU server and obtain the data of all other people from the SFU server. That is, in a meeting of N users, each user only needs to upload 1 copy of data and download N-1 copies of data. This effectively reduces the user's bandwidth. Compared with the MCU mode, the server's downlink bandwidth changes from N to N*(N-1), and the bandwidth requirements for the server are greatly increased. The SFU server does not process the media stream, but directly forwards it. When participants watch multiple videos, there may be asynchrony. The same video stream may not be seen by different participants. However, this structure consumes very little server resources, and direct forwarding also reduces latency and improves real-time performance.

[0007] According to the analysis of the above three structures, the SFU structure and MCU structure with central nodes have stronger control over the entire conference and are more conducive to regulating the video quality, but these two structures have their own advantages and disadvantages: the SFU structure has low latency, but when there are a large number of participants, the server bandwidth consumption is large, which is not economical; the MCU structure consumes less bandwidth and can do more quality control, but the amount of calculation is large.

[0008] Therefore, how to combine the SFU and MCU structures based on real audio and video conferencing scenarios to build a high-performance media topology structure to provide users with higher quality media streams has become one of the technical problems that need to be urgently solved in the existing technology. Summary of the invention

[0009] In view of this, the purpose of the present invention is to provide a streaming media distribution system and method in video conferencing, which can combine the SFU and MCU structures based on a real audio and video conferencing scenario to build a high-performance media topology structure, thereby providing users with higher quality media streams.

[0010] In order to achieve the above-mentioned object, the present invention provides a streaming media distribution system in a video conference, including a streaming media server, a service server and a plurality of user terminals. The streaming media server is deployed with an MCU device and an SFU device. When a video conference is created, the users participating in the video conference include conference users and spectating users. The users who are sharing videos are conference users, and the users who are not sharing videos are spectating users. The user terminals used by the conference users are referred to as conference user terminals, and the user terminals used by the spectating users are referred to as spectating user terminals. In particular:

[0011] The SFU device is used to forward the media stream sent by each participating user terminal in the video conference to all other participating user terminals and the MCU device, and forward the mixed media stream sent by the MCU device to all the observing user terminals in the video conference;

[0012] The MCU device is used to encode, decode and mix all media streams sent by the SFU device to synthesize a mixed media stream, and then send the synthesized mixed media stream to the SFU device;

[0013] When the user is a user, the user terminal collects its own media stream and sends it to the SFU device, then encodes, decodes and mixes all other media streams forwarded by the SFU device to synthesize a mixed media stream for local playback; when the user is a spectator, it receives and plays the mixed media stream sent by the SFU device.

[0014] The business server further includes:

[0015] The mode control device, when detecting that all users in the video conference are on-site users, sends a notification message to the SFU device and the MCU device, and then calculates the mode adjustment parameter according to the average bandwidth occupancy b and the average CPU occupancy c returned by the SFU device and the MCU device: Wherein, n is the number of user terminals of the current video conference, and the SFU device is notified accordingly: when the mode adjustment parameter is greater than 1, the SFU device is notified to adopt the MCU mode; when the mode adjustment parameter is less than 1, the SFU device is notified to adopt the SFU mode.

[0016] The SFU device further comprises:

[0017] The mode adjustment unit calculates the average bandwidth occupancy rate b of its own process within a period of time according to the notification message sent by the service server, and returns it to the service server. Then, according to the notification message of the service server, it executes the corresponding mode: if it is the MCU mode, the media stream received from each user terminal is forwarded to the MCU device, and then the mixed media stream sent by the MCU device is sent to all user terminals in the video conference; if it is the SFU mode, the media stream received from each user terminal is forwarded to other user terminals in the video conference.

[0018] The MCU device also calculates the average CPU occupancy rate c of its own process over a period of time according to the notification message sent by the business server.

[0019] In order to achieve the above-mentioned object, the present invention also provides a streaming media distribution method in a video conference, including a streaming media server, a service server and a plurality of user terminals, wherein an MCU device and an SFU device are deployed on the streaming media server, and when a video conference is created, users participating in the video conference include conference users and spectating users, users who are sharing videos are conference users, and users who are not sharing videos are spectating users, user terminals used by conference users are referred to as conference user terminals, and user terminals used by spectating users are referred to as spectating user terminals, and further comprising:

[0020] Step 1: Each user terminal in the video conference collects its own media stream and sends it to the SFU device;

[0021] Step 2: The SFU device forwards the media stream sent by each user terminal in the conference to all other user terminals and MCU devices in the video conference;

[0022] Step 3: Each user terminal and MCU device encodes, decodes and mixes all media streams sent by the SFU device to synthesize a mixed media stream. Then, each user terminal plays its own synthesized mixed media stream locally, and the MCU device sends the synthesized mixed media stream to the SFU device.

[0023] Step 4: The SFU device forwards the mixed media stream sent by the MCU device to all the spectator user terminals in the video conference. The spectator user terminals receive and play the mixed media stream sent by the SFU device.

[0024] Also included are:

[0025] Step A1: When the service server detects that all users in the video conference are meeting users, it sends a notification message to the SFU device and the MCU device;

[0026] Step A2: The SFU device and the MCU device respectively calculate the average bandwidth occupancy rate b and the average CPU occupancy rate c of their own processes over a period of time, and return them to the service server;

[0027] Step A3: Business server calculation mode adjustment parameters: Wherein, n is the number of user terminals of the current video conference, and the SFU device is notified accordingly: when the mode adjustment parameter is greater than 1, the SFU device is notified to adopt the MCU mode; when the mode adjustment parameter is less than 1, the SFU device is notified to adopt the SFU mode;

[0028] Step A4, the SFU device executes the corresponding mode according to the notification message of the business server: if it is MCU mode, the media stream received from each user terminal is forwarded to the MCU device, and then the mixed media stream sent by the MCU device is sent to all user terminals in the video conference; if it is SFU mode, the media stream received from each user terminal is forwarded to other user terminals in the video conference.

[0029] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention combines the two streaming media topologies of MCU and SFU to construct a high-performance new streaming media topology, which not only reduces the amount of calculation for mixing in the MCU mode, but also reduces the large amount of bandwidth consumption in the SFU mode, and at the same time meets the needs of "users on the meeting" (users who are communicating with media streams) for low latency and "spectating users" (users who turn off microphones and video sharing and are watching) for heterogeneous video quality in video conferencing, that is, the media topology is optimized from multiple aspects such as the amount of calculation, bandwidth consumption, low latency, and controllable video quality, so as to save bandwidth as much as possible. , reduce latency, reduce computing power, meet the needs of different users, and are especially suitable for video conferencing with a large number of people; due to the complexity and variability of the network and the diversity of video content, heuristic methods are usually unable to cope with all combinations of complex scenarios and emergencies. The present invention adopts a deep reinforcement learning method to select future video bitrates by observing network status and past video frame content. Compared with most bitrate adaptation methods that only refer to network conditions for the purpose of providing high video bitrates, the present invention not only considers network conditions but also video content when making decisions, thereby obtaining higher video quality at a lower sending rate, effectively reducing the waste of bandwidth resources due to the marginal diminishing effect of bitrate. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 The present invention is a schematic diagram of the composition structure of a streaming media distribution system in a video conference.

[0031] Figure 2 It is a schematic diagram of the composition structure of a video conferencing embodiment of the present invention.

[0032] Figure 3 The present invention is a flow chart of a method for distributing streaming media in a video conference. DETAILED DESCRIPTION

[0033] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings.

[0034] like Figure 1As shown, the present invention provides a streaming media distribution system in a video conference, including a streaming media server, a service server and a plurality of user terminals. The streaming media server is deployed with an MCU device and an SFU device. When a video conference is created, the users participating in the video conference include conference users and observer users. The users who are sharing videos are conference users, and the users who are not sharing videos are observer users. The user terminals used by conference users are referred to as conference user terminals, and the user terminals used by observer users are referred to as observer user terminals. In particular:

[0035] Business server, used to process business information of video conference;

[0036] The SFU device is used to forward the media stream sent by each participating user terminal in the video conference to all other participating user terminals and the MCU device, and forward the mixed media stream sent by the MCU device to all the observing user terminals in the video conference;

[0037] The MCU device is used to encode, decode and mix all media streams sent by the SFU device to synthesize a mixed media stream, and then send the synthesized mixed media stream to the SFU device;

[0038] The user terminal, when the user is a user on the Internet, collects its own media stream and sends it to the SFU device, then encodes, decodes and mixes the media streams of all other user terminals forwarded by the SFU device to synthesize a mixed media stream for local playback; when the user is a spectator user, it receives and plays the mixed media stream sent by the SFU device.

[0039] In a real audio and video conference, most people turn off their microphones and cameras, and only a few people who are speaking or preparing to speak turn on their microphones and cameras. That is to say, the needs of users at the meeting and bystanders are slightly different. Users at the meeting will communicate with each other, so they have higher requirements for real-time performance, while bystanders have higher requirements for the quality of the received media. In view of the different needs of these two types of users, the SFU device in the present invention is used to forward media streams and does not process the media streams. The MCU device is used to process media streams and merge multiple media streams into one media stream. A websocket connection is established between the user terminal and the service server for communication, including user login registration, service management of the conference room, etc., which are all transmitted through websocket messages. An RTP / RTCP connection is established between the user terminal and the SFU device to transmit audio streams and video streams. An RTP / RTCP connection is also established between the SFU device and the MCU device to communicate. HTTP is used to transmit service messages between the service server and the SFU device and the MCU device.

[0040] In the RTP / RTCP connection established between the MCU device and the SFU device, and between the user terminal and the SFU device, two adjacent ports can be used to monitor the RTP media stream and the RTCP control information stream respectively. For example, the ports used by the SFU device to monitor the user terminal are ports 52304 and 52305. Port 52304 is used to receive the RTP media stream from the user terminal, and port 52305 is used to receive the RTCP control information stream from the user terminal. The control information may include the network conditions between the SFU device and the user terminal, such as real-time bandwidth, packet loss rate, delay and other information.

[0041] Figure 2 An embodiment of a video conference using the present invention is shown. Figure 2 As shown, the participating user terminals in this video conference include C1-3, and the observing user terminals include C4-6. C1, C2, and C3 send the video data S1, S2, and S3 they have collected to the SFU device. The SFU device forwards the video data S1, S2, and S3 to the MCU device for mixing, and also forwards the video data to other participating user terminals, such as forwarding S2 and S3 to C1, and the video data S123 mixed by the MCU device is forwarded by the SFU device to all the observing user devices C4-6. In this way, the observing user terminals receive the video S123 of all participating users mixed by the MCU device, while the participating user terminals receive all other video data through the SFU device and mix them locally, thereby obtaining the video of other participating users without their own video. Figure 2 In the video conference scenario of six people (three at the meeting and three bystanders) shown in the figure, compared with the pure SFU structure, the downlink data flow of the SFU device of the present invention is reduced from 15 to 9, and the bandwidth of the server is reduced by 40%; compared with the pure MCU structure, the number of mixed streams of the MCU device of the present invention is reduced from 4 to 1, reducing the amount of calculation by 75%; the users at the meeting directly obtain the unprocessed video stream, and low latency is guaranteed. At the same time, the MCU device is more easily used to control the quality of the mixed video stream obtained by each bystander. The media topology structure of the present invention has been optimized in terms of computational complexity, bandwidth consumption, low latency, and controllable video quality.

[0042] The present invention can also deploy multiple streaming media servers at the same time to achieve distributed deployment based on load balancing, and deploy SFU devices and MCU devices that cooperate with each other on each streaming media server. That is to say, the number of nodes deployed by the SFU device and the MCU device is the same. When creating a video conference, the SFU device nodes are allocated according to load balancing, and the MCU device nodes that cooperate with them are determined.

[0043] When all users in the video conference are on-site users, since there are no onlookers at this time, a pure SFU mode or a pure MCU mode can be adopted: in the pure SFU mode, the MCU device stops the mixed stream calculation, and all user terminals obtain the media streams of all other on-site users; in the pure MCU mode, each user terminal obtains a mixed stream that does not contain its own media stream, which means that the MCU device must perform a mixed stream for each user. The present invention can have an automatic mode adjustment mechanism, that is, according to the bandwidth occupancy of the current SFU device and the computing amount occupancy of the MCU device, the pure SFU or MCU mode is automatically selected. The mode selection is imperceptible to the user, but it can effectively optimize the computing cost and bandwidth cost of the server, and improve the user's picture quality and reduce delays. In this way, the service server further includes:

[0044] The mode control device, when detecting that all users in the video conference are on-site users, sends a notification message to the SFU device and the MCU device, and then calculates the mode adjustment parameter according to the average bandwidth occupancy b and the average CPU occupancy c returned by the SFU device and the MCU device: Where n is the number of user terminals in the current video conference, and the SFU device is notified accordingly: when the mode adjustment parameter is greater than 1, it means that the current bandwidth consumption is large and bandwidth resources are scarce, and the SFU device is notified to adopt the MCU mode; when the mode adjustment parameter is less than 1, it means that the current CPU computing consumption is large and computing resources are scarce, and the SFU device is notified to adopt the SFU mode.

[0045] The SFU device further comprises:

[0046] The mode adjustment unit calculates the average bandwidth occupancy rate b of its own process within a period of time according to the notification message sent by the service server, and returns it to the service server. Then, according to the notification message of the service server, it executes the corresponding mode: if it is the MCU mode, the media stream received from each user terminal is forwarded to the MCU device, and then the mixed media stream sent by the MCU device is sent to all user terminals in the video conference; if it is the SFU mode, the media stream received from each user terminal is forwarded to other user terminals in the video conference.

[0047] The MCU device also calculates the average CPU occupancy rate c of its own process over a period of time according to the notification message sent by the business server.

[0048] Adaptive bitrate is a method of automatically adapting to the capacity and performance of the network by dynamically adjusting the bitrate of the video stream to provide the best possible video quality to end users. This has become a popular solution for providing users with high-quality videos. The main adaptive bitrate methods can be divided into four categories: client buffer-based, network throughput (network rate)-based, model-based, and reinforcement learning-based. The strategies of these algorithms are to choose the highest possible bitrate when network conditions permit. However, the bitrate has a marginal diminishing effect, that is, as the video bitrate increases, the growth rate of video quality decreases, and the improvement of encoding technology cannot solve this problem. This strategy of choosing the highest possible bitrate will waste network resources and encoding computing resources, and ignore the impact of video content characteristics on video quality. If a video consists of dark scenes or few objects, a lower bitrate can also provide satisfactory video and save bandwidth resources. Based on the above factors, the present invention can also adopt a deep reinforcement learning method to select the future bit rate, that is, to select the future video bit rate by observing the network status and the past video frame content, so as to dynamically and adaptively adjust the bit rate according to the video content, and effectively reduce the unnecessary bandwidth consumption caused by the marginal decreasing effect of the bit rate on the basis of improving the video quality. If the original picture is directly input as the input of the state, the state space will lead to a "state explosion". In order to overcome this technical problem, the present invention divides the reinforcement learning model into two feasible and useful models: one is a video quality prediction model based on deep learning, and the other is a bit rate decision model based on reinforcement learning. The first model is used to help the second model learn the relationship between video bit rate and video quality under different video contents. In this way, the user terminal or SFU device can further include:

[0049] The video quality prediction model construction unit constructs and trains a video quality prediction model, wherein the video quality prediction model is used to predict the average video quality of the next time period based on the video frames in each time period, wherein the input is a number of video frames in a time period, and the output is the predicted average video quality score corresponding to different bit rates in the next time period. The video quality prediction model is composed of a CNN (Convolutional Neural Network) for extracting spatial features of the picture and an RNN (Recurrent Neural Network) for extracting temporal features. The CNN outputs the time series data of a video frame. The time memory characteristics of the RNN can effectively predict the future video quality. The processing flow of the input video frame is as follows: first, the video frame is input to the CNN to output a video frame sequence feature, and then the video frame sequence feature output by the CNN is further input to the RNN. The output of the RNN is the output value of the video quality prediction model. Among them, the CNN includes 5 layers, which are: a convolution layer containing 64 5*5 convolution kernels and a 3×3 average pooling layer, another convolution layer containing 64 3*3 convolution kernels and a 3×3 average pooling layer, and finally a 2×2 maximum pooling layer. The RNN includes 2 GRU (Gated Recurrent Unit) layers with 64 hidden units. The output of the video quality prediction model is a vector, which can be pre-set to multiple different bit rates such as 300, 500, 800, 1100, and 1400. Each value in the output vector represents the average video quality score value predicted for each bit rate.

[0050] The bit rate decision model building unit uses the A3C algorithm to build and train the bit rate decision model. The bit rate decision model is used to select the bit rate of the next time period according to the status of each time period (including network conditions, video content and video quality, etc.), so as to provide the best video quality without wasting resources. Its input is the state space of a time period: S t =(p t-1 ,v t ,s t-1 ,d t-1 ,l t-1 ), the output is the predicted selection probability of different bit rates in the next time period, where S t represents the state space of the tth time period, p t-1 represents the average video quality score of the videos sent in the t-1th time period before the tth time period, v t represents the average video quality score prediction value in the tth time period, s t-1 represents the sending bit rate of the video stream in the t-1th time period, d t-1represents the delay gradient of the sender and the receiver in the t-1th time period, l t-1 represents the packet loss rate of the video frame sequence in the t-1th time period, p t-1 、v t The value of can be the prediction result of the video quality prediction model for the t-1th and tth time periods, s t-1 The value of can be the prediction result of the bit rate decision model for the t-1th time period, d t-1 , l t-1 The value of can be obtained from the RTCP control information exchanged between the sender and the receiver;

[0051] The adaptive bit rate unit selects the bit rate of the next time period for the sender and receiver of the media stream by using the trained video quality prediction model and bit rate decision model when the device to which it belongs sends the media stream to other devices (i.e., the user terminal to the SFU device, or the SFU device to each observing user terminal): the video frames received by the device to which it belongs (i.e., the user terminal or the SFU device) in each time period are input into the video quality prediction model, the output result of the video quality prediction model corresponding to each time period is obtained and saved, and then the RTCP control information of the sender and the receiver in the previous time period, the output results of the video quality prediction model in the previous time period and the current time period, and the output result of the bit rate decision model in the previous time period are extracted to construct a state space for each time period, and the constructed state space for each time period is input into the bit rate decision model, thereby obtaining the output result of the bit rate decision model corresponding to each time period, and selecting the bit rate with the largest selection probability, and sending the media stream to the receiver at the selected bit rate in the next time period.

[0052] like Figure 3 As shown, the present invention provides a streaming media distribution method in a video conference, including a streaming media server, a service server and a plurality of user terminals, wherein an MCU device and an SFU device are deployed on the streaming media server, and when a video conference is created, users participating in the video conference include conference users and observer users, users who are sharing videos are conference users, and users who are not sharing videos are observer users, user terminals used by conference users are referred to as conference user terminals, and user terminals used by observer users are referred to as observer user terminals, and further comprising:

[0053] Step 1: Each user terminal in the video conference collects its own media stream and sends it to the SFU device;

[0054] Step 2: The SFU device forwards the media stream sent by each user terminal in the conference to all other user terminals and MCU devices in the video conference;

[0055] Step 3: Each user terminal and MCU device encodes, decodes and mixes all media streams sent by the SFU device to synthesize a mixed media stream. Then, each user terminal plays its own synthesized mixed media stream locally, and the MCU device sends the synthesized mixed media stream to the SFU device.

[0056] Step 4: The SFU device forwards the mixed media stream sent by the MCU device to all the spectator user terminals in the video conference, and the spectator user terminals receive and play the mixed media stream sent by the SFU device.

[0057] The present invention can also deploy multiple streaming media servers at the same time to achieve distributed deployment based on load balancing, and deploy SFU devices and MCU devices that cooperate with each other on each streaming media server. That is to say, the number of nodes deployed by the SFU device and the MCU device is the same. When creating a video conference, the SFU device nodes are allocated according to load balancing, and the MCU device nodes that cooperate with them are determined.

[0058] When all users in the video conference are on-site users, since there are no onlookers at this time, a pure SFU mode or a pure MCU mode can be adopted: in the pure SFU mode, the MCU device stops the mixed stream calculation, and all user terminals obtain the media streams of all other on-site users; in the pure MCU mode, each user terminal obtains a mixed stream that does not contain its own media stream, which means that the MCU device must perform a mixed stream for each user. The present invention can have an automatic mode adjustment mechanism, that is, according to the bandwidth occupancy of the current SFU device and the computing amount occupancy of the MCU device, the pure SFU or MCU mode is automatically selected. The mode selection is imperceptible to the user, but it can effectively optimize the computing cost and bandwidth cost of the server, and improve the user's picture quality and reduce delays. The present invention can also include:

[0059] Step A1: When the service server detects that all users in the video conference are meeting users, it sends a notification message to the SFU device and the MCU device;

[0060] Step A2: The SFU device and the MCU device respectively calculate the average bandwidth occupancy rate b and the average CPU occupancy rate c of their own processes over a period of time, and return them to the service server;

[0061] Step A3: Business server calculation mode adjustment parameters: Where n is the number of user terminals in the current video conference, and the SFU device is notified accordingly: when the mode adjustment parameter is greater than 1, it means that the current bandwidth consumption is large and bandwidth resources are scarce, and the SFU device is notified to adopt the MCU mode; when the mode adjustment parameter is less than 1, it means that the current CPU computing consumption is large and computing resources are scarce, and the SFU device is notified to adopt the SFU mode;

[0062] Step A4, the SFU device executes the corresponding mode according to the notification message of the business server: if it is MCU mode, the media stream received from each user terminal is forwarded to the MCU device, and then the mixed media stream sent by the MCU device is sent to all user terminals in the video conference; if it is SFU mode, the media stream received from each user terminal is forwarded to other user terminals in the video conference.

[0063] The present invention can also use a deep reinforcement learning method to select the future bit rate, that is, to select the future video bit rate by observing the network status and the past video frame content, so as to dynamically and adaptively adjust the bit rate according to the video content, and effectively reduce the unnecessary bandwidth consumption caused by the marginal decreasing effect of the bit rate on the basis of improving the video quality. The user terminal or SFU device can further include a video quality prediction model and a bit rate decision model, and the present invention can also include:

[0064] Step A, construct and train a video quality prediction model, the video quality prediction model is used to predict the average video quality of the next time period based on the video frames of the current time period, the input of which is a number of video frames in a time period, and the output is the predicted average video quality score corresponding to different bit rates in the next time period. The video quality prediction model is composed of a CNN for extracting image spatial features and an RNN for extracting time domain features. The CNN outputs time series data of a video frame. The time memory characteristics of the RNN can effectively predict the future video quality. The processing flow of the input video frame is as follows: first, the video frame is input to the CNN to obtain a video frame sequence feature, and then the CNN is used to extract the time domain features. The output video frame sequence features continue to be input into the RNN, and the output of the RNN is the output value of the video quality prediction model. Among them, the CNN includes 5 layers, namely: a convolution layer containing 64 5*5 convolution kernels and a 3×3 average pooling layer, another convolution layer containing 64 3*3 convolution kernels and a 3×3 average pooling layer, and finally a 2×2 maximum pooling layer. The RNN includes 2 GRU layers with 64 hidden units. The output of the video quality prediction model is a vector, which can be pre-set to multiple different bit rates such as 300, 500, 800, 1100, 1400, etc. Each value in the output vector represents the average video quality score value predicted for each bit rate;

[0065] Step B: Use the A3C algorithm to build and train a rate decision model. The rate decision model is used to select the rate of the next time period according to the state of each time period, so as to provide the best video quality without wasting resources. Its input is the state space of a time period: S t =(p t-1 ,v t ,s t-1 ,d t-1 ,l t-1 ), the output is the predicted selection probability of different bit rates in the next time period, where S t represents the state space of the tth time period, p t-1 represents the average video quality score of the videos sent in the t-1th time period before the tth time period, v t represents the average video quality score prediction value in the tth time period, s t-1 represents the sending bit rate of the video stream in the t-1th time period, d t-1 represents the delay gradient of the sender and the receiver in the t-1th time period, l t-1 represents the packet loss rate of the video frame sequence in the t-1th time period, p t-1 、v t The value of can be the prediction result of the video quality prediction model for the t-1th and tth time periods, s t-1 The value of can be the prediction result of the bit rate decision model for the t-1th time period, d t-1 , l t-1 The value of can be obtained from the RTCP control information exchanged between the sender and the receiver.

[0066] Thus, in step 1, before the attending user terminal sends the media stream to the SFU device, or in step 4, before the SFU device sends the mixed media stream to each spectating user terminal, the present invention further includes:

[0067] Through the trained video quality prediction model and bit rate decision model, the bit rate of the next time period is selected for the sender and receiver of the media stream (i.e., the user terminal and SFU device, or the SFU device and each observing user terminal): the video frames received by the device to which it belongs (i.e., the user terminal or SFU device) in each time period are input into the video quality prediction model, the output result of the video quality prediction model corresponding to each time period is obtained and saved, and then the RTCP control information of the sender and the receiver in the previous time period, the output results of the video quality prediction model in the previous time period and the current time period, and the output result of the bit rate decision model in the previous time period are extracted to construct a state space for each time period, and the constructed state space for each time period is input into the bit rate decision model, so as to obtain the output result of the bit rate decision model corresponding to each time period, and select the bit rate with the highest selection probability, and send the media stream to the receiver at the selected bit rate in the next time period.

[0068] In order to more clearly explain the implementation technology of the video quality prediction model and the bit rate decision model in the present invention, the two models will be further specifically introduced below:

[0069] (1) Video Quality Prediction Model

[0070] In order to help the rate decision model choose the appropriate encoding bit rate for the next frame, it is necessary to first let the model "know" the relationship between the bit rate and the corresponding video quality. However, this form of prediction is quite challenging because the perceived video quality is closely related to the video itself. Video type, brightness, and degree of motion all have a great impact on the correlation between bit rate and video quality. Based on the effectiveness of neural networks in predicting time series data, the present invention designs a video quality prediction model that can help the rate decision model predict the perceived video quality of future frames.

[0071] In the video quality prediction model, the present invention uses Video Multimethod Assessment Fusion (VMAF) as a measure of video quality. This method combines multiple basic quality indicators to predict subjective quality. The average video quality is used to measure the quality of the video over a period of time. The video quality of the i-th frame of the video in the time period t is denoted as V fi, , represents the video frame f i The video quality under this bit rate encoding. fi, The average value, V t,bitarate To represent the average video quality in time period t, the video quality measurement adopts the VMAF standard and is normalized. The video quality scores are distributed in [0, 1].

[0072] The present invention can use mean square error to represent the loss function: Among them, θ is the neural network parameter of the video quality prediction model, V t is the average video quality score prediction value output by the model in the tth time period, is the actual average video quality score value in the tth time period, N is the total number of time periods calculated, and γ is the adjustment coefficient of the loss function. The value of γ can be obtained based on multiple experiments. In addition, it is also considered to increase the loss function for adjustment to reduce the probability of overfitting of the training set, where λ is the adjustment coefficient.

[0073] (2) Bit rate decision model

[0074] The bitrate decision model can use the A3C (Asynchronous Advantage Actor-Critic) algorithm. Compared with the Actor-Critic algorithm, A3C proposes an asynchronous training framework that can accelerate convergence. In the reinforcement learning scenario, the agent is in a certain state S t The corresponding action will be taken t , and then you will get the corresponding reward. The goal is to choose an action that can maximize the reward. The policy network will change the parameters in this direction to achieve this goal. The policy network is trained using the policy gradient method. Among them:

[0075] 1) State space S t

[0076] The sender acts as an agent in the RL problem and observes a set of metrics, including future video quality and previous network states as the state space S t ,Then, the neural network selects an action as the output, which represents the video bitrate of the next period.

[0077] 2) Action Space A t

[0078] When the agent receives the state, it will take action according to the policy. Generally speaking, the action space is discrete, and the output of the policy network is a probability distribution f(s t ,a t ), indicating that in state s t When selecting a t The probability of this action, where the action space contains the candidate bit rate information in the next time period t. Since the state space is huge, a neural network is used to represent the strategy, and the weight of the neural network is called the strategy parameter θ.

[0079] 3) Reward function

[0080] The goal is to obtain high video quality at the lowest bit rate possible, so QoE mainly evaluates four factors: video quality, transmitted bit rate, loss rate, delay gradient, and smoothness of video switching. Compared with the original algorithm, this invention redesigns the following QoE Among them, V t 、V t-1 They represent the average video quality score prediction values ​​output by the video quality prediction model in the tth and t-1th time periods, respectively. t represents the code rate selected by the sender in the tth time period, D t represents the delay gradient measured by the receiver in the tth time period, L t represents the packet loss rate of the receiver in the tth time period, T represents the number of time periods for calculation, |V t -V t-1 | represents the smoothness of video quality, and α, β, δ, and γ represent the weights of different indicators.

[0081] 4) Network model for bit rate decision

[0082] The output of the Actor network is a 5-dimensional vector with softmax activation, while the final output of the Critic network is a linear value without activation function, which evaluates the decision of the Actor network. The two networks use the same network structure, both of which extract state features through a three-layer neural network and use a fully connected method to perform multi-dimensional feature vector fusion processing.

[0083] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A streaming media distribution system in a video conference, characterized in that: It includes a streaming media server, a business server and multiple user terminals. The streaming media server is deployed with an MCU device and an SFU device. When a video conference is created, the users participating in the video conference include conference users and observer users. Users who are sharing videos are conference users, and users who are not sharing videos are observer users. The user terminals used by conference users are referred to as conference user terminals, and the user terminals used by observer users are referred to as observer user terminals. Among them: The SFU device is used to forward the media stream sent by each participating user terminal in the video conference to all other participating user terminals and the MCU device, and forward the mixed media stream sent by the MCU device to all the observing user terminals in the video conference; The MCU device is used to encode, decode and mix all media streams sent by the SFU device to synthesize a mixed media stream, and then send the synthesized mixed media stream to the SFU device; When the user is a user, the user terminal collects its own media stream and sends it to the SFU device, then encodes, decodes and mixes all other media streams forwarded by the SFU device to synthesize a mixed media stream for local playback; when the user is a spectator, it receives and plays the mixed media stream sent by the SFU device. The business server further includes: The mode control device, when detecting that all users in the video conference are on-site users, sends a notification message to the SFU device and the MCU device, and then calculates the mode adjustment parameter according to the average bandwidth occupancy b and the average CPU occupancy c returned by the SFU device and the MCU device: Wherein, n is the number of user terminals of the current video conference, and the SFU device is notified accordingly: when the mode adjustment parameter is greater than 1, the SFU device is notified to adopt the MCU mode; when the mode adjustment parameter is less than 1, the SFU device is notified to adopt the SFU mode. The SFU device further includes: The mode adjustment unit calculates the average bandwidth occupancy rate b of its own process within a period of time according to the notification message sent by the service server, and returns it to the service server. Then, according to the notification message of the service server, it executes the corresponding mode: if it is the MCU mode, the media stream received from each user terminal is forwarded to the MCU device, and then the mixed media stream sent by the MCU device is sent to all user terminals in the video conference; if it is the SFU mode, the media stream received from each user terminal is forwarded to other user terminals in the video conference. The MCU device also calculates the average CPU occupancy rate c of its own process over a period of time according to the notification message sent by the business server.

2. The system according to claim 1, characterized in that According to load balancing, multiple streaming media servers are deployed simultaneously to achieve distributed deployment, and an SFU device and an MCU device are deployed on each streaming media server.

3. The system according to claim 1, characterized in that The user terminal or SFU device contains: A video quality prediction model construction unit is used to construct and train a video quality prediction model. The video quality prediction model is used to predict the average video quality of the next time period based on the video frames in each time period. The input of the video quality prediction model is a number of video frames in a time period, and the output is the predicted average video quality score values ​​corresponding to different bit rates in the next time period. The video quality prediction model is composed of a CNN for extracting image spatial features and an RNN for extracting time domain features. The processing flow of the input video frame is as follows: first, the video frame is input to the CNN to obtain a video frame sequence feature by output, and then the video frame sequence feature output by the CNN is continuously input to the RNN. The output of the RNN is the output value of the video quality prediction model. The rate decision model building unit uses the A3C algorithm to build and train the rate decision model. The rate decision model is used to select the rate of the next time period according to the state of each time period. Its input is the state space of a time period: S t =(p t-1 ,v t ,s t-1 ,d t-1 ,l t-1 ), the output is the predicted selection probability of different bit rates in the next time period, where S t represents the state space of the tth time period, p t-1 represents the average video quality score of the videos sent in the t-1th time period before the tth time period, v t represents the average video quality score prediction value in the tth time period, s t-1 represents the sending bit rate of the video stream in the t-1th time period, d t-1 represents the delay gradient of the sender and the receiver in the t-1th time period, l t-1 represents the packet loss rate of the video frame sequence in the t-1th time period, p t-1 、v t The value of is the prediction result of the video quality prediction model for the t-1th and tth time periods, s t-1 The value of is the prediction result of the bit rate decision model for the t-1th time period, d t-1 , l t-1 The value of is obtained from the RTCP control information exchanged between the sender and the receiver; The adaptive bitrate unit selects the bitrate for the next time period for the sender and receiver of the media stream through the trained video quality prediction model and bitrate decision model when the device to which it belongs sends the media stream to other devices: the video frames received by the device to which it belongs in each time period are input into the video quality prediction model, the output result of the video quality prediction model corresponding to each time period is obtained and saved, and then the RTCP control information of the sender and receiver in the previous time period, the output results of the video quality prediction model in the previous time period and the current time period, and the output result of the bitrate decision model in the previous time period are extracted to construct a state space for each time period, and the constructed state space for each time period is input into the bitrate decision model, thereby obtaining the output result of the bitrate decision model corresponding to each time period, and selecting the bitrate with the highest selection probability, and sending the media stream to the receiver at the selected bitrate in the next time period.

4. The system according to claim 3, characterized in that In the video quality prediction model, CNN includes 5 layers, namely: a convolution layer containing 64 5*5 convolution kernels and a 3×3 average pooling layer, another convolution layer containing 64 3*3 convolution kernels and a 3×3 average pooling layer, and finally a 2×2 maximum pooling layer; RNN includes 2 GRU layers with 64 hidden units; and the mean square error is used to express the loss function: Among them, θ is the neural network parameter of the video quality prediction model, V t is the average video quality score prediction value output by the model in the tth time period, is the actual average video quality score value in the t-th time period, N is the total number of time periods calculated, γ is the adjustment coefficient of the loss function, and in addition, the loss function is increased for adjustment, where λ is the adjustment coefficient, In the bitrate decision model, the reward function QoE is designed as follows: Among them, V t 、V t-1 They represent the average video quality score prediction values ​​output by the video quality prediction model in the tth and t-1th time periods, respectively. t represents the code rate selected by the sender in the tth time period, D t represents the delay gradient measured by the receiver in the tth time period, L t represents the packet loss rate of the receiver in the tth time period, T represents the number of time periods for calculation, |V t -V t-1 | represents the smoothness of video quality, α, β, δ, and γ represent the weights of measuring different indicators; and both the Actor network and the Critic network extract state features through a three-layer neural network and use a fully connected approach to perform multi-dimensional feature vector fusion processing.

5. A method for distributing streaming media in a video conference, characterized in that: The system includes a streaming media server, a business server and multiple user terminals. The streaming media server is deployed with an MCU device and an SFU device. When a video conference is created, the users participating in the video conference include conference users and observer users. Users who are sharing videos are conference users, and users who are not sharing videos are observer users. The user terminals used by conference users are referred to as conference user terminals, and the user terminals used by observer users are referred to as observer user terminals. The system also includes: Step 1: Each user terminal in the video conference collects its own media stream and sends it to the SFU device; Step 2: The SFU device forwards the media stream sent by each user terminal in the conference to all other user terminals and MCU devices in the video conference; Step 3: Each user terminal and MCU device encodes, decodes and mixes all media streams sent by the SFU device to synthesize a mixed media stream. Then, each user terminal plays its own synthesized mixed media stream locally, and the MCU device sends the synthesized mixed media stream to the SFU device. Step 4: The SFU device forwards the mixed media stream sent by the MCU device to all the spectator user terminals in the video conference. The spectator user terminals receive and play the mixed media stream sent by the SFU device. Also included are: Step A1: When the service server detects that all users in the video conference are meeting users, it sends a notification message to the SFU device and the MCU device; Step A2: The SFU device and the MCU device respectively calculate the average bandwidth occupancy rate b and the average CPU occupancy rate c of their own processes over a period of time, and return them to the service server; Step A3: Business server calculation mode adjustment parameters: Wherein, n is the number of user terminals of the current video conference, and the SFU device is notified accordingly: when the mode adjustment parameter is greater than 1, the SFU device is notified to adopt the MCU mode; when the mode adjustment parameter is less than 1, the SFU device is notified to adopt the SFU mode; Step A4, the SFU device executes the corresponding mode according to the notification message of the business server: if it is MCU mode, the media stream received from each user terminal is forwarded to the MCU device, and then the mixed media stream sent by the MCU device is sent to all user terminals in the video conference; if it is SFU mode, the media stream received from each user terminal is forwarded to other user terminals in the video conference.

6. The method according to claim 5, characterized in that According to load balancing, multiple streaming media servers are deployed simultaneously to achieve distributed deployment, and an SFU device and an MCU device are deployed on each streaming media server.

7. The method according to claim 5, characterized in that The user terminal or SFU device includes a video quality prediction model and a bit rate decision model, including: Step A, construct and train a video quality prediction model, the video quality prediction model is used to predict the average video quality of the next time period based on the video frames of the current time period, the input of the video quality prediction model is a number of video frames in a time period, and the output is the predicted average video quality score values ​​corresponding to different bit rates in the next time period, the video quality prediction model is composed of a CNN for extracting image spatial features and an RNN for extracting time domain features, and the processing flow of the input video frame is as follows: first, the video frame is input to the CNN to output a video frame sequence feature, and then the video frame sequence feature output by the CNN is continuously input to the RNN, and the output of the RNN is the output value of the video quality prediction model; Step B: Use the A3C algorithm to build and train a rate decision model, which is used to select the rate of the next time period according to the state of the current time period. Its input is the state space of a time period: S t =(p t-1 ,v t ,s t-1 ,d t-1 ,l t-1 ), the output is the predicted selection probability of different bit rates in the next time period, where S t represents the state space of the tth time period, p t-1 represents the average video quality score of the videos sent in the t-1th time period before the tth time period, v t represents the average video quality score prediction value in the tth time period, s t-1 represents the sending bit rate of the video stream in the t-1th time period, d t-1 represents the delay gradient of the sender and the receiver in the t-1th time period, l t-1 represents the packet loss rate of the video frame sequence in the t-1th time period, p t-1 、v t The value of is the prediction result of the video quality prediction model for the t-1th and tth time periods, s t-1 The value of is the prediction result of the bit rate decision model for the t-1th time period, d t-1 , l t-1 The value of is obtained from the RTCP control information exchanged between the sender and the receiver. Before the attending user terminal sends the media stream to the SFU device in step 1, or before the SFU device sends the mixed media stream to each spectating user terminal in step 4, the following steps are also included: Through the trained video quality prediction model and bit rate decision model, the bit rate of the next time period is selected for the sender and receiver of the media stream: the video frames received by the device in each time period are input into the video quality prediction model, the output result of the video quality prediction model corresponding to each time period is obtained and saved, and then the RTCP control information of the sender and receiver in the previous time period, the output results of the video quality prediction model in the previous time period and the current time period, and the output result of the bit rate decision model in the previous time period are extracted to construct the state space of each time period, and the constructed state space of each time period is input into the bit rate decision model to obtain the output result of the bit rate decision model corresponding to each time period, and the bit rate with the highest selection probability is selected, and the media stream is sent to the receiver at the selected bit rate in the next time period.

8. The method according to claim 7, characterized in that In the video quality prediction model, CNN includes 5 layers, namely: a convolution layer containing 64 5*5 convolution kernels and a 3×3 average pooling layer, another convolution layer containing 64 3*3 convolution kernels and a 3×3 average pooling layer, and finally a 2×2 maximum pooling layer; RNN includes 2 GRU layers with 64 hidden units; and the mean square error is used to express the loss function: Among them, θ is the neural network parameter of the video quality prediction model, V t is the average video quality score prediction value output by the model in the tth time period, is the actual average video quality score value in the t-th time period, N is the total number of time periods calculated, γ is the adjustment coefficient of the loss function, and in addition, the loss function is increased for adjustment, where λ is the adjustment coefficient, In the bitrate decision model, the reward function QoE is designed as follows: Among them, V t 、V t-1 They represent the average video quality score prediction values ​​output by the video quality prediction model in the tth and t-1th time periods, respectively. t represents the code rate selected by the sender in the tth time period, D t represents the delay gradient measured by the receiver in the tth time period, L t represents the packet loss rate of the receiver in the tth time period, T represents the number of time periods for calculation, |V t -V t-1 | represents the smoothness of video quality, α, β, δ, and γ represent the weights of measuring different indicators; and both the Actor network and the Critic network extract state features through a three-layer neural network and use a fully connected approach to perform multi-dimensional feature vector fusion processing.