CN106209860B - Real-time classroom streaming media live broadcast load distribution method - Google Patents

Real-time classroom streaming media live broadcast load distribution method Download PDF

Info

Publication number
CN106209860B
CN106209860B CN201610556405.2A CN201610556405A CN106209860B CN 106209860 B CN106209860 B CN 106209860B CN 201610556405 A CN201610556405 A CN 201610556405A CN 106209860 B CN106209860 B CN 106209860B
Authority
CN
China
Prior art keywords
server
user terminal
classroom
class
load distribution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610556405.2A
Other languages
Chinese (zh)
Other versions
CN106209860A (en
Inventor
虞陆平
聂大鹏
李胜
熊涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Strong Education Technology Co ltd
Original Assignee
Hangzhou Strong Education Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Strong Education Technology Co ltd filed Critical Hangzhou Strong Education Technology Co ltd
Priority to CN201610556405.2A priority Critical patent/CN106209860B/en
Publication of CN106209860A publication Critical patent/CN106209860A/en
Application granted granted Critical
Publication of CN106209860B publication Critical patent/CN106209860B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a real-time classroom streaming media live broadcast load distribution method, which comprises the following steps: when a first user terminal is on line, a load distribution server controls a Nginx server to distribute and connect the first user terminal to a certain classroom server; the load control server records the information of the user terminal connected with the classroom server and generates distribution strategy information; the load distribution server requests and caches the distribution strategy information from a load control server; and when a new user terminal is on line, the load distribution server distributes and connects the newly on-line user terminal to the corresponding classroom server through the Nginx server according to the cached distribution strategy information. The real-time classroom streaming media live broadcast load distribution method provided by the invention can distribute the user terminals in a specific classroom to the same server, and ensure the synchronism and stability of classroom live broadcast.

Description

Real-time classroom streaming media live broadcast load distribution method
Technical Field
The invention relates to the field of live streaming media, in particular to a live streaming media load distribution method in a real-time classroom.
Background
With the development of the internet, the use of the network for live broadcasting or on demand of streaming media gradually becomes a trend, and is slowly integrated into the daily life of people, and forms a hotspot in various aspects such as work, study, entertainment and the like, and the application of the network is more and more extensive in video conferences, online education, network televisions and video websites. Streaming Media refers to a Media format, such as audio, video or multimedia files, that is played over the Internet/Intranet in a streaming manner. The streaming media does not need to download the whole file before playing, only stores the initial part of the content into the memory, caches the data packet in the computer and enables the streaming media data to be correctly output, and the streaming media can be downloaded and viewed at the same time. The principle is that the multimedia file transmitted to the user is divided into different segments according to the playing time sequence, then the segments are sent to the user in sequence, and the continuous playing of the segments forms continuous sound and images.
Streaming mainly refers to parsing the whole multimedia files such as audio, video, three-dimensional media and the like into individual compressed packets in a specific compression mode, and transmitting the compressed packets to a user computer in sequence or in real time by a video server. In the system adopting the streaming transmission mode, a user does not need to wait until the whole file is completely downloaded like a downloading mode, but only needs to start for a few seconds or a few tens of seconds to decompress the compressed multimedia file on the computer of the user by using the decompression device and then play and watch the compressed multimedia file. The remainder of the multimedia file will now continue to be downloaded in the background server. Compared with a simple downloading mode, the streaming transmission mode which plays the multimedia file while downloading not only greatly shortens the starting time, but also greatly reduces the requirement on the cache capacity of the system, and greatly reduces the waiting time for the user. Currently, streaming media technology is widely used in the internet field.
The traditional network streaming media playing system is generally based on the C/S mode, but because the streaming media playing needs to consume a large amount of network bandwidth and server resources, the development of network streaming media services is severely limited by the mode. Taking a network video stream with an occupied bandwidth of 300kbps as an example, when 1000 users watch simultaneously, the required bandwidth is 300 Mbps. Such performance requirements are not met by most servers. It is almost impossible to use this C/S model if tens or hundreds of thousands of users are to be supported. Increasing the number of servers and increasing the bandwidth is a solution, different users are connected to different servers in a distributed manner, so as to reduce the load of a single server, requests sent from the outside are uniformly distributed to a certain server in a symmetrical structure through a certain load sharing technology, and the server receiving the requests independently responds to the requests of clients, namely a load balancing technology is often called.
With the explosive growth of internet information, load balance (load balance) is no longer a very strange topic, and as the name suggests, load balance is to distribute loads to different service units (such as Web servers, FTP servers, enterprise key application servers and other key task servers), so that the availability of services is guaranteed, and the response is fast enough, which gives users a good experience. The rapidly increasing access volume and data traffic have led to various load balancing products, and many professional load balancing hardware provide good functions but are expensive, so that load balancing software is popular, and nginx is one of the load balancing software.
The first published version of nginx was published in 2004, and version 1.0 was published in 2011. Its features are high stability, powerful function and low resource consumption, and from its present market occupation, nginx has a strong market potential to apache. One of the characteristics that has to be mentioned is its load balancing function, which is also the main reason why many companies choose it.
For the live streaming media field of online education, compared with the general live streaming media technology, the live streaming media technology has certain differences and particularity, and for a specific class, related users need to be distributed to the same server as much as possible to ensure the synchronism and stability of live streaming in the class, so that the users in the same class have the same watching environment.
Disclosure of Invention
The invention provides a real-time classroom streaming media live broadcast load distribution method which can distribute user terminals in a specific classroom to the same server and ensure the synchronism and stability of classroom live broadcast.
In order to achieve the above object, the present invention provides a real-time classroom streaming media live load distribution method, which includes the following steps:
when a first user terminal is on line, a load distribution server controls a Nginx server to distribute and connect the first user terminal to a certain classroom server;
the load control server records the information of the user terminal connected with the classroom server and generates distribution strategy information;
the load distribution server requests and caches the distribution strategy information from a load control server;
and when a new user terminal is on line, the load distribution server distributes and connects the newly on-line user terminal to the corresponding classroom server through the Nginx server according to the cached distribution strategy information.
Further, the information of the user terminal includes a class ID and a user ID.
Further, the allocating policy information further includes allocating the user terminals with the same class ID to the same class server.
Further, when the class ID of the new on-line user terminal is different from the class ID of the assigned class server, the class ID is assigned and connected to another class server.
Further, the load control server judges whether the user terminals of the school students are all connected to the same class server according to the school ID.
Further, the load control server downloads binding data between the school ID and the classroom server through the WEB server.
The real-time classroom streaming media live broadcast load distribution method provided by the invention has the advantages that the load distribution server is used for distributing and connecting the user terminals with the same classroom ID to the same classroom server through the Nginx server, so that the user terminals in a specific classroom are distributed to the same server, the synchronism and the stability of the classroom live broadcast are ensured, and the users in the same classroom have the same watching environment.
Drawings
Fig. 1 is a flowchart illustrating a live streaming load distribution method for real-time classroom according to a preferred embodiment of the present invention.
Fig. 2 is a block diagram of a live streaming load distribution system for real-time classroom according to a preferred embodiment of the present invention.
Detailed Description
The following description will be given with reference to the accompanying drawings, but the present invention is not limited to the following embodiments. Advantages and features of the present invention will become apparent from the following description and from the claims. It is noted that the drawings are in greatly simplified form and that non-precision ratios are used for convenience and clarity only to aid in the description of the embodiments of the invention.
Referring to fig. 1 and fig. 2, fig. 1 is a flowchart illustrating a live load distribution method of live streaming media in real time classroom according to a preferred embodiment of the present invention, and fig. 2 is a structural diagram illustrating a live load distribution system of live streaming media in real time classroom according to a preferred embodiment of the present invention. The invention provides a real-time classroom streaming media live broadcast load distribution method, which comprises the following steps:
step S100: when a first user terminal is on line, a load distribution server controls a Nginx server to distribute and connect the first user terminal to a certain classroom server;
step S200: the load control server records the information of the user terminal connected with the classroom server and generates distribution strategy information;
step S300: the load distribution server requests and caches the distribution strategy information from a load control server;
step S400: and when a new user terminal is on line, the load distribution server distributes and connects the newly on-line user terminal to the corresponding classroom server through the Nginx server according to the cached distribution strategy information.
According to the preferred embodiment of the present invention, the information of the user terminal 500 includes a class ID and a user ID, where the user ID is used to indicate the identity information of the user terminal 500, and the class ID is used to indicate the class information currently entered by the user terminal.
The allocation strategy information further includes allocating the user terminals 500 with the same class ID to the same class server 100, and the user terminals 500 with the same class ID indicate that the added classes are the same, and allocating them to the same class server 100, so as to ensure that the server environments of the user terminals 500 in the same class are the same. When the first user terminal 500 is online, the load control server 200 does not generate allocation policy information yet, determines that the class ID of the current user terminal 500 appears for the first time, and controls the Nginx server 400 through the load allocation server 300 to allocate and connect the current user terminal 500 to a certain class server 100; the load control server 200 records the information of the user terminal 500 connected to the classroom server 100 and generates allocation strategy information, namely the information of the classroom server 100 connected to the user terminal 500 of the current classroom ID; the load distribution server 300 requests and caches the distribution policy information to the load control server 200, and when a new user terminal 500 is online, if the class ID of the new user terminal is the same as the previously distributed class ID of the user terminal 500, the current user terminal is distributed to the same class server 100 through the Nginx server 400.
Further, when the class ID of the newly online user terminal 500 is different from the class ID of the already allocated class server 100, the newly online user terminal 500 is allocated to be connected to another class server 100, and the different class IDs indicate that the class added by the current user terminal 500 is not the same as the class of the already allocated user terminal 500, and the currently allocated user terminal 500 needs to be allocated to be connected to another class server 100, at this time, allocation policy information needs to be acquired, if the current class ID is the first occurrence, the Nginx server 400 allocates a new class server 100 to the current user terminal 500, the Nginx server 400 feeds back the allocation situation to the load allocation server 300, and updates and records the allocation policy information to the load control server 200; if the current classroom ID does not occur for the first time, the load distribution server 300 distributes and connects the user terminal 500 to the corresponding classroom server 100 through the Nginx server 400 according to the distribution policy information cached from the load control server 200.
According to the preferred embodiment of the present invention, the load control server 200 determines whether the user terminals 500 of the school students are all connected to the same classroom server 100 according to the school ID. The information of the user terminal 500 further includes a school ID, the user terminals 500 belonging to the same school have the same school ID, the load control server 200 first determines whether the school ID of the current user terminal 500 belongs to a preset special school, if the school ID of the current user terminal 500 belongs to the special school, the school ID is assigned to a specific class server 100, and then all the user terminals 500 having the same school ID are assigned and connected to the specific class server 100.
Further, the load control server 200 downloads binding data between the school ID and the classroom server 100 through the WEB server 600. The load control server 200 acquires the school ID of the special school through the WEB server 600 and binds it with the specific class server 100, and then determines whether to allocate it to the specific class server 100 according to the school ID of the on-line user terminal 500.
All the classroom servers 100 report the online condition of the servers to the load control server 200, when a classroom server 100 goes offline, the load control server 200 will distribute and connect the newly online user terminal 500 to other classroom servers 100, and the user terminal 500 already distributed to the offline server will redistribute the classroom server 100.
In summary, according to the live streaming media load distribution method for the real-time classroom provided by the invention, the load distribution server is used for distributing and connecting the user terminals with the same classroom ID to the same classroom server through the Nginx server, so that the user terminals in a specific classroom are distributed to the same server, the synchronization and the stability of live broadcasting in the classroom are ensured, and users in the same classroom have the same watching environment.
Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, the protection scope of the present invention should be determined by the appended claims.

Claims (5)

1. A real-time classroom streaming media live broadcast load distribution method is characterized by comprising the following steps:
when a first user terminal is on line, a load distribution server controls a Nginx server to distribute and connect the first user terminal to a certain classroom server;
the load control server records the information of the user terminal connected with the classroom server and generates distribution strategy information;
the load distribution server requests and caches the distribution strategy information from a load control server;
when a new user terminal is online, the load distribution server distributes and connects the newly online user terminal to a corresponding classroom server through the Nginx server according to the cached distribution strategy information;
the information of the user terminal comprises a classroom ID and a user ID;
the distribution strategy information also comprises the step of distributing the user terminals with the same class ID to the same class server;
when the class ID of the new on-line user terminal is different from the class ID of the allocated class server, allocating the class ID to be connected to another class server;
and the load control server judges whether the user terminals of the school students are connected to the same classroom server or not according to the school ID.
2. The live streaming media load distribution method according to claim 1, wherein the class ID of the current user terminal is determined to be the first occurrence, and the load distribution server controls the Nginx server to connect the current user terminal to a class server.
3. The live streaming media load distribution method according to claim 2, wherein the load control server records information of the user terminal connected to the classroom server and generates distribution policy information, that is, classroom server information of the user terminal connected to the current classroom ID.
4. The live streaming media load distribution method according to claim 3, wherein the load distribution server requests and caches the distribution policy information from the load control server, and when a new user terminal is online, if the class ID of the new user terminal is the same as the previously distributed class ID of the user terminal, the current user terminal is distributed to the same class server through the Nginx server.
5. The live load distribution method for classroom streaming media in real time as claimed in claim 4, wherein the load control server downloads binding data between school ID and classroom server through a WEB server.
CN201610556405.2A 2016-07-13 2016-07-13 Real-time classroom streaming media live broadcast load distribution method Active CN106209860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610556405.2A CN106209860B (en) 2016-07-13 2016-07-13 Real-time classroom streaming media live broadcast load distribution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610556405.2A CN106209860B (en) 2016-07-13 2016-07-13 Real-time classroom streaming media live broadcast load distribution method

Publications (2)

Publication Number Publication Date
CN106209860A CN106209860A (en) 2016-12-07
CN106209860B true CN106209860B (en) 2021-07-30

Family

ID=57475354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610556405.2A Active CN106209860B (en) 2016-07-13 2016-07-13 Real-time classroom streaming media live broadcast load distribution method

Country Status (1)

Country Link
CN (1) CN106209860B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11463421B2 (en) * 2016-08-08 2022-10-04 Record Sure Limited Method of generating a secure record of a conversation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938508A (en) * 2009-07-01 2011-01-05 中国电信股份有限公司 Method and system for shortening time delay in peer-to-peer network streaming media live broadcast system
CN104065646A (en) * 2014-06-04 2014-09-24 广州华多网络科技有限公司 Online class fault processing method, device and system
CN104348700A (en) * 2013-07-31 2015-02-11 波利康公司 Method and system for sending microblog
CN104780226A (en) * 2015-05-06 2015-07-15 成都麦子信息技术有限公司 Online education platform
CN104811468A (en) * 2014-01-29 2015-07-29 莘翔四海(北京)科技有限公司 File processing method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050202390A1 (en) * 2004-01-23 2005-09-15 Allen J. V. Course evaluation survey management and reporting system and method
US20110016057A1 (en) * 2009-07-17 2011-01-20 Matthew Jeremy Halpern Online music workshop and method for implementing the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938508A (en) * 2009-07-01 2011-01-05 中国电信股份有限公司 Method and system for shortening time delay in peer-to-peer network streaming media live broadcast system
CN104348700A (en) * 2013-07-31 2015-02-11 波利康公司 Method and system for sending microblog
CN104811468A (en) * 2014-01-29 2015-07-29 莘翔四海(北京)科技有限公司 File processing method and device
CN104065646A (en) * 2014-06-04 2014-09-24 广州华多网络科技有限公司 Online class fault processing method, device and system
CN104780226A (en) * 2015-05-06 2015-07-15 成都麦子信息技术有限公司 Online education platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于 V N C 和 P 2P 技术的实时课堂直播系统;程行荣等;《计算机时代》;20071231;全文 *

Also Published As

Publication number Publication date
CN106209860A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
US20200336769A1 (en) Video Live Broadcast Method and Apparatus
CN108540868B (en) Processing method, device, server, terminal and the storage medium of HLS live streaming
EP1570368B1 (en) Stream sourcing content delivery system
JP5580302B2 (en) Broadcast seeding for peer-to-peer networks
US7953795B2 (en) Method and apparatus for participating in a conference session over a data communication network
US10085123B2 (en) Information processing apparatus and method, program, and content supply system
CN106416269A (en) Unicast adaptive bitrate streaming
EP2493191B1 (en) Method, device and system for realizing hierarchically requesting content in http streaming system
US20080271097A1 (en) System And Method For Receiving And Playing Network Television Programs
CN109561351A (en) Network direct broadcasting back method, device and storage medium
US11838572B2 (en) Streaming video trunking
Kumar et al. Cloud enabled media streaming using Amazon Web Services
CN101267531A (en) An interactive network TV system and its realization method
CN113661692A (en) Dynamic self-adaptive streaming transmission method and device based on HTTP
CN106209824A (en) The cloud edit methods of data, system and the client of cloud editor
CN106998441B (en) Method, system and the Homed system for supporting camera video data multiplex to broadcast
CN113301353A (en) Data transmission method and device, electronic equipment and computer readable storage medium
CN101299709A (en) Flow type medium server system based on internet
CN106209860B (en) Real-time classroom streaming media live broadcast load distribution method
CN112383794A (en) Live broadcast method, live broadcast system, server and computer storage medium
CN112243136B (en) Content playing method, video storage method and device
CN109688423A (en) A kind of system and method for quick broadcasting video
CN114979695A (en) Multi-process live broadcast method and device based on SRS, electronic equipment and storage medium
Venkatesh et al. Dynamic service aggregation for efficient use of resources in interactive video delivery
WO2017071524A1 (en) Multimedia resource publishing method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant