CN108270750A - CDN switching methods, client and server - Google Patents

CDN switching methods, client and server Download PDF

Info

Publication number
CN108270750A
CN108270750A CN201611270789.8A CN201611270789A CN108270750A CN 108270750 A CN108270750 A CN 108270750A CN 201611270789 A CN201611270789 A CN 201611270789A CN 108270750 A CN108270750 A CN 108270750A
Authority
CN
China
Prior art keywords
cdn
client
server
request
target area
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
CN201611270789.8A
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 Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201611270789.8A priority Critical patent/CN108270750A/en
Publication of CN108270750A publication Critical patent/CN108270750A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • 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/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The embodiment of the invention discloses a kind of CDN switching methods, client and server, for according to current broadcast information switching at runtime CDN.Present invention method includes:Client calculates smooth angle value according to broadcast information, wherein broadcast information includes viewing duration, interim card number and interim card duration, broadcast information is obtained by client dynamic statistics, if the smoothness angle value is less than predetermined threshold value, then user end to server sends the first request, and to be switched to first object CDN to server request, wherein first object CDN is the highest CDN of quality in target area, and target area is the region that client is currently located, client is switched to first object CDN.The embodiment of the present invention additionally provides a kind of client and server.The embodiment of the present invention can be according to current broadcast information switching at runtime CDN.

Description

CDN switching methods, client and server
Technical field
The present invention relates to a kind of communications field more particularly to CDN switching methods, client and servers.
Background technology
CDN (Content Delivery Network or Content Distribution Network, content delivery network Network) it is a kind of new network architecture, user can be allow just by the content distribution of business to the network " edge " closest to user It is near to obtain required content, improve the operational efficiency of system.Its basic ideas is avoided as far as possible on internet it is possible that influencing The bottleneck and link of data transmission bauds and stability, make content transmission faster, it is more stable.By placing section everywhere in network One on the existing Internet basic layer intelligent virtual network that point server is formed, CDN system being capable of roots in real time According to the connection of network flow and each node, load state and to the integrated informations such as the distance of user and response time by user's Request is re-directed on the service node nearest from user.
With the development of Internet technology, watch video online using network and be increasingly becoming a kind of trend, be slowly dissolved into In daily life.But if playing number online increases, media business user volume and portfolio increase, will be to existing The flux and flow direction of network causes very big impact, influences data transmission bauds and stability, leads to video playing fluency very Low, often there is interim card when watching in user.
In the prior art, client recommends a preferable CDN of quality to be carried for the user before video starts to user For service, make video data transmission faster, it is more stable.
However, the prior art recommends CDN before video playing to user, will be used always in video display process should CDN and no longer switch other CDN, if in the crowd is dense region, many users reach the standard grade simultaneously, and what terminal was recommended is all same CDN based on factors such as bandwidth reductions, can cause the CDN mass drastically to decline, and due to that cannot switch to other CDN, cause very Multi-user's viewing video is not smooth, and therefore, the flexibility ratio that processing is switched over to CDN is low, leads to body during user's viewing video It is poor to test sense.
Invention content
On the one hand the embodiment of the present invention provides a kind of CDN switching methods, specifically include:
Client calculates smooth angle value according to broadcast information, and the broadcast information includes viewing duration, interim card number and card Immediately it grows, the broadcast information is counted to obtain by the client;
If the smoothness angle value, less than predetermined threshold value, the user end to server sends the first request, described first please It asks to ask to be switched to first object CDN, the first object CDN as quality ranking in target area most to the server High CDN, the target area are the region that the client is currently located;
The client is switched to the first object CDN.
Optionally, before the client calculates smooth angle value according to broadcast information, the method further includes:
The client receives the cycles per instruction that Video service quotient sends, and the cycles per instruction is used to indicate the client CDN mass rankings when playing video every from a during cycle to the server acquisition target area.
Optionally, the client calculates smooth angle value according to broadcast information and includes:
The smooth angle value is calculated as follows:
L=100*Tm/(2*(2*C+Tn)+Tm)
The L is smooth angle value;
The TmTo watch duration;
The C is interim card number;
The TnFor interim card total duration.
Optionally, after the user end to server sends the first request, the client is switched to first mesh Before marking CDN, the method further includes:
The client receives the CDN ranking informations that the server is sent, and the CDN ranking informations include being located at described The title of the CDN of target area and quality ranking;
The client caches the CDN ranking informations to local.
Optionally, the client is switched to after the first object CDN, and the method further includes:If current stream For smooth angle value less than the predetermined threshold value, the client sequentially switches to the second target successively according to the CDN mass ranking CDN, the second target CDN are located at the target area;
If using the fluency of video during the second target CDN less than the predetermined threshold value, the client switches to The first object CDN.
Optionally, before the user end to server sends the first request, the client is calculated according to broadcast information After smooth angle value, the method further includes:
The client obtains the corresponding minimum network speed of current video code check and current network speed;
If the minimum network speed is less than the current network speed, the client determines to need to switch CDN, with described in triggering Client to the server send it is described first request the step of.
On the other hand the embodiment of the present invention provides a kind of CDN switching methods, specifically include:
During video playing, server receives the first request that client is sent, and first request is used to ask to be switched to First object CDN, the first object CDN are the highest CDN of quality in target area, and the target area is the client The region being currently located;
The server sends CDN ranking informations to the client, and the CDN ranking informations include being located at the target The title of the CDN in region and quality ranking.
Optionally, before server receives the first request that client is sent, the method further includes:
Before the video playing, the server receives the second request that the client is sent, and second request is used In request third target CDN to play the video;
The server is according to the network address of second acquisition request to the client;
The server is locally determining the target area according to the network address;
The server determines the third target CDN in the CDN ranking informations, and the third target CDN is institute State the CDN of quality top ranked in target area.
On the other hand the embodiment of the present invention provides a kind of client, specifically include:
Computing unit, for calculating smooth angle value according to broadcast information, the broadcast information includes viewing duration, interim card time Number and interim card duration, the broadcast information are counted to obtain by the client;
First transmitting element, it is described for sending the first request to server if the smoothness angle value is less than predetermined threshold value First request is quality in target area for being switched to first object CDN, the first object CDN to server request The CDN of top ranked, the target area are the region that the client is currently located;
Switch unit, for being switched to the first object CDN.
Optionally, the client further includes:
First receiving unit, for receiving the cycles per instruction of Video service quotient transmission, the cycles per instruction is used to indicate institute The CDN mass in the target area is obtained when stating client terminal playing video to the server every a during cycle to arrange Name.
Optionally, the computing unit includes:
Computing module, for calculating the smooth angle value as follows:
L=100*Tm/(2*(2*C+Tn)+Tm)
The L is smooth angle value;
The TmTo watch duration;
The C is interim card number;
The TnFor interim card total duration.
Optionally, the client includes:
Second receiving unit, for receiving the CDN ranking informations that the server is sent, the CDN ranking informations include Positioned at the title of the CDN of the target area and quality ranking;
Buffer unit, for caching the CDN ranking informations to local.
Optionally, the client includes:
First switch unit, if current smooth angle value is less than the predetermined threshold value, for being arranged according to the CDN mass Name, sequentially switches to the second target CDN, the second target CDN and is located at the target area successively;
Second switch unit, if being used for using the fluency of video during the second target CDN less than the predetermined threshold value Switch to the first object CDN.
Optionally, the client further includes:
First acquisition unit, for obtaining the corresponding minimum network speed of current video code check and current network speed;
First determination unit, if the minimum network speed is less than the current network speed, for determining to need to switch CDN, with Trigger the client to the server send it is described first request the step of.
On the other hand the embodiment of the present invention provides a kind of server, specifically include:
Third receiving unit, during video playing, for receiving the first request of client transmission, first request is used for Request is switched to first object CDN, the first object CDN as the highest CDN of quality in target area, and the target area is The region that the client is currently located;
Second transmitting element, for sending CDN ranking informations to the client, the CDN ranking informations include being located at The title of the CDN of the target area and quality ranking.
Optionally, the server further includes:
4th receiving unit, before the video playing, for receiving the second request that the client is sent, described second Request is for asking third target CDN to play the video;
Second acquisition unit, for the network address according to second acquisition request to the client;
Second determination unit, for locally determining the target area according to the network address;
Third determination unit, for determining the third target CDN, the third target in the CDN ranking informations CDN is the CDN of quality top ranked in the target area.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:Client is according to broadcast information meter Smooth angle value is calculated, wherein broadcast information includes viewing duration, interim card number and interim card duration, and broadcast information is united by client dynamic Meter obtains, if the smoothness angle value is less than predetermined threshold value, user end to server sends the first request, to be cut to server request First object CDN is changed to, wherein first object CDN is the highest CDN of quality in target area, and target area is worked as client The region at preceding place, client are switched to first object CDN.In the embodiment of the present invention, client determines the smoothness of current video After angle value is less than predetermined threshold value, the highest CDN of quality in target area i.e. first object CDN is switched to server request, therefore Client can ensure that fluency when user watches video, improve and regard according to current broadcast information switching at runtime CDN The user experience that frequency plays.
Description of the drawings
Fig. 1 is application scenarios schematic diagram in the embodiment of the present invention;
Fig. 2 is CDN switching method one embodiment schematic diagrames in the embodiment of the present invention;
Fig. 3 is another embodiment schematic diagram of CDN switching methods in the embodiment of the present invention;
Another embodiment schematic diagram of CDN switching methods in Fig. 4 embodiment of the present invention;
Fig. 5 is client one embodiment schematic diagram in the embodiment of the present invention;
Fig. 6 is another embodiment schematic diagram of client in the embodiment of the present invention;
Fig. 7 is server one embodiment schematic diagram in the embodiment of the present invention;
Fig. 8 is another embodiment schematic diagram of server in the embodiment of the present invention;
Fig. 9 is client one embodiment schematic diagram in the embodiment of the present invention;
Figure 10 is server one embodiment schematic diagram in the embodiment of the present invention.
Specific embodiment
It, can be according to working as client an embodiment of the present invention provides a kind of CDN switching methods and client, server Preceding broadcast information switching at runtime CDN.
In order to which those skilled in the art is made to more fully understand the present invention program, below in conjunction in the embodiment of the present invention The technical solution in the embodiment of the present invention is clearly and completely described in attached drawing, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.
Term " first ", " second ", " third " in description and claims of this specification and above-mentioned attached drawing, " The (if present)s such as four " are the objects for distinguishing similar, and specific sequence or precedence are described without being used for.It should manage The data that solution uses in this way can be interchanged in the appropriate case, so that the embodiments described herein can be in addition to illustrating herein Or the sequence other than the content of description is implemented.In addition, term " comprising " or " having " and its any deformation, it is intended that covering is not Exclusive includes, for example, contain the process of series of steps or unit, method, system, product or equipment be not necessarily limited to it is clear Those steps or unit that ground is listed, but may include not listing clearly or for these processes, method, product or set Standby intrinsic other steps or unit.
The embodiment of the present invention can be used for application scenarios shown in FIG. 1.In the application scenarios, user is watched by client Video, the CDN mass used when client terminal playing video is very low, video playing fluency can be made very low, user is watching There is interim card in Shi Jingchang.
It in the prior art, will be always using should in video display process before video playing in the preferred CDN of client CDN and no longer switch other CDN, if in the crowd is dense region, many users reach the standard grade simultaneously, and what terminal was recommended is all same CDN based on factors such as bandwidth reductions, can cause the CDN mass drastically to decline, and due to that cannot switch to other CDN, cause very It is not smooth that multi-user watches video.
In view of this, in the embodiment of the present invention, client calculates smooth angle value, wherein broadcast information packet according to broadcast information It includes viewing duration, interim card number and interim card duration, broadcast information to be obtained by client dynamic statistics, if the smoothness angle value is less than pre- If threshold value, then user end to server sends the first request, to be switched to first object CDN to server request, wherein first Target CDN is the highest CDN of quality in target area, and target area is the region that client is currently located, and client switches To first object CDN.
For ease of understanding, the idiographic flow in the embodiment of the present invention is described below, referring to Fig. 2, the present invention is real CDN switching methods one embodiment in example is applied to include:
201st, client calculates smooth angle value according to broadcast information;
In video display process, the broadcast information of client real-time statistics video, wherein broadcast information includes client Duration, interim card number and interim card duration etc. are watched, is not limited herein specifically.After client obtains broadcast information, according to smoothness The calculation formula of degree calculates smooth angle value in real time.
202nd, user end to server sends the first request;
After smooth angle value is calculated in client, smooth angle value is compared with predetermined threshold value, when smooth angle value is less than During predetermined threshold value, user end to server sends the first request, to be switched to first object CDN to request server request, In, first object CDN is the CDN that client is currently located quality top ranked in region i.e. target area, it can be understood as, First object CDN is top-quality CDN in client region.
203rd, client is switched to first object CDN.
After user end to server sends the first request, client is switched to first object CDN, and uses the first object CDN plays video.
In the embodiment of the present invention, client calculates smooth angle value according to broadcast information, when wherein broadcast information includes viewing Long, interim card number and interim card duration, broadcast information are obtained by client dynamic statistics, if the smoothness angle value is less than predetermined threshold value, Then user end to server sends the first request, to be switched to first object CDN, wherein first object CDN to server request For the highest CDN of quality in target area, and target area is the region that client is currently located, and client is switched to the first mesh Mark CDN.In the embodiment of the present invention, client determines that the smooth angle value of current video less than after predetermined threshold value, is asked to server The highest CDN of quality in target area i.e. first object CDN is switched to, therefore client can be according to current broadcast information dynamic Switch CDN, ensure that fluency when user watches video, improve the user experience of video playing.
Above-described embodiment is illustrated the embodiment of the present invention from client-side, below from server end to of the invention real Example is applied to illustrate.Referring specifically to Fig. 3, another embodiment of CDN switching methods includes in the embodiment of the present invention:
301st, server receives the first request that client is sent;
In video display process, when frequent interim card, fluency low-down situation occurs in video, server receives client The first request that end is sent, first request are used to ask to be switched to first object CDN, wherein, first object CDN is client End is currently located the CDN of quality top ranked in region i.e. target area, you can be interpreted as, first object CDN is client Top-quality CDN in region.
302nd, server sends CDN ranking informations to the client.
After server receives the first request of client transmission, server sends CDN ranking informations to client, wherein CDN ranking informations include being located at the title of CDN of target area and CDN mass rankings, so that client is switched to the CDN Top-quality first object CDN in client region in ranking information.
In the embodiment of the present invention, after server receives the first request of client transmission, CDN rows are had sent to client Name information, enables client to select top-quality first object in active client region from the CDN ranking informations CDN is switched over, thus client can according to current broadcast information switching at runtime CDN, ensure that user watch video when Fluency improves the user experience of video playing.
Above-mentioned two embodiment respectively illustrates the embodiment of the present invention from the angle of client and server end, under Face illustrates the embodiment of the present invention by interactive embodiment.Referring specifically to Fig. 4, CDN is cut in the embodiment of the present invention The one embodiment for changing method includes:
401st, client receives the cycles per instruction that Video service quotient sends;
Before video is played, client receives the cycles per instruction that Video service quotient sends, which is used to indicate visitor Family end sends a request for the CDN mass ranking informations of client region every a during cycle to server, makes When the fluency of proper video reduces, client can switch to the preferable CDN of quality.It should be noted that in practical application In, during cycle can be 10 minutes or 15 minutes, and therefore, the duration of specific during cycle does not limit specifically herein It is fixed.
402nd, server receives the second request that the client is sent;
For client when opening a video, server receives the second request that client is sent, which is used for Third target CDN is asked to play the video, wherein, third target CDN is quality in current time in client region Best CDN.
403rd, server is according to the network address of the second acquisition request to client;
After server receives the second request of client transmission, the network of client is carried in being asked due to second Location, therefore server gets the network address of the client from second request.
It should be noted that in practical application, server obtains the mode of the network address of client except through second The network address of the client carried in request, also various ways, such as client are sending the second request to server Meanwhile address information is sent to server, server knows the network address of client by the address information.Therefore, it services The mode that device obtains the network address of client does not limit specifically herein.
404th, server is locally determining target area according to network address;
After server gets the network address of client, the network address is found in the local database and is specifically contained in In which region, that is, determine the target area where client.
It should be noted that in practical applications, server determines that the mode of target area exists except through network address Lookup is outer in local data base, also other modes, for example, after server gets the network address of client, to operator Equipment sending zone inquiry request, the Provider Equipment to be asked to send the region information of client, the wherein region is looked into Ask the network address that client is carried in request, the region for the client that server is sent by receiving Provider Equipment Information determines target area.Therefore server determines that the mode of target area does not limit specifically herein.
405th, server determines third target CDN in CDN ranking informations;
After server determines target area, the corresponding CDN in target area is found in total CDN ranking informations, it is clear that CDN ranking informations are contained in total CDN ranking informations.Wherein, total CDN ranking informations include CDN regions, CDN titles and CDN mass rankings, therefore server determines the corresponding CDN in target area according to total CDN ranking informations, i.e., CDN ranking informations are determined, and determine top ranked, that is, top-quality CDN as third target from the CDN ranking informations CDN makes client that third target CDN preferentially be selected to play out in video playing.For example, total CDN ranking informations such as table 1 When shown, when server determines client in 2 position of region, therefore the CDN rankings that server is got when opening video are CDN2, CDN4, CDN1, it is 95,80,40 that scoring, which is corresponding in turn to, then preferentially CDN2 can be selected to be broadcast when playing video It puts.
Table 1
It is understood that the CDN mass ranking in CDN ranking informations can be the ranking of CDN quality scores, quality is got over Good, score is higher, such as the ranking of 100,90,85 or CDN credit ratings, is represented with English alphabet, such as A, B, C, Top-quality CDN grades are set as A, and the second-best CDN grades of quality are set as B, postpone successively;Or with Arabic numerals table Show, such as 1,2,3, top-quality CDN grades are set as 1, and the second-best CDN grades of quality are set as 2, postpone successively, therefore CDN matter The mode of amount ranking does not limit specifically herein.
406th, client calculates smooth angle value according to broadcast information;
During third target CDN is used to play video, the broadcast information of client real-time statistics user, wherein, Broadcast information includes smooth angle value, viewing duration, interim card number and interim card total duration, and after broadcast information is obtained, according to such as Lower formula calculates smooth angle value:
L=100*Tm/(2*(2*C+Tn)+Tm);
L is smooth angle value;TmTo watch duration;C is interim card number;TnFor interim card total duration.Pass through the formula, you can meter Calculate smooth angle value.
It is understood that mathematical formulae can be with equivalence replacement, therefore it can calculate and flow there are many formula in practical application Smooth angle value, such as L=100*Tm/(2*(2*C+Tm-Tp)+Tm), in the formula, TpThe playing duration that expression video is shown, L, C, TmThe meaning of expression is constant, and details are not described herein again.Therefore, the specific formula for calculating smooth angle value does not limit specifically herein.
407th, client obtains the corresponding minimum network speed of current video code check and current network speed;
After smooth angle value is calculated according to broadcast information in client, when smooth angle value is less than predetermined threshold value, i.e. client End frequent interim card when playing video, before switching CDN is determined whether, the reason of client need to determine to lead to interim card.Due to It is of poor quality including the relatively low and currently used CDN of current network speed the reason of multiple interim card occur, therefore forward sight is worked as in client acquisition Frequency code rate, and find out current video code in the correspondence required in the video code rate in local data base and minimum network speed The corresponding minimum network speed of rate, and should before the corresponding minimum network speed of video code rate be compared with current network speed, if working as forward sight The corresponding minimum network speed of frequency code rate is more than current network speed, then client judgement is that the reason of network speed is relatively low causes video playing to occur Interim card;If the corresponding minimum network speed of current video code check is not more than current network speed, client judgement is currently used CDN matter Amount difference causes video playing interim card occur.For example, video code rate and the correspondence of minimum network speed requirement are as shown in table 2, if The video code rate of active user's viewing is 500, and the minimum network speed of the energy load video code rate is 400K/s, if client is got Current network speed is 200K/s, minimum network speed 400K/s corresponding less than corresponding video code rate 500, therefore client judges that network speed is too low Video playing is caused interim card occur.
Table 2
Code check Minimum network speed
100 50K/s
500 400K/s
1000 8000K/s
It is understood that in practical applications, the correspondence of video code rate and the requirement of minimum network speed can pass through table The form of lattice shows, and can also be showed by the form or column format of text, not limited herein specifically.
408th, client determines to need to switch CDN;
After client obtains the corresponding minimum network speed of current video code check and current network speed, if current video code check is corresponding Minimum network speed is less than current network speed, therefore it is not network speed problem to lead to play the low i.e. video of fluency the reason of interim card occur, therefore Client determines that the CDN that current video broadcasting uses is second-rate, needs to switch CDN, to allow video being capable of smooth playing.
409th, user end to server sends the first request;
Client is determined after needing to switch CDN, and the first request is sent to server, to be switched to request server request First object CDN, wherein, first object CDN is that client is currently located quality top ranked in region i.e. target area CDN, it can be understood as, first object CDN is top-quality CDN in client region.
Wherein, it should be noted that user end to server sends the trigger condition of the first request in addition to including because current The CDN poor quality used causes video playing interim card occur, client is further included when playing video, every a preset week Phase sends the first request to server, to obtain the CDN ranked lists in the current region, declines to work as video playing fluency It is that can switch to the preferable CDN of quality.That is, client is true every a during cycle or client when playing video It is that when causing since currently used CDN is second-rate, can all trigger user end to server to determine the reduction of video playing fluency The first request is sent, therefore is not limited herein specifically.
410th, client receives the CDN ranking informations that server is sent;
After user end to server sends the first request, client receives the CDN ranking informations that server is sent, to work as When the smooth angle value of video playing declines, the preferable CDN of quality can switch to.
411st, client caches CDN ranking informations to local;
After client receives the CDN ranking informations of server transmission, the CDN ranking informations got are cached to this Ground, it should be noted that asked since client sends one time first every a during cycle to server, client The newer CDN ranking informations of server transmission can be received, therefore be buffered in local CDN rankings every a during cycle Information can also be updated replacement accordingly.
412nd, client is switched to first object CDN;
Step 412 in the embodiment of the present invention is similar with the step 203 in Fig. 2, and specific details are not described herein again.
413rd, client sequentially switches to the second target CDN successively according to CDN mass rankings;
Since the quality of CDN and the current bandwidth in each region, the online user number in each region, CDN service quotient are in each region The factors such as interstitial content it is related, therefore the quality of CDN is changed at any time, therefore within a fresh information period, CDN Ranking information does not change, but the dynamic mass of CDN changes leads to the situation of practical ranking variation.
Therefore, within primary update CDN information cycles, when the currently used first object CDN of client is that CDN rankings are believed In breath in client region during the CDN of top ranked, and client is in the smoothness for using first object CDN but video playing When degree is less than predetermined threshold value, client is switched in client region the high CDN that is number two, if client is switched to this It is number two after high CDN, when the fluency of video playing is still less than predetermined threshold value, client is switched to again where client High CDN......, that is, the client of third sequentially switches to smoothnesses of second target CDN when video playing successively in region For degree not less than predetermined threshold value, wherein second target CDN is the client region i.e. CDN of target area.
414th, client judges whether the fluency of video during the second target CDN is less than predetermined threshold value, if so, performing step Rapid 415;If it is not, then perform step 416;
After client has calculated the smooth angle value using video playing during the second target CDN, by the smoothness angle value and in advance If threshold value is compared, if the smoothness angle value is less than predetermined threshold value, step 415 is performed;If the smoothness angle value is not less than default Threshold value then performs step 416.
415th, client switches to first object CDN;
The smooth angle value of video playing is less than after predetermined threshold value when client is determined using the second target CDN, client Switch to first object CDN.For example, within the once update CDN ranking information periods, if the currently used CDN of client is CDN1, CDN mass ranking is CDN1, CDN2, CDN3, CDN4 in client current region, and client is broadcast using CDN1 When putting, current smooth angle value is switched to CDN2 less than predetermined threshold value 70, then client, if after client confirmation is switched to CDN2 Fluency is switched to CDN3 again below threshold value 70, then client, if being still less than threshold value 70 using smoothness angle value during CDN3, CDN4 is switched to, if after client is switched to CDN4, determining that smoothness angle value still is below threshold value 70, then client switches to CDN1, and before CDN ranking informations are updated next time, no longer switch CDN, i.e., video is played using first object CDN always.
It is understood that after CDN ranking informations are had updated for the second time, can be switched to from the CDN being being currently used The CDN of top ranked in current CDN ranking informations.For example, after CDN ranking informations are updated, CDN mass rankings become CDN3, CDN2, CDN1, CDN4, then client switch to CDN3 from CDN1 so as to smooth broadcasting video.
416th, client selects the second target CDN to play out.
The smooth angle value of video playing is not less than after predetermined threshold value when client is determined using the second target CDN, client End selects the second target CDN to play video.
In the embodiment of the present invention, minimum network speed and current network speed required by the code check played by comparing current video, It is determined that the reason of leading to video playing interim card is of poor quality for currently used CDN, and provides in once update CDN information week In phase, smoothness angle value remains unchanged less than the mode of operation of predetermined threshold value when playing video using first object CDN, makes implementation of the present invention Example step is more improved comprehensive.
The CDN switching methods in the embodiment of the present invention are illustrated in above example, below from following aspects The device of the embodiment of the present invention is illustrated.
Referring to Fig. 5, one embodiment of client includes in the embodiment of the present invention:
Computing unit 501, for calculating smooth angle value according to broadcast information, broadcast information includes viewing duration, interim card time Number and interim card duration, broadcast information are counted to obtain by client;
First transmitting element 502, if smooth angle value is asked, first less than predetermined threshold value for sending first to server For being switched to first object CDN to server request, first object CDN is quality top ranked in target area for request CDN, target area is the region that is currently located of client;
Switch unit 503, for being switched to first object CDN.
In the embodiment of the present invention, computing unit calculates smooth angle value according to broadcast information, and wherein broadcast information includes viewing Duration, interim card number and interim card duration, broadcast information are obtained by client dynamic statistics, if the smoothness angle value is less than default threshold Being worth, then the first transmitting element sends the first request to server, to be switched to first object CDN to server request, wherein the One target CDN is the highest CDN of quality in target area, and target area is the region that client is currently located, and client is cut Change to first object CDN.In the embodiment of the present invention, client determines that the smooth angle value of current video less than after predetermined threshold value, is cut It changes unit and is switched to the highest CDN of quality in target area i.e. first object CDN to server request, therefore client being capable of basis Current broadcast information switching at runtime CDN ensure that fluency when user watches video, improve the user's body of video playing It tests.
For ease of understanding, the client in the embodiment of the present invention is described in detail below, please refers to 6, the present invention is real Another embodiment of client in example is applied to include:
Computing unit 601, for calculating smooth angle value according to broadcast information, broadcast information includes viewing duration, interim card time Number and interim card duration, broadcast information are counted to obtain by client;
First transmitting element 602, if smooth angle value is asked, first less than predetermined threshold value for sending first to server For being switched to first object CDN to server request, first object CDN is quality top ranked in target area for request CDN, target area are the region that client is currently located;
Switch unit 603, for being switched to first object CDN.
In the embodiment of the present invention, client further includes:
First receiving unit 604, for receiving the cycles per instruction of Video service quotient transmission, cycles per instruction is used to indicate client CDN mass rankings when end plays video every from a during cycle to server acquisition target area.
In the embodiment of the present invention, computing unit 601 may further include:
Computing module 6011, for calculating smooth angle value as follows:
L=100*Tm/(2*(2*C+Tn)+Tm)
L is smooth angle value;
TmTo watch duration;
C is interim card number;
TnFor interim card total duration.
In the embodiment of the present invention, client may also include:
Second receiving unit 605, for receiving the CDN ranking informations of server transmission, CDN ranking informations include being located at mesh Mark the title of CDN in region and quality ranking;
Buffer unit 606, for caching CDN ranking informations to local.
In the embodiment of the present invention, client may also include:
First switch unit 607, if current smooth angle value less than predetermined threshold value, for according to CDN mass rankings, successively Sequence switches to the second target CDN, the second target CDN and is located at target area;
Second switch unit 608, if using the fluency of video during the second target CDN less than predetermined threshold value, for switching To first object CDN.
In the embodiment of the present invention, client may also include:
First acquisition unit 609, for obtaining the corresponding minimum network speed of current video code check and current network speed;
First determination unit 610, if minimum network speed is less than current network speed, for determining to need to switch CDN, to trigger visitor Family end is to the step of server the first request of transmission.
Referring to Fig. 7, one embodiment of server includes in the embodiment of the present invention:
Third receiving unit 701, during video playing, for receiving the first request of client transmission, the first request is used for Request is switched to first object CDN;
Second transmitting element 702, for sending CDN ranking informations to client, CDN ranking informations include first object CDN, first object CDN are the highest CDN of quality in target area, and target area is the region that client is currently located.
For ease of understanding, the server in the embodiment of the present invention is described in detail below, please refers to 8, the present invention is real Another embodiment of server in example is applied to include:
Third receiving unit 801, during video playing, for receiving the first request of client transmission, the first request is used for Request is switched to first object CDN, and first object CDN is the highest CDN of quality in target area, and target area is worked as client The region at preceding place;
Second transmitting element 802, for sending CDN ranking informations to client, CDN ranking informations include being located at target area The title of the CDN in domain and quality ranking.
In the embodiment of the present invention, server may also include:
4th receiving unit 803, before video playing, for receiving the second request of client transmission, the second request is used for Third target CDN is asked to play video;
Second acquisition unit 804, for the network address according to the second acquisition request to client;
Second determination unit 805, for locally determining target area according to network address;
Third determination unit 806, for determining that third target CDN, third target CDN are target in CDN ranking informations The CDN of quality top ranked in region.
The client and server in the embodiment of the present invention is described from the angle of modular functionality entity above, under Face is described the client in the embodiment of the present invention from the angle of hardware handles, referring to Fig. 9, in the embodiment of the present invention 900 one embodiment of client includes:
Input unit 901, output device 902, processor 903 and the (place in wherein the first interchanger 900 of memory 904 The quantity for managing device 903 can be one or more, in Fig. 9 by taking a processor 903 as an example).In some embodiments of the invention, Input unit 901, output device 902, processor 903 and memory 904 can by bus or other means connection, wherein, Fig. 9 In for being connected by bus.
Pass through the operational order that memory 904 is called to store, processor 903, for performing following steps:
Smooth angle value is calculated according to broadcast information, broadcast information includes viewing duration, interim card number and interim card duration, plays Information is counted to obtain by client;It is switched to first object CDN.
Pass through the operational order that memory 904 is called to store, output device 902, for performing following steps:
If smoothness angle value sends the first request, first asks to ask to server less than predetermined threshold value to server It asks and is switched to first object CDN, first object CDN is the CDN of quality top ranked in target area, and target area is the visitor The region that family end is currently located.
Referring to Fig. 10, one embodiment of server includes in the embodiment of the present invention:
Input unit 1001, output device 1002, processor 1003 and memory 1004 are (in wherein the first interchanger 1000 The quantity of processor 1003 can be one or more, in Figure 10 by taking a processor 1003 as an example).In some realities of the present invention It applies in example, input unit 1001, output device 1002, processor 1003 and memory 1004 can be by buses or other means even It connects, wherein, in Figure 10 for being connected by bus.
Pass through the operational order that memory 904 is called to store, input unit 1001, for performing following steps:
During video playing, the first request that client is sent is received, the first request is used to ask to be switched to first object CDN, first object CDN are the highest CDN of quality in target area, and target area is the region that client is currently located;
Pass through the operational order that memory 904 is called to store, output device 1002, for performing following steps:
CDN ranking informations are sent to client, CDN ranking informations include the title and quality of the CDN positioned at target area Ranking.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit can refer to the corresponding process in preceding method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of division of logic function can have other dividing mode, such as multiple units or component in actual implementation It may be combined or can be integrated into another system or some features can be ignored or does not perform.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit The component shown may or may not be physical unit, you can be located at a place or can also be distributed to multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also That each unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is independent product sale or uses When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme of the present invention is substantially The part to contribute in other words to the prior art or all or part of the technical solution can be in the form of software products It embodies, which is stored in a storage medium, is used including some instructions so that a computer Equipment (can be personal computer, server or the network equipment etc.) performs the complete of each embodiment the method for the present invention Portion or part steps.And aforementioned storage medium includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Embodiment is stated the present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding The technical solution recorded in each embodiment is stated to modify or carry out equivalent replacement to which part technical characteristic;And these Modification is replaced, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.

Claims (16)

1. a kind of CDN switching methods, which is characterized in that including:
Client calculates smooth angle value according to broadcast information, when the broadcast information includes viewing duration, interim card number and interim card Long, the broadcast information is counted to obtain by the client;
If the smoothness angle value, less than predetermined threshold value, the user end to server sends the first request, first request is used It is quality top ranked in target area in being switched to first object CDN, the first object CDN to server request CDN, the target area are the region that the client is currently located;
The client is switched to the first object CDN.
2. CDN switching methods according to claim 1, which is characterized in that the client is calculated according to broadcast information to flow Before smooth angle value, the method further includes:
The client receives the cycles per instruction that Video service quotient sends, and the cycles per instruction is used to indicate the client terminal playing CDN mass rankings during video every from a during cycle to the server acquisition target area.
3. CDN switching methods according to claim 1, which is characterized in that the client is calculated according to broadcast information to flow Smooth angle value includes:
The smooth angle value is calculated as follows:
L=100*Tm/(2*(2*C+Tn)+Tm)
The L is smooth angle value;
The TmTo watch duration;
The C is interim card number;
The TnFor interim card total duration.
4. CDN switching methods according to claim 1, which is characterized in that the user end to server sends first please After asking, the client is switched to before the first object CDN, and the method further includes:
The client receives the CDN ranking informations that the server is sent, and the CDN ranking informations include being located at the target The title of the CDN in region and quality ranking;
The client caches the CDN ranking informations to local.
5. CDN switching methods according to claim 1, which is characterized in that the client is switched to the first object After CDN, the method further includes:If current smooth angle value is less than the predetermined threshold value, the client is according to the CDN Quality ranking sequentially switches to the second target CDN, the second target CDN and is located at the target area successively;
If using the fluency of video during the second target CDN less than the predetermined threshold value, the client switches to described First object CDN.
6. CDN switching methods according to any one of claim 1 to 5, which is characterized in that the user end to server Before sending the first request, after the client calculates smooth angle value according to broadcast information, the method further includes:
The client obtains the corresponding minimum network speed of current video code check and current network speed;
If the minimum network speed is less than the current network speed, the client determines to need to switch CDN, to trigger the client The step of holding the first request described to server transmission.
7. a kind of CDN switching methods, which is characterized in that including:
During video playing, server receives the first request that client is sent, and first request is used to ask to be switched to first Target CDN, the first object CDN are the highest CDN of quality in target area, and the target area is current for the client The region at place;
The server sends CDN ranking informations to the client, and the CDN ranking informations include being located at the target area The title of CDN and quality ranking.
8. CDN switching methods according to claim 7, which is characterized in that server receives first that client is sent please Before asking, the method further includes:
Before the video playing, the server receives the second request that the client is sent, and second request is used for please Third target CDN is sought to play the video;
The server is according to the network address of second acquisition request to the client;
The server is locally determining the target area according to the network address;
The server determines that the third target CDN, the third target CDN are the mesh in the CDN ranking informations Mark the CDN of quality top ranked in region.
9. a kind of client, which is characterized in that including:
Computing unit, for calculating smooth angle value according to broadcast information, the broadcast information include viewing duration, interim card number and Interim card duration, the broadcast information are counted to obtain by the client;
First transmitting element, if the smoothness angle value is asked, described first less than predetermined threshold value for sending first to server Request is quality ranking in target area for being switched to first object CDN, the first object CDN to server request Highest CDN, the target area are the region that the client is currently located;
Switch unit, for being switched to the first object CDN.
10. client according to claim 9, which is characterized in that the client further includes:
First receiving unit, for receiving the cycles per instruction of Video service quotient transmission, the cycles per instruction is used to indicate the visitor CDN mass rankings when family end plays video every from a during cycle to the server acquisition target area.
11. client according to claim 9, which is characterized in that the computing unit includes:
Computing module, for calculating the smooth angle value as follows:
L=100*Tm/(2*(2*C+Tn)+Tm)
The L is smooth angle value;
The TmTo watch duration;
The C is interim card number;
The TnFor interim card total duration.
12. client according to claim 9, which is characterized in that the client includes:
Second receiving unit, for receiving the CDN ranking informations that the server is sent, the CDN ranking informations include being located at The title of the CDN of the target area and quality ranking;
Buffer unit, for caching the CDN ranking informations to local.
13. client according to claim 9, which is characterized in that the client includes:
First switch unit, if current smooth angle value less than the predetermined threshold value, for according to the CDN mass ranking, according to Secondary sequence switches to the second target CDN, the second target CDN and is located at the target area;
Second switch unit, if using the fluency of video during the second target CDN less than the predetermined threshold value, for switching To the first object CDN.
14. the client according to any one of claim 9 to 13, which is characterized in that the client further includes:
First acquisition unit, for obtaining the corresponding minimum network speed of current video code check and current network speed;
First determination unit, if the minimum network speed is less than the current network speed, for determining to need to switch CDN, with triggering The client to the server send it is described first request the step of.
15. a kind of server, which is characterized in that including:
Third receiving unit, during video playing, for receiving the first request of client transmission, first request is for asking First object CDN, the first object CDN are switched to as the highest CDN of quality in target area, the target area is described The region that client is currently located;
Second transmitting element, for sending CDN ranking informations to the client, the CDN ranking informations include being located at described The title of the CDN of target area and quality ranking.
16. server according to claim 15, which is characterized in that the server further includes:
4th receiving unit, before the video playing, for receiving the second request that the client is sent, second request For asking third target CDN to play the video;
Second acquisition unit, for the network address according to second acquisition request to the client;
Second determination unit, for locally determining the target area according to the network address;
Third determination unit, for the third target CDN determining in the CDN ranking informations, the third target CDN is The CDN of quality top ranked in the target area.
CN201611270789.8A 2016-12-30 2016-12-30 CDN switching methods, client and server Pending CN108270750A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611270789.8A CN108270750A (en) 2016-12-30 2016-12-30 CDN switching methods, client and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611270789.8A CN108270750A (en) 2016-12-30 2016-12-30 CDN switching methods, client and server

Publications (1)

Publication Number Publication Date
CN108270750A true CN108270750A (en) 2018-07-10

Family

ID=62770521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611270789.8A Pending CN108270750A (en) 2016-12-30 2016-12-30 CDN switching methods, client and server

Country Status (1)

Country Link
CN (1) CN108270750A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889569A (en) * 2019-01-03 2019-06-14 网宿科技股份有限公司 CDN service dispatching method and system
WO2020063372A1 (en) * 2018-09-29 2020-04-02 华为技术有限公司 Data transmission method and related apparatus
CN110971916A (en) * 2018-09-28 2020-04-07 武汉斗鱼网络科技有限公司 Live broadcast fluency monitoring method and system
CN111510734A (en) * 2020-04-17 2020-08-07 广州虎牙科技有限公司 CDN scheduling method, device, storage medium and equipment
CN111901362A (en) * 2020-08-11 2020-11-06 深圳墨世科技有限公司 Client dynamic CDN switching method and system
CN112423096A (en) * 2020-11-03 2021-02-26 上海哔哩哔哩科技有限公司 Playing optimization method and system
CN113038190A (en) * 2021-02-23 2021-06-25 北京达佳互联信息技术有限公司 Scheduling method and scheduling device for content delivery network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778104A (en) * 2009-12-29 2010-07-14 常州中流电子科技有限公司 System and method for playing stream media by using self-adaption bandwidth
CN103561354A (en) * 2013-10-29 2014-02-05 北京国双科技有限公司 Method and device for calculating and processing video smoothness
CN104754416A (en) * 2015-03-30 2015-07-01 北京奇艺世纪科技有限公司 Video playing method and video playing device
CN105578211A (en) * 2015-12-16 2016-05-11 深圳市网心科技有限公司 Live broadcast acceleration network stagnation optimization method and system based on infinite service node
CN105635755A (en) * 2015-12-30 2016-06-01 合一网络技术(北京)有限公司 Direct-broadcast flow transmission method and apparatus
CN106231365A (en) * 2016-08-18 2016-12-14 北京斗牛科技有限公司 A kind of dispatching method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778104A (en) * 2009-12-29 2010-07-14 常州中流电子科技有限公司 System and method for playing stream media by using self-adaption bandwidth
CN103561354A (en) * 2013-10-29 2014-02-05 北京国双科技有限公司 Method and device for calculating and processing video smoothness
CN104754416A (en) * 2015-03-30 2015-07-01 北京奇艺世纪科技有限公司 Video playing method and video playing device
CN105578211A (en) * 2015-12-16 2016-05-11 深圳市网心科技有限公司 Live broadcast acceleration network stagnation optimization method and system based on infinite service node
CN105635755A (en) * 2015-12-30 2016-06-01 合一网络技术(北京)有限公司 Direct-broadcast flow transmission method and apparatus
CN106231365A (en) * 2016-08-18 2016-12-14 北京斗牛科技有限公司 A kind of dispatching method and system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971916A (en) * 2018-09-28 2020-04-07 武汉斗鱼网络科技有限公司 Live broadcast fluency monitoring method and system
CN110971916B (en) * 2018-09-28 2022-02-08 武汉斗鱼网络科技有限公司 Live broadcast fluency monitoring method and system
WO2020063372A1 (en) * 2018-09-29 2020-04-02 华为技术有限公司 Data transmission method and related apparatus
CN110971432A (en) * 2018-09-29 2020-04-07 华为技术有限公司 Data transmission method and related device
US11477078B2 (en) 2018-09-29 2022-10-18 Huawei Technologies Co., Ltd. Data transmission method and related apparatus
CN109889569A (en) * 2019-01-03 2019-06-14 网宿科技股份有限公司 CDN service dispatching method and system
CN111510734A (en) * 2020-04-17 2020-08-07 广州虎牙科技有限公司 CDN scheduling method, device, storage medium and equipment
CN111901362A (en) * 2020-08-11 2020-11-06 深圳墨世科技有限公司 Client dynamic CDN switching method and system
CN112423096A (en) * 2020-11-03 2021-02-26 上海哔哩哔哩科技有限公司 Playing optimization method and system
CN113038190A (en) * 2021-02-23 2021-06-25 北京达佳互联信息技术有限公司 Scheduling method and scheduling device for content delivery network

Similar Documents

Publication Publication Date Title
CN108270750A (en) CDN switching methods, client and server
US11128582B2 (en) Emoji recommendation method and apparatus
US8485876B2 (en) Monitoring a sports draft based on a need of a sports team and the best available player to meet that need
US11291920B2 (en) Interaction interleaver
US9889382B2 (en) Scraping fantasy sports data
CN105100830B (en) A kind of device and method for being switched fast video source based on video aggregation service
US9734507B2 (en) Method and system for simulating recommendations in a social network for an offline user
US8357044B2 (en) Real-time display of fantasy sports player transaction data
US20080113812A1 (en) Game Scrap System, Game Scrap Method, and Computer Readable Recording Medium Recording Program for Implementing the Method
CN104469423B (en) A kind of virtual item delivery method and relevant device, system
US20170072321A1 (en) Highly interactive fantasy sports interleaver
US9278288B2 (en) Automatic generation of a game replay video
US10490010B2 (en) Method and system for evaluating and sharing media
US20160041998A1 (en) Apparatus and Methods for Personalized Video Delivery
CN107205178A (en) Direct broadcasting room recommends method and device
US10268747B2 (en) Reader application with a personalized feed and method of providing recommendations while maintaining user privacy
CN107172452A (en) Direct broadcasting room recommends method and device
WO2014190216A1 (en) Fantasy sports interleaver
CN108781300A (en) For method, system and medium based on Network status recommendation
WO2012078854A2 (en) Fantasy sport talent scout system and method therefore
US20150165329A1 (en) System and method for connecting users based on common interests, such as shared interests of representations of professional athletes
KR101783431B1 (en) Method for providing funding and consulting information related with entertainment by crowd funding system
CN111212328A (en) Bullet screen display method, bullet screen server and computer readable storage medium
CN106888381A (en) A kind of data resource storage method and device
CN106156351B (en) Multimedia resource recommendation information generation method and device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180710