Research and Implementation of Multimedia Server Management in Distributed Multimedia Distance Education System

Multimedia distance education is the teaching mode based on computer and network, so that we can accomplish the tasks of teaching in different places or at different times. The distributed multimedia distance education system is low cost, and it can effectively overcome the limitations of time and space, and is being morewidely used. Multimedia distance education system needs to solve the key problem of how to transfer the audio and video to the destination by internet technology effectively. The multimedia distance education system needs to transmit audio and video in real time, so the transmission delay must be reduced in order to ensure the teaching and interaction between teachers and students. In this paper, we design a more advanced and efficient remote teaching system based on the node management of a distributed system. Firstly, we take the distributed multimedia technology as the key technology and an important means to facilitate the transmission of streaming media data. Then, we put forward the method of configuration management and state management in the media server cluster. Secondly, on the basis of the previous method, we put forward a method of load balancing management based on RTCP control message. Based on the design in this paper, we realize the orderly and efficient management of the media server cluster in a distributed system. Finally, we simulate the performance test of the node management in the media server cluster to validate the advantages of the node management. This design can effectively reduce the transmission delay of streaming media data.


INTRODUCTION
With the development of the Internet, streaming media is becoming more and more popular in multimedia distance education [1][2][3].Streaming media is audio or video that are transmitted through the network.The streaming media cannot download an entire file before it is played [4][5].The most apparent feature of the IP network is 'best effort delivery', which is asynchronous transfer.So there are many problems in the transmission of streaming media in IP networks, such as packet loss, delay, out of order, and so on [6][7][8].For the current situation of realtime multimedia communication, the traditional protocols such as TCP (Transfer Control Protocol) or UDP (User Datagram Protocol) are unable to meet the demand.In order to improve the reliability of the distributed multimedia distance education system [9][10][11][12], we not only need to use the appropriate transmission protocol to reduce the out-of-order rate, but also need to solve the network delay problem through appropriate mechanisms.
RTP is designed for transmission of real-time streaming media on the condition of one-to-one or one-to-more transmission, and the purpose is to achieve stream synchronization.During the RTP session, the participants transmit RTCP packets periodically.The RTCP packets contain a variety of statistical information, including the number of packets sent and the number of packets lost.Through the RTCP protocol, the information on the network can be colected and given feedback to the sender.The sender can analyze the obtained information, and adjust the sending strategy according to the analysis results.Therefore, each distributed media server can dynamically change the transmission rate, and adjust the load of each media server, thus achieving a better performance than the IP network [13][14][15].RTP and RTCP work together, and they can optimize the transmission based on effective feedback.So they are especially suitable for real-time data transmission.
Most of the current multimedia distance education systems only set up one or more media servers at the sender of the media stream.Even if there are multiple media servers that can share the transmission of streaming data, these servers do not collaborate with each other, so they are still a number of isolated individuals.and is not able to complete the real-time data transmission when there is too much data or the network quality is poor.This will seriously affect the process of teaching [16][17][18][19].
The design of this paper is based on the real demand of the system.We design a solution to manage this cluster scientifically, so that each media server can cooperate with another to choose the best path through the network of data transmission.Through this design, we guarantee the data transmission of real-time streaming media, so as to ensure the teaching and interaction between teachers and students.
As shown in Figure 1, in the distributed multimedia distance education system, the data is divided into three stages: teaching video and audio collection, real-time transmission of video and audio through the media server, and real-time playback on a PC.The video and audio signals are collected and encoded in real time, so as to form the media data, and then they are sent to the media server.These media stream packets are transmitted through the media server in the network, and the media servers cooperate with each other, so they can select the best path to send the media stream to the remote PC.At the end of the system, students can access the teaching resources.
The second stage in the process, namely data transmission through the media server, is the key stage of the whole distributed long-distance teaching system.Students can watch the live video on the platform rather than downloading the entire video.So, ensuring the continuity of the real-time transmission is the most important part of the whole process.
In the transmission of the real-time multimedia data, each media server node tracks the media stream, while at the same time, the media server receives and transmits RTP and RTCP packets.By calculating the statistical data returned by RTCP, such as the number of packets sent and packets lost, the load of each media server can be adjusted.Because all the media servers work together, the best network path for real-time media streaming can be chosen.
The main contents of this paper are as follows.The second part introduces the methods of configuration management and state management of the media server cluster.The third part introduces the solution of load balancing management based on RTCP control message.In the fourth part, we simulate the performance test of the node management in the media server cluster to validate the advantages of the node management.This design can effectively reduce the transmission delay of streaming media data.

II. CONFIGURATION MANAGEMENT AND STATE MANAGEMENT OF THE MEDIA SERVER CLUSTER
As shown in Figure 2, the media server cluster management solution is divided into three functional modules: media server configuration management, media server state management, and media server load balancing management.
In this section, we introduce the first and the second module.Media server configuration management refers to the basic configuration information of the media server, which includes IP address, sending port, receiving port, and protocol.Media server state management is responsible for monitoring real-time state of all the media server and deals with the failure nodes.
(1) The main tasks of configuration management is to manage the configuration files, to receive and send the updated configuration files, and to provide the methods of querying and modifying of configuration files.Updating the configuration file is an important function of the configuration management module.The application of the new configuration file is one of the important reasons for the change of the cluster state.
In the configuration management function, when the node cluster starts up, the master node of the cluster is selected dynamically according to the preset strategy, and the basis of the decision is obtained from the configuration file.The election strategy of the master node is deployed on all the nodes in the system.Even when the master node cannot run normally, the selection mechanism can be restarted to select a new master node.In this way, the cluster can repair itself, so the service will not be interrupted.Configuration management also includes dynamic change of the configuration, including the dynamic addition or deletion property changes of nodes.
(2) The main function of the state management is to manage the change of cluster node status.The status mainly includes node joining, node leaving and state transition.A node list is maintained within the state management module.The node list contains all nodes currently alive in the cluster.The node list provides much convenience for the maintenance of the node state.
Both the master node and the slave node need to obtain the state information of the local node.The information is obtained through the background process, and the acquisition cycle is T .The state information includes the per- formance parameters such as the I/O throughput capacity and the load of the nodes.The node maintains the realtime communication with the load balancing module, and provides timely and accurate information for the load balancing module.The collected real-time state infor- ation is input into a data structure.This information is packaged into a unified package, and it is transmitted in a packet format.The receiver uses a specific method to parse the data packet, and the information is used as the parameter of the load balancing algorithm.In order to ensure that the state information is real-time, the node state is obtained periodically, and the message is transmitted as quickly as possible, so the interval must be short.
When the normal media server is working, it may begin to malfunction at any time.Then the failed server cannot continue to transmitting data, so we have to manage the failure nodes.When the failure occurs, the other nodes must be aware of the failure node immediately.In this way, we will no longer let normal nodes distribute real-time media streaming data to the failed node.
Next, we introduce the Binary Tree, which is useful for the node state management.The Binary Tree is a tree that has a maximum of two sub-trees of each tree node, and it is an acyclic graph.We choose the Binary Tree, because it is an effective algorithm and it is easily adjustable.Moreover, in this structure, each node only communicates with three other nodes.The advantage is that it will not expend too much resources on any other server node.So it will not lead to much system resource consumption, and it does not affect the normal funtioning of the overall system.
As shown in Figure 3, media server 2 is the parent node of media servers 4 and 5. On the contrary, media server 4 a is child node of media server 2. The parent node and child node need to establish a point to point communication.The left and the right child node report periodic state information to the parent node.The parent node is responsible for receiving state information.
Each parent node, except the top parent, node receives and holds the state information of its own child nodes, and sends its own status information to its parent node.The root node has no parent node, and does not only receive its child node's' state information, but also retains its own state information at the same time.

III. MEDIA SERVER LOAD BALANCING MANAGEMENT
The main function of load balancing management is to solve the problem of network delay.The causes of the problem includes a single streaming media transport path, overload of the media server, or the deterioration of the network quality.During the peak periods of the day, the amount of access to the media server is large, so the load balancing of the server is to ensure the reasonable scheduling of cluster resources.It can ensure that the media streaming data can be transmitted to the destination in real time.Load balancing completes the following tasks: providing service according to nearby principle, improving the server response speed, improving the efficiency of servers and other resources, and avoiding risk of single point failure.
In the process of streaming media transmission, RTP is responsible for real-time data transmission, and RTCP is responsible for controlling information exchange between the sender and receiver.RTP is not a transport layer protocol, so it must be built on transport layer protocols such as connection-oriented protocols or a connectionless protocol.In order to meet the requirements of real-time transmission of the stream of data, RTP cooperates with UDP.The RTCP protocol uses the same distribution mechanism as the packet to transmit the control packets to all the session participants.As shown in Figure 4, through the analysis of RTCP messages, we can monitor the quality of transmission service.At the same time, we can also obtain the feedback information of the data distribution, and determine the change of the network transmission condition, and provide the basis for the dynamic adjustment of the data transmission load.
In the load balancing scheme of this paper, we collect the RTCP control packets, and then extract the network state information which is contained in the control packet, and add the information into the load balancing algorithm to implement the load balancing mechanism.The media server can monitor the transmission quality of the control packets dynamically by RTCP message, and calculate the optimal data transmission path.
Common load balancing algorithm is: 1.The polling scheme takes turns distributing the stream data to each node.
2. The weighted polling scheme takes turns distributing the data stream to each node according to the weight order of the node.
3. With the optimal path strategy, streaming media data is sent to the media server which has the minimum packet loss rate and the smallest amount of network disturbance.
4. With the weighted optimal path strategy, according to the weighted order of the node, streaming media data is sent to the media server which has the minimum packet loss rate and the smallest amount of network disturbance.
5. With the hash algorithm, the pre-media server node maintains a list of other nodes, and chooses a media server node for data transmission by searching the list.
In short, by the load balancing strategy, we can eliminate the bottleneck of the network, and improve the flexibility and reliability of the network at a lower cost.It provides the possibility to guarantee the quality of multimedia distance education.According to specific requirements, we consider the performance, scalability, flexibility and reliability of load balancing strategy.
The load balancing algorithm of this system adopts the combination of weighted optimal path strategy and Hash algorithm.Firstly, we obtain partial best media server nodes to form a list based on the weighted optimal path strategy.Then, we use media servers' addresses as the key value of the hash algorithm.Finally, we obtain the selected media server through the hash algorithm: ( ) , H key key Mod p p m = !
We can evaluate the performance of the load balancing algorithm by formulating the evaluation method.First, the concept of stability coefficient is defined, which is used to evaluate the quality of the distance education service.It can be obtained by calculating the minimum time delay For the particular network, by extending the time delay, we can determine the time delay sequence ( 1, 2,3... ) . The calculation method of the sample variance ( ) D x is as follows: Sample variance ( ) D x can be used to characterize the range of time delay jitter.We assume that the minimum delay ( ) i Min d is the time delay when network is in good condition, which can show the inherent characteristics of the network quality.
In order to show the path of the media data stream with respect to the time delay jitter, we use the following formula: At this time we know that: (0, ) S !" Then we use the following formula to normalize S : At this point we determine the stability coefficient of the network as [0,1) S ! .If S is very small, it shows that the transmission path of the media data is unstable, and the jitter of the time delay in the network is relatively large.On the contrary, if the value is close to 1, it shows that the transmission path of the media data is stable, and the jitter of time delay is relatively small.

IV. EXPERIMENT
The experiment includes the following steps: Step (1) Firstly, we measure the stability of multimedia distance education system which does not adopt our solution designed in this paper.In the daily peak period, the network condition is poor.When the peak period passes, the network condition will be relatively good.So we measure and sample the stability coefficients within a 24 hour period.

Figure 1 .
Figure 1.Topology of distributed multimedia distance teaching system

Figure 2 .Figure 3 .
Figure 2. Master server and slave server communication diagram

Figure 4 .
Figure 4. Media server load balancing diagram

i
Min d , the average time delay ( ) i Avg d and the sample variance ( ) D x .