CN106850277A - A kind of direct broadcast server changing method, system and client - Google Patents

A kind of direct broadcast server changing method, system and client Download PDF

Info

Publication number
CN106850277A
CN106850277A CN201710028120.6A CN201710028120A CN106850277A CN 106850277 A CN106850277 A CN 106850277A CN 201710028120 A CN201710028120 A CN 201710028120A CN 106850277 A CN106850277 A CN 106850277A
Authority
CN
China
Prior art keywords
client
current network
current
server
live data
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.)
Pending
Application number
CN201710028120.6A
Other languages
Chinese (zh)
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.)
Beijing Chalk Blue Sky Technology Co Ltd
Original Assignee
Beijing Chalk Blue Sky 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 Beijing Chalk Blue Sky Technology Co Ltd filed Critical Beijing Chalk Blue Sky Technology Co Ltd
Priority to CN201710028120.6A priority Critical patent/CN106850277A/en
Publication of CN106850277A publication Critical patent/CN106850277A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • H04L43/55Testing of service level quality, e.g. simulating service usage

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a kind of direct broadcast server changing method, system and client, belong to net cast technical field;Its method includes:Obtain current network packet loss, current network time delay and the current network shake of current connection server P;Based on the shake of current network packet loss, current network time delay and current network, the current network quality Q of current connection server P is calculatedP;Judge current network quality QPWhether predetermined value P is more than;If current network quality QPMore than predetermined value P, then control client switches to the destination server in alternate servers set, the technical scheme that the present invention is provided, can cause that client dynamic realtime perceives the network quality of each direct broadcast server, and switching at runtime can be carried out according to the network quality of each direct broadcast server, so as to ensure the network quality of the direct broadcast server of client connection, and seamless switching can be realized when direct broadcast server is switched, it is practical, it is applied widely.

Description

A kind of direct broadcast server changing method, system and client
Technical field
The present invention relates to net cast technical field, more particularly to a kind of direct broadcast server changing method, system and client End.
Background technology
As the arriving in 4G epoch, internet audio frequency and video direct broadcast service are also more and more fiery, substantial amounts of user will soon support Full direct broadcast server.In order to meet hot business demand, present state-of-the-art direct broadcast server uses many machines mostly Distributed architecture, will go to solve the problems, such as that separate unit service is had a full house, but solving basic connection in user distribution to different machines After topic of corresponding, the follow-up stability and media that are the live quality for lifting audio frequency and video, mainly lift direct broadcast server pursued The fluency of packet.
Realize it is of the invention during, inventor find at least there are the following problems:
During live, network environment is dynamic change, and during T0 moment, A clients connection S1 direct broadcast servers can Can be optimal selection, but when having arrived T1 moment, the network quality of S1 direct broadcast servers is deteriorated because pressure is big, or because of It is under attack directly to service, then A clients connection S2 direct broadcast servers are only best selection.But, existing skill In art, client can not dynamic sensing each direct broadcast server network quality, and any platform direct broadcast server cannot be perceived Network quality it is optimal, client can not in real time be switched according to the network quality of current each direct broadcast server, and existing Having the client in technology can not accomplish seamless switching according to the different server of artificial selection switching, cause user to listen to Feel to interrupt in journey.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of direct broadcast server changing method, system and client so that client End can dynamic realtime perceive the network quality of each direct broadcast server, and can be according to the network matter of each direct broadcast server Amount carries out switching at runtime, so as to ensure the network quality of the direct broadcast server of client connection, and can switch live clothes Seamless switching is realized during business device, it is practical, it is applied widely.
According to an aspect of the present invention, The embodiment provides a kind of direct broadcast server changing method, application In client, including:
Obtain current network packet loss, current network time delay and the current network shake of current connection server P;
Based on the shake of the current network packet loss, current network time delay and current network, current Connection Service is calculated The current network quality Q of device PP
Judge the current network quality QPWhether predetermined value P is more than;
If the current network quality QPMore than predetermined value P, then in controlling client to switch to alternate servers set Destination server, wherein, alternate servers set includes at least one alternate servers.
Preferably, when the client be live client to send live data bag to current connection server P when;
The step of current network packet loss for obtaining current connection server P, current network are shaken includes:
Based on RTCP Real-time Transport Control Protocol, sender report SR is sent to current connection server P;
Wherein, the sender report SR at least includes:The transmission time of sender report SR, send to current connection The quantity forwarded of the live data bag of server P, each live data bag at least includes:With its own unique corresponding sequence number And packet sends time, wherein the Serial No. continuous label of live data bag;
Preferably, the receiving terminal report RR corresponding with the sender report SR that current connection server P is returned is received;
Wherein, receiving terminal report RR at least includes:Transmission time, the current net of sender report SR corresponding with its own Network packet loss, current network shake;
Preferably, wherein, current network packet loss, current connection server P has been sent based on live client The quantity forwarded of live data bag, the sequence number of each live data bag for having sent and current connection server P itself are received Each live data bag sequence number determine packet loss quantity after, be calculated;
Preferably, current network shake, is that current connection server P is based on the continuous two live data bags of sequence number Packet sends the difference of time, and receives the difference of the packet reception time of the continuous two live data bags of the sequence number Value, is calculated;
Preferably, the step of acquisition current network time delay includes:
The transmission time based on sender report SR, and receive receiving terminal report RR corresponding with sender report SR Reception the time difference, calculate obtain current network time delay.
Preferably, when client be when watching client with receive live data bag that current connection server P forwards and During sender report SR;
The step of current network packet loss of the acquisition current connection server P, includes:
The live client included based on sender report SR has been sent to the live data bag of current connection server P Quantity forwarded, and each live data bag for having sent sequence number, and viewing each live data bag for having received of client Sequence number, determines packet loss quantity;
Based on packet loss quantity and the quantity forwarded, calculate and obtain current network packet loss;
The step of current network for obtaining current connection server P is shaken includes:
Packet based on the continuous two live data bags of sequence number sends the difference of time, and viewing client is received To the difference of the reception time of the continuous two live data bags of the sequence number, calculate and obtain current network shake;
Preferably, the step of current network time delay of the acquisition current connection server P includes:
Packet based on recently received live data bag sends the time, and the live data bag currently just played Packet sends the difference of time, calculates and obtains current network time delay;
Preferably, wherein, unicast packets and sender report SR are sent to current connection server P by live client 's;Sender report SR at least includes:The transmission time of sender report SR, live client have been sent to current Connection Service The quantity forwarded of the live data bag of device P, each live data bag at least includes:With its own unique corresponding sequence number and number According to bag transmission time, wherein the Serial No. continuous label of live data bag.
Preferably, it is described based on the shake of the current network packet loss, current network time delay and current network, calculate and work as The current network quality Q of preceding connection server PPThe step of include:
The current network quality Q of current connection server P is calculated based on the first preset formulaP
Preferably, wherein, first preset formula is:
QP=a*LOSTP+b*JITTERP+c*DELAYP
LOSTPIt is the current network packet loss;JITTERPFor the current network is shaken;DELAYPIt is the current net Network time delay;A, b, c are respectively default weight coefficient.
Preferably, before the step of the destination server during the control client switches to alternate servers set, Also include:
The offered load and net of each alternate servers in the destination server in alternate servers set are obtained respectively Network time delay;
Offered load, network delay and the second preset formula based on each alternate servers, calculate each alternative respectively The alternative network quality Q of serverb
Preferably, wherein, the second preset formula is:Qb=x*LOADb+y*DELAYb
LOADbIt is the offered load of alternate servers, DELAYbIt is the network delay of alternate servers, x, y is respectively default Weight coefficient.
Preferably, the step of control client switches to the destination server in alternate servers set includes:
Based on every alternative network quality Q of alternate serversb, by the alternative network in alternate servers set with minimum Quality QbCorresponding alternate servers are used as destination server;
Control client switches to the destination server.
Preferably, the step of control client switches to the destination server includes:
Control client sends connection request to the destination server;
After with the destination server successful connection, timing is carried out by initial time of the time of successful connection, formed Connection duration;
Judge whether the connection duration reaches preset duration;
If reaching preset duration, client disconnects the connection with the current connection server P;
Otherwise, then the client connects the current connection server P and the destination server simultaneously.
According to another aspect of the invention, The embodiment provides a kind of direct broadcast server switching system, application In client, including:
Acquisition module, for obtaining the current network packet loss of current connection server P, current network time delay and current Network jitter;
Computing module, for based on the shake of the current network packet loss, current network time delay and current network, calculating The current network quality Q of current connection server PP
Control module, for judging the current network quality QPWhether predetermined value P is more than;With,
For determining the current network quality QPDuring more than predetermined value P, control client switches to alternative services Destination server in device set, wherein, alternate servers set includes at least one alternate servers.
Preferably, when the client be live client to send live data bag to current connection server P when;
The acquisition module, is additionally operable to, based on RTCP Real-time Transport Control Protocol, transmitting terminal report be sent to current connection server P Accuse SR;Wherein, the sender report SR at least includes:The transmission time of sender report SR, send to current connection clothes The quantity forwarded of the live data bag of business device P, each live data bag at least includes:With its own unique corresponding sequence number and Packet sends time, wherein the Serial No. continuous label of live data bag;With,
For receiving the receiving terminal report RR corresponding with the sender report SR that current connection server P is returned;
Preferably, wherein, receiving terminal report RR at least includes:During the transmission of sender report SR corresponding with its own Between, current network packet loss, current network shake;
Preferably, wherein, current network packet loss, current connection server P has been sent based on live client The quantity forwarded of live data bag, the sequence number of each live data bag for having sent and current connection server P itself are received Each live data bag sequence number determine packet loss quantity after, be calculated;
Preferably, current network shake, is that current connection server P is based on the continuous two live data bags of sequence number Packet sends the difference of time, and receives the difference of the packet reception time of the continuous two live data bags of the sequence number Value, is calculated;
Preferably, wherein, the computing module is additionally operable to the transmission time based on sender report SR, and receive with The difference of the reception time of the corresponding receiving terminal report RRs of sender report SR, calculates and obtains current network time delay.
Preferably, when client be when watching client with receive live data bag that current connection server P forwards and During sender report SR;
The computing module, the live client for being additionally operable to be included based on sender report SR has been sent to current connection The quantity forwarded of the live data bag of server P, and each live data bag for having sent sequence number, and viewing client connect The sequence number of each live data bag received, determines packet loss quantity;With,
For based on packet loss quantity and the quantity forwarded, calculating and obtaining current network packet loss;With,
The difference of time, and viewing client are sent for the packet based on the continuous two live data bags of sequence number The difference of the reception time of the continuous two live data bags of the sequence number is received, is calculated and is obtained current network shake;With,
Packet based on recently received live data bag sends the time, and the live data bag currently just played Packet sends the difference of time, calculates and obtains approximate current network time delay;
Preferably, wherein, unicast packets and sender report SR are sent to current connection server P by live client 's;Sender report SR at least includes:The transmission time of sender report SR, live client have been sent to current Connection Service The quantity forwarded of the live data bag of device P, each live data bag at least includes:With its own unique corresponding sequence number and number According to bag transmission time, wherein the Serial No. continuous label of live data bag.
Preferably, the computing module, the current network for calculating current connection server P based on the first preset formula Quality QP
Preferably, wherein, first preset formula is:
QP=a*LOSTP+b*JITTERP+c*DELAYP
LOSTPIt is the current network packet loss;JITTERPFor the current network is shaken;DELAYPIt is the current net Network time delay;A, b, c are respectively default weight coefficient.
Preferably, the acquisition module, is additionally operable to controlling client to switch to alternate servers collection described in control module Before destination server in conjunction, each alternate servers in the destination server in alternate servers set are obtained respectively Offered load and network delay;
The computing module, is additionally operable to the offered load based on each alternate servers, network delay and the second default public affairs Formula, calculates the alternative network quality Q of each alternate servers respectivelyb
Preferably, wherein, the second preset formula is:Qb=x*LOADb+y*DELAYb
LOADbIt is the offered load of alternate servers, DELAYbIt is the network delay of alternate servers, x, y is respectively default Weight coefficient.
Preferably, the control module, is additionally operable to based on every alternative network quality Q of alternate serversb, will alternatively take With minimum alternative network quality Q in business device setbCorresponding alternate servers are used as destination server;With,
For controlling client to switch to the destination server.
Preferably, the system also includes:Timing module;
Wherein, the control module, is additionally operable to control client and sends connection request to the destination server;
The timing module, for after client with the destination server successful connection, with the time of successful connection For initial time carries out timing, connection duration is formed;
The control module, is additionally operable to judge whether the connection duration reaches preset duration;
If reaching preset duration, control client disconnects the connection with the current connection server P;
Otherwise, then the client is controlled while connecting the current connection server P and the destination server.
In order to above-mentioned technical proposal is better achieved, embodiments of the invention additionally provide a kind of client, the client End is provided with including above-described direct broadcast server switching system.
Direct broadcast server changing method provided in an embodiment of the present invention, system and client, enable to the client can Dynamic realtime perceives the network quality of each direct broadcast server, and can be carried out according to the network quality of each direct broadcast server Switching at runtime, so as to ensure that the network quality of the direct broadcast server of client connection, and can be in switching direct broadcast server Shi Shixian seamless switchings, it is practical, it is applied widely.
Brief description of the drawings
Fig. 1 is the flow chart of the direct broadcast server changing method that first embodiment of the invention is provided;
Fig. 2 is the modular structure schematic diagram of the direct broadcast server switching system that second embodiment of the invention is provided.
Description of reference numerals:1- acquisition modules;2- computing modules;3- control modules;4- timing modules.
Specific embodiment
To make the object, technical solutions and advantages of the present invention of greater clarity, with reference to specific embodiment and join According to accompanying drawing, the present invention is described in more detail.It should be understood that these descriptions are merely illustrative, and it is not intended to limit this hair Bright scope.Additionally, in the following description, the description to known features and technology is eliminated, to avoid unnecessarily obscuring this The concept of invention.
Fig. 1 is referred to, Fig. 1 is the flow chart of the direct broadcast server changing method that first embodiment of the invention is provided.
As shown in figure 1, The embodiment provides a kind of direct broadcast server changing method, being applied to client, wrap Include:
Obtain current network packet loss, current network time delay and the current network shake of current connection server P;
Based on the shake of the current network packet loss, current network time delay and current network, current Connection Service is calculated The current network quality Q of device PP
Judge the current network quality QPWhether predetermined value P is more than;
If the current network quality QPMore than predetermined value P, then in controlling client to switch to alternate servers set Destination server, wherein, alternate servers set includes at least one alternate servers.
, wherein it is desired to explanation, obtain the current network packet loss of current connection server P, current network time delay with And the mode of current network shake is to obtain or obtain at predetermined time intervals in real time, by the clothes for calculating client currently connection The network quality of business device, it can be determined that whether the network quality for going out current connection server P meets predetermined value, namely client can With dynamic sensing its own connect server network quality, and current connection server P network quality be unsatisfactory for it is pre- During definite value (namely the network quality of current connection server P is poor), the preferable server of network quality is switched to, so as to ensure The server of client connection can have preferably network quality.
When being in different conditions due to same client, current network packet loss that it obtains current connection server P, when There is certain difference in preceding network delay and the method for current network shake, in other words, client has two kinds:One kind is straight Client is broadcast, one kind is viewing client, and live client is to produce one end of live data bag, namely main broadcaster end or live End, equivalent to data source;Viewing client is to play one end of live data bag, also is understood as viewer end or receiving terminal or broadcasts Put end.
When the client be live client to send live data bag to current connection server P when;Also it is even objective When family end is the data source of live data bag,
The step of current network packet loss for obtaining current connection server P, current network are shaken includes:
Based on RTCP Real-time Transport Control Protocol, sender report SR is sent to current connection server P;
Wherein, the sender report SR at least includes:The transmission time of sender report SR, send to current connection The quantity forwarded of the live data bag of server P, each live data bag at least includes:With its own unique corresponding sequence number And packet sends time, wherein the Serial No. continuous label of live data bag;
Receive the receiving terminal report RR corresponding with the sender report SR that current connection server P is returned;
Wherein, receiving terminal report RR at least includes:Transmission time, the current net of sender report SR corresponding with its own Network packet loss, current network shake;
Wherein, current network packet loss is current connection server P in the live data sent based on live client It is each live that the quantity forwarded of bag, the sequence number of each live data bag for having sent and current connection server P itself are received After the sequence number of packet determines packet loss quantity, it is calculated;
, wherein it is desired to explanation, the quantity forwarded of the live data bag sent according to live client and has respectively sent out The sequence number of each live data bag that the sequence number of the live data bag for sending and current connection server P itself are received can be true The live data bag of fixed which sequence number is lost in transmission process, and lost several live data bags, because sequence number It is continuous label, so which sequence number is interrupted to be easy to be searched identify.
Current network is shaken, and is the packet that current connection server P is based on the continuous two live data bags of sequence number The difference of transmission time, and receive the difference of the packet reception time of the continuous two live data bags of the sequence number, meter Obtain;That is, live client have sent two continuous live data bag M1 and M2 of sequence number, its live data bag M1 Packet to send the time be T1, it is that the time interval that T2, M1 and M2 send is that the packet of live data bag M2 sends the time T2-T1;The time respectively T3 and T4 that so M1 and M2 is received in current connection server P, then receive M1's and M2 Time interval is T4-T3, then current network shake is:(T4-T3)-(T2-T1).
The step of acquisition current network time delay, includes:
The transmission time based on sender report SR, and receive receiving terminal report RR corresponding with sender report SR Reception the time difference, calculate obtain current network time delay.
3. method according to claim 1, it is characterised in that current to receive when client is for viewing client When the live data bag and sender report SR of connection server P forwardings;
The step of current network packet loss of the acquisition current connection server P, includes:
The live client included based on sender report SR has been sent to the live data bag of current connection server P Quantity forwarded, and each live data bag for having sent sequence number, and viewing each live data bag for having received of client Sequence number, determines packet loss quantity;
Based on packet loss quantity and the quantity forwarded, calculate and obtain current network packet loss;
The step of current network for obtaining current connection server P is shaken includes:
Packet based on the continuous two live data bags of sequence number sends the difference of time, and viewing client is received To the difference of the reception time of the continuous two live data bags of the sequence number, calculate and obtain current network shake;
The step of current network time delay of the acquisition current connection server P, includes:
Packet based on recently received live data bag sends the time, and the live data bag currently just played Packet sends the difference of time, calculates and obtains current network time delay;
Wherein, unicast packets and sender report SR are sent to current connection server P by live client;Send End report SR at least includes:The transmission time of sender report SR, live client have sent straight to current connection server P The quantity forwarded of unicast packets, each live data bag at least includes:Sent out with its own unique corresponding sequence number and packet Send time, wherein the Serial No. continuous label of live data bag.
It is described to be shaken based on the current network packet loss, current network time delay and current network, calculate current connection The current network quality Q of server PPThe step of include:
The current network quality Q of current connection server P is calculated based on the first preset formulaP
Wherein, first preset formula is:
QP=a*LOSTP+b*JITTERP+c*DELAYP
LOSTPIt is the current network packet loss;JITTERPFor the current network is shaken;DELAYPIt is the current net Network time delay;A, b, c are respectively default weight coefficient.
Before the step of the destination server during the control client switches to alternate servers set, also include:
The offered load and net of each alternate servers in the destination server in alternate servers set are obtained respectively Network time delay;, wherein it is desired to illustrate, each alternate servers in destination server in acquisition alternate servers set The method of network delay is, by RTCP Real-time Transport Control Protocol (RTCP), to send sender report SR's to alternate servers respectively What mode was realized, wherein, the sender report SR sent to alternate servers includes the transmission time of sender report SR, After alternate servers receive sender report SR, a corresponding receiving terminal report RR can be returned to, be wrapped in receiving terminal report RR The transmission time of corresponding sender report SR is contained, the transmission time of the sender report SR in receiving terminal report RR is In order to client is after receiving terminal report RR is received, can be matched for its corresponding receiving terminal report for each transmitting terminal bag SR RR is accused, because same client is at same time point, a sender report SR can only be sent, therefore, each sender report It is unique during the transmission time of SR, so, alternate servers are receiving a certain sender report SR and are starting to return with this certain During the corresponding receiving terminal report RRs of one sender report SR, the transmission time of a certain sender report SR can be put into receiving terminal In report RR, to cause when client receives multiple receiving terminal report RRs, can be based on a certain sender report SR's The transmission time matches quickly confirms which receiving terminal report RR is only receiving terminal report corresponding with a certain sender report SR Accuse RR.
Client can record the receiving terminal report RR when receiving terminal report RR corresponding with sender report SR is received The reception time, network delay is the transmission time of sender report SR and receiving terminal report corresponding with sender report SR The time difference of the reception time of RR is accused, it is also desirable to explanation, because reception time and transmission time are all with client The time standard reference of this one end, so the accuracy of network delay calculating can be improved.
The method of offered load for obtaining each alternate servers in the destination server in alternate servers set is:
Based on RTCP Real-time Transport Control Protocol (RTCP), sent for obtaining the specific of offered load to each alternate servers Using bag APP, offered load is returned to client by alternate servers according to the application-specific bag APP for receiving.
Offered load, network delay and the second preset formula based on each alternate servers, calculate each alternative respectively The alternative network quality Q of serverb
Wherein, the second preset formula is:Qb=x*LOADb+y*DELAYb
LOADbIt is the offered load of alternate servers, DELAYbIt is the network delay of alternate servers, x, y is respectively default Weight coefficient.
, wherein it is desired to explanation, when server switching is carried out, can take into account the networking matter of each alternate servers Amount, i.e. network delay and offered load, it is contemplated that offered load, can avoid multiple client while being switched to a certain On alternate servers, and a certain unexpected network quality of alternate servers is caused to slump, so as to can not effectively realize that server is cut Change.
The step of control client switches to the destination server in alternate servers set includes:
Based on every alternative network quality Q of alternate serversb, by the alternative network in alternate servers set with minimum Quality QbCorresponding alternate servers are used as destination server;
Control client switches to the destination server.
The step of control client switches to the destination server includes:
Control client sends connection request to the destination server;
After with the destination server successful connection, timing is carried out by initial time of the time of successful connection, formed Connection duration;
Judge whether the connection duration reaches preset duration;
If reaching preset duration, client disconnects the connection with the current connection server P;
Otherwise, then the client connects the current connection server P and the destination server simultaneously.
Fig. 2 is refer to, Fig. 2 is that a kind of modular structure of direct broadcast server switching system provided in an embodiment of the present invention is illustrated Figure;
As shown in Fig. 2 The embodiment provides a kind of direct broadcast server switching system, being applied to client, wrap Include:
Acquisition module 1, for obtaining the current network packet loss of current connection server P, current network time delay and working as Preceding network jitter;
Computing module 2, for based on the shake of the current network packet loss, current network time delay and current network, meter Calculate the current network quality Q of current connection server PP
Control module 3, for judging the current network quality QPWhether predetermined value P is more than;With,
For determining the current network quality QPDuring more than predetermined value P, control client switches to alternative services Destination server in device set, wherein, alternate servers set includes at least one alternate servers.
When the client be live client to send live data bag to current connection server P when;
The acquisition module 1, is additionally operable to, based on RTCP Real-time Transport Control Protocol, transmitting terminal be sent to current connection server P Report SR;Wherein, the sender report SR at least includes:The transmission time of sender report SR, send to current connection The quantity forwarded of the live data bag of server P, each live data bag at least includes:With its own unique corresponding sequence number And packet sends time, wherein the Serial No. continuous label of live data bag;With,
For receiving the receiving terminal report RR corresponding with the sender report SR that current connection server P is returned;
Wherein, receiving terminal report RR at least includes:Transmission time, the current net of sender report SR corresponding with its own Network packet loss, current network shake;
Wherein, current network packet loss is current connection server P in the live data sent based on live client It is each live that the quantity forwarded of bag, the sequence number of each live data bag for having sent and current connection server P itself are received After the sequence number of packet determines packet loss quantity, it is calculated;
Current network is shaken, and is the packet that current connection server P is based on the continuous two live data bags of sequence number The difference of transmission time, and receive the difference of the packet reception time of the continuous two live data bags of the sequence number, meter Obtain;
Wherein, the computing module 2, is additionally operable to the transmission time based on sender report SR, and receive and the transmission The difference of the reception time of the corresponding receiving terminal report RRs of end report SR, calculates and obtains current network time delay.
When client is to receive live data bag and transmitting terminal report that current connection server P is forwarded when watching client When accusing SR;
The computing module 2, the live client for being additionally operable to be included based on sender report SR has been sent to currently connecting Connect the quantity forwarded of the live data bag of server P, and each live data bag for having sent sequence number, and viewing client The sequence number of each live data bag for receiving, determines packet loss quantity;With,
For based on packet loss quantity and the quantity forwarded, calculating and obtaining current network packet loss;With,
The difference of time, and viewing client are sent for the packet based on the continuous two live data bags of sequence number The difference of the reception time of the continuous two live data bags of the sequence number is received, is calculated and is obtained current network shake;With,
Packet based on recently received live data bag sends the time, and the live data bag currently just played Packet sends the difference of time, calculates and obtains current network time delay;
Wherein, unicast packets and sender report SR are sent to current connection server P by live client;Send End report SR at least includes:The transmission time of sender report SR, live client have sent straight to current connection server P The quantity forwarded of unicast packets, each live data bag at least includes:Sent out with its own unique corresponding sequence number and packet Send time, wherein the Serial No. continuous label of live data bag.
The computing module 2, the current network quality for calculating current connection server P based on the first preset formula QP
Wherein, first preset formula is:
QP=a*LOSTP+b*JITTERP+c*DELAYP
LOSTPIt is the current network packet loss;JITTERPFor the current network is shaken;DELAYPIt is the current net Network time delay;A, b, c are respectively default weight coefficient.
The acquisition module 1, is additionally operable in controlling client to switch to alternate servers set described in control module 3 Before destination server, the network that each alternate servers in the destination server in alternate servers set are obtained respectively is born Carry and network delay;
The computing module 2, is additionally operable to the offered load based on each alternate servers, network delay and the second default public affairs Formula, calculates the alternative network quality Q of each alternate servers respectivelyb
Wherein, the second preset formula is:Qb=x*LOADb+y*DELAYb
LOADbIt is the offered load of alternate servers, DELAYbIt is the network delay of alternate servers, x, y is respectively default Weight coefficient.
The control module 3, is additionally operable to based on every alternative network quality Q of alternate serversb, by alternate servers collection With minimum alternative network quality Q in conjunctionbCorresponding alternate servers are used as destination server;With,
For controlling client to switch to the destination server.
The system also includes:Timing module 4;
Wherein, the control module 3, is additionally operable to control client and sends connection request to the destination server;
The timing module 4, for after client with the destination server successful connection, with the time of successful connection For initial time carries out timing, connection duration is formed;
The control module 3, is additionally operable to judge whether the connection duration reaches preset duration;
If reaching preset duration, control client disconnects the connection with the current connection server P;
Otherwise, then the client is controlled while connecting the current connection server P and the destination server.
Embodiments of the invention additionally provide a kind of client, and the client is provided with including above-described live clothes Business device switching system.
Direct broadcast server changing method provided in an embodiment of the present invention, system and client, enable to the client can Dynamic realtime perceives the network quality of each direct broadcast server, and can be carried out according to the network quality of each direct broadcast server Switching at runtime, so as to ensure that the network quality of the direct broadcast server of client connection, and can be in switching direct broadcast server Shi Shixian seamless switchings, it is practical, it is applied widely.
It should be appreciated that above-mentioned specific embodiment of the invention is used only for exemplary illustration or explains of the invention Principle, without being construed as limiting the invention.Therefore, that is done without departing from the spirit and scope of the present invention is any Modification, equivalent, improvement etc., should be included within the scope of the present invention.Additionally, appended claims purport of the present invention In the whole changes covered in the equivalents for falling into scope and border or this scope and border and repair Change example.

Claims (15)

1. a kind of direct broadcast server changing method, is applied to client, it is characterised in that including:
Obtain current network packet loss, current network time delay and the current network shake of current connection server P;
Based on the shake of the current network packet loss, current network time delay and current network, calculate current connection server P's Current network quality QP
Judge the current network quality QPWhether predetermined value P is more than;
If the current network quality QPMore than predetermined value P, then client is controlled to switch to the clothes of the target in alternate servers set Business device, wherein, alternate servers set includes at least one alternate servers.
2. method according to claim 1, it is characterised in that when the client is live client to send live number During according to bag to current connection server P;
The step of current network packet loss for obtaining current connection server P, current network are shaken includes:
Based on RTCP Real-time Transport Control Protocol, sender report SR is sent to current connection server P;
Wherein, the sender report SR at least includes:The transmission time of sender report SR, send to current Connection Service The quantity forwarded of the live data bag of device P, each live data bag at least includes:With its own unique corresponding sequence number and number According to bag transmission time, wherein the Serial No. continuous label of live data bag;
Receive the receiving terminal report RR corresponding with the sender report SR that current connection server P is returned;
Wherein, receiving terminal report RR at least includes:The transmission time of sender report SR corresponding with its own, current network are lost Bag rate, current network shake;
Wherein, current network packet loss is current connection server P in the live data bag sent based on live client Each live data that quantity forwarded, the sequence number of each live data bag for having sent and current connection server P itself are received After the sequence number of bag determines packet loss quantity, it is calculated;
Current network is shaken, and is the packet transmission that current connection server P is based on the continuous two live data bags of sequence number The difference of time, and the difference of the packet reception time of the continuous two live data bags of the sequence number is received, calculate Arrive;
The step of acquisition current network time delay, includes:
Transmission time based on sender report SR, and receive and connect with the sender report corresponding receiving terminal report RRs of SR Difference between the time receiving, calculates and obtains current network time delay.
3. method according to claim 1, it is characterised in that when client is for viewing client receiving current connection When the live data bag and sender report SR of server P forwardings;
The step of current network packet loss of the acquisition current connection server P, includes:
The live client included based on sender report SR has sent the hair of the live data bag to current connection server P Send quantity, and each live data bag for having sent sequence number, and the sequence of each live data bag that viewing client has been received Number, determine packet loss quantity;
Based on packet loss quantity and the quantity forwarded, calculate and obtain current network packet loss;
The step of current network for obtaining current connection server P is shaken includes:
Packet based on the continuous two live data bags of sequence number sends the difference of time, and viewing client receives this The difference of the reception time of the continuous two live data bags of sequence number, calculates and obtains current network shake;
The step of current network time delay of the acquisition current connection server P, includes:
Packet based on recently received live data bag sends time, and the currently data of the positive live data bag played The difference of bag transmission time, calculates and obtains current network time delay;
Wherein, unicast packets and sender report SR are sent to current connection server P by live client;Transmitting terminal report Accusing SR at least includes:The transmission time of sender report SR, live client have been sent to the live number of current connection server P According to the quantity forwarded of bag, each live data bag at least includes:When being sent with its own unique corresponding sequence number and packet Between, the wherein Serial No. continuous label of live data bag.
4. the method according to any one of claims 1 to 3, it is characterised in that
It is described to be shaken based on the current network packet loss, current network time delay and current network, calculate current Connection Service The current network quality Q of device PPThe step of include:
The current network quality Q of current connection server P is calculated based on the first preset formulaP
Wherein, first preset formula is:
QP=a*LOSTP+b*JITTERP+c*DELAYP
LOSTPIt is the current network packet loss;JITTERPFor the current network is shaken;DELAYPFor the current network is prolonged When;A, b, c are respectively default weight coefficient.
5. method according to claim 4, it is characterised in that switch to alternate servers set in the control client In destination server the step of before, also include:
The offered load and network for obtaining each alternate servers in the destination server in alternate servers set respectively prolong When;
Offered load, network delay and the second preset formula based on each alternate servers, calculate each alternative services respectively The alternative network quality Q of deviceb
Wherein, the second preset formula is:Qb=x*LOADb+y*DELAYb
LOADbIt is the offered load of alternate servers, DELAYbIt is the network delay of alternate servers, x, y is respectively default weighting Coefficient.
6. method according to claim 4, it is characterised in that the control client is switched in alternate servers set Destination server the step of include:
Based on every alternative network quality Q of alternate serversb, by the alternative network quality in alternate servers set with minimum QbCorresponding alternate servers are used as destination server;
Control client switches to the destination server.
7. method according to claim 6, it is characterised in that the control client switches to the destination server Step includes:
Control client sends connection request to the destination server;
After with the destination server successful connection, timing is carried out by initial time of the time of successful connection, form connection Duration;
Judge whether the connection duration reaches preset duration;
If reaching preset duration, client disconnects the connection with the current connection server P;
Otherwise, then the client connects the current connection server P and the destination server simultaneously.
8. a kind of direct broadcast server switching system, is applied to client, it is characterised in that including:
Acquisition module, current network packet loss, current network time delay and current network for obtaining current connection server P Shake;
Computing module, for based on the shake of the current network packet loss, current network time delay and current network, calculating current The current network quality Q of connection server PP
Control module, for judging the current network quality QPWhether predetermined value P is more than;With,
For determining the current network quality QPDuring more than predetermined value P, control client switches to alternate servers set In destination server, wherein, alternate servers set include at least one alternate servers.
9. system according to claim 8, it is characterised in that when the client is live client to send live number During according to bag to current connection server P;
The acquisition module, is additionally operable to, based on RTCP Real-time Transport Control Protocol, sender report be sent to current connection server P SR;Wherein, the sender report SR at least includes:The transmission time of sender report SR, send to current Connection Service The quantity forwarded of the live data bag of device P, each live data bag at least includes:With its own unique corresponding sequence number and number According to bag transmission time, wherein the Serial No. continuous label of live data bag;With,
For receiving the receiving terminal report RR corresponding with the sender report SR that current connection server P is returned;
Wherein, receiving terminal report RR at least includes:The transmission time of sender report SR corresponding with its own, current network are lost Bag rate, current network shake;
Wherein, current network packet loss is current connection server P in the live data bag sent based on live client Each live data that quantity forwarded, the sequence number of each live data bag for having sent and current connection server P itself are received After the sequence number of bag determines packet loss quantity, it is calculated;
Current network is shaken, and is the packet transmission that current connection server P is based on the continuous two live data bags of sequence number The difference of time, and the difference of the packet reception time of the continuous two live data bags of the sequence number is received, calculate Arrive;
Wherein, the computing module, is additionally operable to the transmission time based on sender report SR, and receive and the sender report The difference of the reception time of the corresponding receiving terminal report RRs of SR, calculates and obtains current network time delay.
10. system according to claim 8, it is characterised in that currently connected with receiving when client is for viewing client When connecing the live data bag and sender report SR of server P forwardings;
The computing module, the live client for being additionally operable to be included based on sender report SR has been sent to current Connection Service The quantity forwarded of the live data bag of device P, and each live data bag for having sent sequence number, and viewing client received The sequence number of each live data bag, determines packet loss quantity;With,
For based on packet loss quantity and the quantity forwarded, calculating and obtaining current network packet loss;With for being connected based on sequence number The packet of two continuous live data bags sends the difference of time, and viewing client receives continuous two of the sequence number The difference of the reception time of live data bag, calculates and obtains current network shake;With,
Packet based on recently received live data bag sends time, and the currently data of the positive live data bag played The difference of bag transmission time, calculates and obtains current network time delay;
Wherein, unicast packets and sender report SR are sent to current connection server P by live client;Transmitting terminal report Accusing SR at least includes:The transmission time of sender report SR, live client have been sent to the live number of current connection server P According to the quantity forwarded of bag, each live data bag at least includes:When being sent with its own unique corresponding sequence number and packet Between, the wherein Serial No. continuous label of live data bag.
11. system according to any one of claim 8 to 10, it is characterised in that
The computing module, the current network quality Q for calculating current connection server P based on the first preset formulaP
Wherein, first preset formula is:QP=a*LOSTP+b*JITTERP+c*DELAYP
LOSTPIt is the current network packet loss;JITTERPFor the current network is shaken;DELAYPFor the current network is prolonged When;A, b, c are respectively default weight coefficient.
12. methods according to claim 11, it is characterised in that
The acquisition module, is additionally operable to the target clothes in controlling client to switch to alternate servers set described in control module Before business device, the offered load and net of each alternate servers in the destination server in alternate servers set are obtained respectively Network time delay;
The computing module, is additionally operable to the offered load based on each alternate servers, network delay and the second preset formula, point The alternative network quality Q of each alternate servers is not calculatedb
Wherein, the second preset formula is:Qb=x*LOADb+y*DELAYb
LOADbIt is the offered load of alternate servers, DELAYbIt is the network delay of alternate servers, x, y is respectively default weighting Coefficient.
13. systems according to claim 11, it is characterised in that
The control module, is additionally operable to based on every alternative network quality Q of alternate serversb, by alternate servers set with Minimum alternative network quality QbCorresponding alternate servers are used as destination server;With,
For controlling client to switch to the destination server.
14. systems according to claim 13, it is characterised in that also include:Timing module;
Wherein, the control module, is additionally operable to control client and sends connection request to the destination server;
The timing module, for after client with the destination server successful connection, with the time of successful connection to rise Time beginning carries out timing, forms connection duration;
The control module, is additionally operable to judge whether the connection duration reaches preset duration;
If reaching preset duration, control client disconnects the connection with the current connection server P;
Otherwise, then the client is controlled while connecting the current connection server P and the destination server.
15. a kind of clients, it is characterised in that the client is provided with including straight described in any one of claim 8 to 14 Broadcast server switching system.
CN201710028120.6A 2017-01-13 2017-01-13 A kind of direct broadcast server changing method, system and client Pending CN106850277A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710028120.6A CN106850277A (en) 2017-01-13 2017-01-13 A kind of direct broadcast server changing method, system and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710028120.6A CN106850277A (en) 2017-01-13 2017-01-13 A kind of direct broadcast server changing method, system and client

Publications (1)

Publication Number Publication Date
CN106850277A true CN106850277A (en) 2017-06-13

Family

ID=59124705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710028120.6A Pending CN106850277A (en) 2017-01-13 2017-01-13 A kind of direct broadcast server changing method, system and client

Country Status (1)

Country Link
CN (1) CN106850277A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483990A (en) * 2017-08-21 2017-12-15 广州多益网络股份有限公司 Dynamic code rate adjusting method, device and the Transmission system of a kind of streaming media
WO2019084972A1 (en) * 2017-11-06 2019-05-09 深圳市大疆创新科技有限公司 Streaming media live broadcast method and system
CN110460878A (en) * 2019-07-19 2019-11-15 视联动力信息技术股份有限公司 A kind of switching method and apparatus of video communication link
CN111212087A (en) * 2020-01-20 2020-05-29 上海米哈游天命科技有限公司 Method, device, equipment and storage medium for determining login server
CN111371774A (en) * 2020-02-28 2020-07-03 深信服科技股份有限公司 Information processing method and device, equipment and storage medium
CN115022730A (en) * 2022-06-13 2022-09-06 北京达佳互联信息技术有限公司 Data transmission method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101562615A (en) * 2009-05-20 2009-10-21 宁波大学 Transmission method for MPEG-4 code based multimedia data stream self-adapting network bandwidth
CN101834799A (en) * 2010-05-06 2010-09-15 工业和信息化部电信传输研究所 Selection method of server of mobile IPTV (Internet Protocol Television), client, server and system
CN104320296A (en) * 2014-09-30 2015-01-28 深圳市云之讯网络技术有限公司 Network quality estimation and detection method and device
CN105323529A (en) * 2015-10-19 2016-02-10 掌赢信息科技(上海)有限公司 Method for switching between audio call and video call, and electronic equipment
CN105847854A (en) * 2016-04-12 2016-08-10 乐视控股(北京)有限公司 Webcasting method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101562615A (en) * 2009-05-20 2009-10-21 宁波大学 Transmission method for MPEG-4 code based multimedia data stream self-adapting network bandwidth
CN101834799A (en) * 2010-05-06 2010-09-15 工业和信息化部电信传输研究所 Selection method of server of mobile IPTV (Internet Protocol Television), client, server and system
CN104320296A (en) * 2014-09-30 2015-01-28 深圳市云之讯网络技术有限公司 Network quality estimation and detection method and device
CN105323529A (en) * 2015-10-19 2016-02-10 掌赢信息科技(上海)有限公司 Method for switching between audio call and video call, and electronic equipment
CN105847854A (en) * 2016-04-12 2016-08-10 乐视控股(北京)有限公司 Webcasting method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
H. SCHULZRINNE.ETC: ""RTP: A Transport Protocol for Real-Time Applications"", 《RFC3550》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483990A (en) * 2017-08-21 2017-12-15 广州多益网络股份有限公司 Dynamic code rate adjusting method, device and the Transmission system of a kind of streaming media
CN107483990B (en) * 2017-08-21 2020-04-14 广州多益网络股份有限公司 Dynamic code rate adjusting method and device for streaming media transmission and transmission system
WO2019084972A1 (en) * 2017-11-06 2019-05-09 深圳市大疆创新科技有限公司 Streaming media live broadcast method and system
US11284126B2 (en) 2017-11-06 2022-03-22 SZ DJI Technology Co., Ltd. Method and system for streaming media live broadcast
CN110460878A (en) * 2019-07-19 2019-11-15 视联动力信息技术股份有限公司 A kind of switching method and apparatus of video communication link
CN110460878B (en) * 2019-07-19 2022-01-11 视联动力信息技术股份有限公司 Switching method and device of video communication link
CN111212087A (en) * 2020-01-20 2020-05-29 上海米哈游天命科技有限公司 Method, device, equipment and storage medium for determining login server
CN111371774A (en) * 2020-02-28 2020-07-03 深信服科技股份有限公司 Information processing method and device, equipment and storage medium
CN113574841A (en) * 2020-02-28 2021-10-29 深信服科技股份有限公司 Information processing method and device, equipment and storage medium
CN115022730A (en) * 2022-06-13 2022-09-06 北京达佳互联信息技术有限公司 Data transmission method and device, electronic equipment and storage medium
CN115022730B (en) * 2022-06-13 2024-04-30 北京达佳互联信息技术有限公司 Data transmission method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106850277A (en) A kind of direct broadcast server changing method, system and client
JP5635626B2 (en) Method, system and apparatus for synchronization of media streams
JP5788473B2 (en) Method and system for synchronizing terminal output
CN101146110B (en) A method for playing stream media
US9344682B2 (en) Multi-media management
CN108696772B (en) Real-time video transmission method and device
CN108111531B (en) Method and device for enhancing video live broadcast quality
JP2009017345A (en) Multicast distribution system, home gateway and multicast management method using home gateway
CN102469294A (en) Method and system for dynamically regulating media contents of video conference
JP2008311947A (en) Contents distribution system, contents server, terminal, contents distribution method, program and recording medium
US20100333160A1 (en) Segmentation of multicast distributed services
CN106464938B (en) Method for providing heterogeneous network based broadcast service
US7385933B2 (en) Synchronised data delivery
CN101316161B (en) Synchronous indication method and system for distributed video
JP2015516739A (en) Information signal transmission / reception method via network, transmitter and receiver using the method, splitter unit for use in the network
CN107659853B (en) A kind of adaptive stream media live streaming control system
JP2004135065A (en) Transmission terminal, reception terminal and data transmission system
CN106330751B (en) Resource dynamic requests time window and terminal buffers method under heterogeneous network transmission
JP2008135844A (en) Multicast broadcast receiving terminal, and multicast broadcast relay apparatus
JPH11259386A (en) Network system
CN106878097B (en) A kind of network insertion Rate Test Method, apparatus and system based on multicast
KR100841593B1 (en) Appratus and method for providing multimedia contents, and appratus and method for receiving multimedia contents
US20040122899A1 (en) Content distribution system and content distribution method
CN116418785A (en) Fusion data transmission method in multimedia sharing
Yingjian Scalable media streaming to heterogenous users

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170613