CN111901362A - Client dynamic CDN switching method and system - Google Patents

Client dynamic CDN switching method and system Download PDF

Info

Publication number
CN111901362A
CN111901362A CN202010801622.XA CN202010801622A CN111901362A CN 111901362 A CN111901362 A CN 111901362A CN 202010801622 A CN202010801622 A CN 202010801622A CN 111901362 A CN111901362 A CN 111901362A
Authority
CN
China
Prior art keywords
cdn
client
list
detection
time
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.)
Granted
Application number
CN202010801622.XA
Other languages
Chinese (zh)
Other versions
CN111901362B (en
Inventor
马晓辉
李睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Moshi Technology Co ltd
Original Assignee
Shenzhen Moshi 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 Shenzhen Moshi Technology Co ltd filed Critical Shenzhen Moshi Technology Co ltd
Priority to CN202010801622.XA priority Critical patent/CN111901362B/en
Publication of CN111901362A publication Critical patent/CN111901362A/en
Application granted granted Critical
Publication of CN111901362B publication Critical patent/CN111901362B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • 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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer

Abstract

The invention discloses a client dynamic CDN switching method and a system, wherein the method comprises the following steps: reading a CDN detection list and a CDN ordered list of a local cache, checking the updating state of the CDN detection list, and reading the expiration time of the CDN ordered list; if the CDN detection list is not updated and the expiration time of the CDN ordered list does not exceed the current time, selecting an optimal CDN to play a video through the CDN ordered list, otherwise, sequentially detecting the CDN in the CDN detection list; the client uploads the detection result to the server; the server scores the detection results uploaded by the client, sorts the CDNs according to the scoring results, generates a CDN sorted list and returns the CDN sorted list to the client; and the client caches the CDN ordered list, sets expiration time for the CDN ordered list, and selects the optimal CDN to play the video. The invention can effectively exert the regional advantages of different CDNs and realize the flexible configuration of the CDNs.

Description

Client dynamic CDN switching method and system
Technical Field
The invention relates to the technical field of internet connection, in particular to a client dynamic CDN switching method and a system.
Background
Existing solutions for using a CDN (content delivery network) for a client mostly only use one CDN provider, which results in the following common problems:
1. the distribution of nodes of different CDN providers is different, and if only one CDN provider is set to be selected, access experience for users outside the CDN node coverage is easily affected, and therefore, the advantageous regions of different CDN providers cannot be integrated.
2. Switching the CDN online means that nodes accessed by all users change, which may cause that the access speed of some users becomes slower after using new CDN nodes.
Disclosure of Invention
The invention aims to provide a client dynamic CDN switching method and a client dynamic CDN switching system, and aims to solve the problems that the existing client CDN use scheme cannot effectively exert regional advantages of different CDN suppliers and a user cannot flexibly select an optimal CDN.
The embodiment of the invention provides a client dynamic CDN switching method, which comprises the following steps:
when a client is started, reading a CDN detection list of a local cache, checking the updating state of the CDN detection list, and reading the expiration time of the CDN detection list;
if the CDN detection list is not updated and the expiration time does not exceed the current time, selecting an optimal CDN to play a video through the CDN detection list, otherwise, sequentially detecting the CDN in the CDN detection list through a preloaded video;
the client uploads the detection result to the server;
the server side scores detection results uploaded by the client side according to predefined rules, sorts the CDNs according to the scoring results, generates a CDN sorted list and returns the CDN sorted list to the client side;
and the client caches the CDN ordered list, sets expiration time for the CDN ordered list, and selects the optimal CDN to play the video.
Further, the sequentially detecting the CDNs in the CDN detection list by preloading videos includes:
and the client side sequentially acquires and records CDN connectivity, DNS connection time consumption, network connection time consumption, TLS handshake time consumption, network transmission bandwidth and CDN cost of each CDN in the CDN detection list.
Further, the server scores the detection results uploaded by the client according to a predefined rule, and the method comprises the following steps:
and assigning corresponding scores according to the connectivity of the CDN and the total network connection time consumption, wherein the total network connection time consumption comprises the sum of DNS connection time consumption, network connection establishment time consumption, TLS handshake time consumption and network transmission bandwidth.
Further, the assigning a corresponding score according to the connectivity of the CDN and the total network connection time consumption includes:
when the CDN is not communicated, a corresponding CDN is endowed with a zero score; when the CDNs are connected, comparing the total network connection consumed time of the CDNs with a preset first threshold and a preset second threshold, if the total network connection consumed time is less than the first threshold, giving the corresponding CDN an excellent grade, if the total network connection consumed time is greater than or equal to the first threshold and less than the second threshold, giving the corresponding CDN an passing grade, and if the total network connection consumed time is greater than or equal to the second threshold, giving the corresponding CDN a failing grade, wherein the first threshold is less than the second threshold.
Further, the sorting the CDNs according to the scoring result includes:
arranging the CDN in the excellence level at the forefront, arranging the CDN in the passing level at the middle position, abandoning and replacing the CDN in the failing level with the pocketed CDN, and arranging the pocketed CDN at the rearmost;
for the CDNs at the excellent level, sorting is performed according to a rule from low cost to high cost;
sequencing the CDNs at the passing level according to a rule that the total network connection time consumption is from low to high;
further, the client caches the CDN ordered list, sets the expiration time for the CDN ordered list, and selects an optimal CDN to play a video, including:
controlling the validity period of the Cache of the CDN ordered list through a Cache-Control field of an HTTP protocol;
the method further comprises the following steps:
the client caches the detection result of the CDN detection list and controls the validity period of the Cache of the detection result through a Cache-Control field of the HTTP protocol;
the client regularly detects the CDN in the CDN detection list of the local cache, updates the detection result of the local cache, and uploads the detection result to the server.
Further, the client uploads the detection result to the server, including:
and attaching the information of the user to the detection result.
Further, the client dynamic CDN switching method further includes:
the server side performs cutting and grouping on corresponding client sides according to the information of the user to obtain an issued group and a non-issued group;
the server side issues a corresponding CDN ordered list for the client side of the issuing group, and does not issue the corresponding CDN ordered list for the non-issuing group;
and the server collects and sends the test data uploaded by the group client.
The embodiment of the invention provides a client dynamic CDN switching system, which comprises a client and a server;
the client is used for reading a CDN detection list of a local cache when starting, checking the updating state of the CDN detection list and reading the expiration time of the CDN detection list;
if the CDN detection list is not updated and the expiration time does not exceed the current time, selecting an optimal CDN to play a video through the CDN detection list, otherwise, sequentially detecting the CDN in the CDN detection list through a preloaded video;
the client uploads the detection result to the server;
the server is used for scoring the detection results uploaded by the client according to predefined rules, then sequencing the CDN according to the scoring results, generating a CDN sequencing list and returning the CDN sequencing list to the client;
the client is used for caching the CDN ordered list, setting expiration time for the CDN ordered list and selecting an optimal CDN to play videos.
Further, the client comprises a multi-CDN quality detection module and a multi-CDN cache module, and the server comprises a multi-CDN sequencing module and a multi-CDN configuration module;
the multi-CDN quality detection module is used for sequentially acquiring CDN connectivity, DNS connection time consumption, network connection time consumption, TLS handshake time consumption, network transmission bandwidth and CDN cost of each CDN in the CDN detection list and recording the CDN connectivity, DNS connection time consumption, network connection time consumption, TLS handshake time consumption, network transmission bandwidth and CDN cost.
The multi-CDN Cache module is used for controlling the validity period of the Cache of the CDN ordered list and the Cache of the detection result through a Cache-Control field of an HTTP protocol, regularly detecting the CDN in a CDN detection list of the local Cache and updating the detection result of the local Cache;
the multi-CDN sequencing module is used for scoring the detection results uploaded by the client according to a predefined rule, then sequencing the CDNs according to the scoring results and generating a CDN sequencing list;
the multi-CDN configuration module is used for performing cutting and grouping on corresponding client sides according to the information of the user to obtain an issuing group and a non-issuing group, and then issuing a corresponding CDN ordered list for the client sides of the issuing group and not issuing the corresponding CDN ordered list for the non-issuing group;
the multi-CDN configuration module is also used for collecting test data uploaded by the group issuing client.
The embodiment of the invention discloses a method and a system for switching a client dynamic CDN, wherein the method comprises the following steps: when a client is started, reading a CDN detection list of a local cache, and checking the update state and the expiration time of the CDN detection list; if the CDN detection list is not updated and is not overdue, selecting an optimal CDN to play a video through the CDN detection list, otherwise, sequentially detecting the CDN in the CDN detection list through a preloaded video; the client uploads the detection result to the server; the server side scores detection results uploaded by the client side according to predefined rules, sorts the CDNs according to the scoring results, generates a CDN sorted list and returns the CDN sorted list to the client side; and the client caches the CDN ordered list, sets expiration time for the CDN ordered list, and selects the optimal CDN to play the video. The invention can effectively exert the regional advantages of different CDNs and realize the flexible configuration of the CDNs.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a dynamic CDN switching method for a client according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a client dynamic CDN switching system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic flow chart of a client dynamic CDN switching method according to an embodiment of the present invention, and as shown in the drawing, the method includes steps S101 to S105:
s101, when a client is started, reading a CDN detection list and a CDN ordered list which are cached locally, checking the updating state of the CDN detection list, and reading the expiration time of the CDN ordered list;
s102, if the CDN detection list is not updated and the expiration time of the CDN ordered list does not exceed the current time, selecting an optimal CDN to play a video through the CDN ordered list, and otherwise, sequentially detecting the CDN in the CDN detection list through a preloaded video;
s103, the client uploads the detection result to a server;
s104, the server side scores detection results uploaded by the client side according to predefined rules, sorts the CDNs according to the scoring results, generates a CDN sorted list and returns the CDN sorted list to the client side;
s105, the client caches the CDN ordered list, sets expiration time for the CDN ordered list, and selects an optimal CDN to play a video.
In step S101, when the client starts, the CDN detection list and the CDN ordered list of the local cache are read, that is, when the client attempts to select an optimal CDN in the CDN ordered list, the quality of the CDN in the CDN detection list does not need to be redetected each time, and the CDN ordered list cached last time can be directly read, so that frequent invalid detection is avoided (because the CDN list is relatively stable). The CDN detection list and the cache of the CDN ordered list should be local cache results of a corresponding list that is delivered last time by the server, so in subsequent steps, the CDN ordered list requested by the client from the server and a new CDN detection list delivered by the server both need to be cached, and the latest cache result is used as a list read when the client starts.
Checking the updating state of the CDN detection list and the expiration time of the CDN sequencing list, and aiming at obtaining the updating information of the CDN detection list through the two actions and subsequently judging whether the CDN detection list is expired or not, so as to ensure that a client is configured to the optimal CDN.
In the step S102, if the CDN detection list is not updated and the expiration time of the CDN ordered list does not exceed the current time, selecting an optimal CDN to play a video through the CDN detection list, and otherwise, sequentially detecting the CDNs in the CDN detection list through a preloaded video.
In the embodiment of the invention, a client firstly judges whether the CDN detection list is updated or not, if yes, the CDN in the CDN detection list is sequentially detected through the preloaded video, if not, whether the CDN ordered list returned last time is overdue or not is judged, if yes, the CDN in the CDN detection list is sequentially detected through the preloaded video, and if not, the optimal CDN playing video is selected through the locally cached CDN ordered list.
The expiration time refers to that after the client caches the CDN ordered list, the client sets an expiration time for the CDN ordered list, so that the validity period of the CDN ordered list is controlled, and the CDN ordered list stored in the local is guaranteed to be a current newer sequencing result as far as possible. The server may issue a new CDN probe list to the client, so the client needs to determine whether the CDN probe list is updated.
The client dynamic CDN switching method further comprises the following steps:
the server side performs cutting and grouping on corresponding client sides according to the information of the user to obtain an issued group and a non-issued group;
the server side issues a corresponding CDN detection list for the client side of the issuing group, and does not issue the corresponding CDN detection list for the non-issuing group;
and the server collects and sends the test data uploaded by the group client.
It can be understood that the CDN detection list delivered by the server is flexible and configurable, supports various gray level rules, and is flexible in size. When a client requests a CDN detection list, a server can acquire parameters of the client, such as equipment ID, a located area, random factors and the like, and the server can decide which clients to issue different CDN detection lists or not to issue the CDN detection lists according to the parameters.
And the server side collects information of client sides in different areas and test data uploaded by the client sides in the CDN online configuration process, and then determines whether to promote according to the test data. For example, a new CDN provider is online, a server performs grouping according to user information during online configuration, then adds the CDN to an experiment of a gray level test, adds the CDN to a CDN detection list, and issues an updated CDN detection list for a certain grouped client. Therefore, the clients can detect that the CDN detection list is updated when being started, then the detection results of the clients to each CDN in the CDN detection list are collected, so that test data are obtained, and then next decision is made, such as whether large-area popularization and delivery are carried out or optimization test is carried out continuously. The above process is a gray level test process, that is, a small flow is used to perform a comparison test on the performance of different CDNs.
In an embodiment, the sequentially probing the CDNs in the CDN probing list by the preloaded video includes:
and the client side sequentially acquires and records CDN connectivity, DNS connection time consumption, network connection time consumption, TLS handshake time consumption, network transmission bandwidth and CDN cost of each CDN in the CDN detection list.
It can be understood that the client can quickly detect the quality of the CDNs in the given CDN detection list, and provide reference data for the server to rank the CDNs in the subsequent step S104.
The CDN connectivity refers to whether the CDN is connected or not, and has two possibilities: CDN connection and CDN disconnection. The time consumed by DNS connection refers to the time length for completing mapping between the domain name and the IP address. The time consumed for establishing the network connection refers to a traditional time period for establishing the network connection, the TLS handshake time is a time period for enabling a server and a client to transmit or receive data in an application protocol layer (such as HTTP, SMTP, and the like), the network transmission bandwidth refers to a data volume capable of being transmitted in unit time, and the cost of the CDN refers to a cost of the CDN.
In step S103, the client attaches the user information to the detection result, uploads the user information to the server, and requests a new CDN ordered list.
In step S104, the server scores the detection results uploaded by the client according to predefined rules, sorts the CDNs according to the scoring results, generates a CDN ordered list, and returns the CDN ordered list to the client.
In an embodiment, the server scores the detection results uploaded by the client according to a predefined rule, including:
and assigning corresponding scores according to the connectivity of the CDN and the total network connection time consumption, wherein the total network connection time consumption comprises the sum of DNS connection time consumption, network connection establishment time consumption, TLS handshake time consumption and network transmission bandwidth.
In fact, the basis of the scoring is data obtained when the client performs quality detection on the CDN detection list.
In an embodiment, the assigning a corresponding score according to the connectivity of the CDN and the total network connection time includes:
when the CDN is not communicated, a corresponding CDN is endowed with a zero score; when the CDNs are connected, comparing the total network connection consumed time of the CDNs with a preset first threshold and a preset second threshold, if the total network connection consumed time is less than the first threshold, giving the corresponding CDN an excellent grade, if the total network connection consumed time is greater than or equal to the first threshold and less than the second threshold, giving the corresponding CDN an passing grade, and if the total network connection consumed time is greater than or equal to the second threshold, giving the corresponding CDN a failing grade, wherein the first threshold is less than the second threshold.
For example, the first threshold is 800ms and set as the excellent line, the second threshold is 2000ms and set as the AND-grid line, and the following scoring rule may be set:
when the CDN is not connected, the score is zero;
when the CDN is connected to it,
making the total network connection time consumption equal to DNS connection time consumption + network connection establishment time consumption + TLS handshake time consumption + network transmission bandwidth;
when the total network connection time is less than 800ms, the network is on the excellent line, and the corresponding CDN is in an excellent grade;
when the total network connection time consumption is less than or equal to 800ms and less than 2000ms, the network connection is between the excellent line and the passing line, and the corresponding CDN is at the passing level;
when the total network connection time is more than or equal to 2000ms and is under the reach line, the corresponding CDN is in the failing level.
It should be noted that the unit of the network transmission bandwidth is data amount/unit time, which is different from the unit of the aforementioned connection time consumption, so the value of the network transmission bandwidth can be converted in advance, for example, into the consumed time/unit data, i.e., the time consumed for transmitting the unit data, so that the data can be calculated on the same dimension.
In an embodiment, the sorting the CDNs according to the scoring result includes:
arranging the CDN in the excellence level at the forefront, arranging the CDN in the passing level at the middle position, abandoning and replacing the CDN in the failing level with the pocketed CDN, and arranging the pocketed CDN at the rearmost;
for the CDNs at the excellent level, sorting is performed according to a rule from low cost to high cost;
sequencing the CDNs at the passing level according to a rule that the total network connection time consumption is from low to high;
namely, the ordering rule is:
placing the superior CDN in a first team, placing the passing CDN in a second team, abandoning the failing CDN and placing the bottom CDN in a third team;
and sequencing the CDNs in the first echelon according to a rule that the cost is from low to high, and sequencing the CDNs in the second echelon according to a rule that the total network connection time consumption is from low to high.
In step S105, when receiving the CDN ordered list returned by the server, the client caches the CDN ordered list first, sets an expiration time for the CDN ordered list, and finally selects an optimal CDN to play a video, where the CDN ordered list returned by the server is already the currently latest CDN ordered list, and therefore the CDN ordered list can be directly cached.
In one example, the client caches the CDN ordered list, sets the expiration time for the CDN ordered list, and selects an optimal CDN to play a video, including:
controlling the validity period of the Cache of the CDN ordered list through a Cache-Control field of an HTTP protocol;
the method further comprises the following steps:
the client caches the detection result of the CDN detection list and controls the validity period of the Cache of the detection result through a Cache-Control field of the HTTP protocol;
the client regularly detects the CDN in the CDN detection list of the local cache, updates the detection result of the local cache, and uploads the detection result to the server.
It can be understood that the CDN probe list is generally a relatively stable configuration, so that when a client starts, generally, the CDN probe list is not updated or changed, and therefore, it is only necessary to determine whether to re-probe a CDN in the CDN probe list according to whether the CDN ordered list is expired, so as to avoid frequent and ineffective probing. However, in order to ensure that the client selects the optimal CDN as far as possible within a certain period, the CDN needs to be periodically detected, then the detection result is cached locally and uploaded to the server, and the server can regenerate the CDN ordered list and send it to the client after receiving the detection result, so that the client selects the optimal CDN to play the video. That is to say, for the case that the CDN detection list is stable for a long time, the embodiment of the present invention may further adopt a policy of periodically re-detecting, that is, setting a fixed time interval, and the client will re-detect the local CDN detection list at intervals, and re-acquire information of the CDN in the list, so as to select an optimal CDN suitable for itself.
In order to conveniently Control the Cache validity period, the Cache-Control field of the HTTP protocol is used for controlling, and in addition, the Cache of the CDN ordered list returned by the server side is also controlled by the Cache-Control field of the HTTP protocol.
An embodiment of the present invention provides a client dynamic CDN switching system, as shown in fig. 2, which includes a client 202 and a server 201;
the client 202 is configured to read a locally cached CDN detection list when starting, check an update state of the CDN detection list, and read an expiration time of the CDN detection list;
the client 202 is further configured to select an optimal CDN playing video through the CDN detection list if the CDN detection list is not updated and the expiration time does not exceed the current time, and otherwise, sequentially detect the CDNs in the CDN detection list through a preloaded video;
the client 202 is further configured to upload the detection result to the server 201;
the server 201 is configured to score the detection result uploaded by the client 202 according to a predefined rule, sort the CDNs according to the scoring result, generate a CDN ordered list, and return the CDN ordered list to the client 202;
the client 202 is further configured to cache the CDN ordered list, set expiration time for the CDN ordered list, and select an optimal CDN to play a video.
For the technical details of the above system embodiment, reference may be made to the description of the foregoing method embodiment, which is not repeated herein.
The system provided by the invention enables the client to integrate a plurality of CDNs at the same time, integrates the network state of the client and the CDN cost of different manufacturers, selects the CDN with good network performance and lower cost, can adapt to the adjustment of the network state and the change of the CDN cost at any time, gives full play to the regional node advantages of different CDNs, and can realize flexible configuration.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A client dynamic CDN switching method is characterized by comprising the following steps:
when a client is started, reading a CDN detection list and a CDN ordered list which are cached locally, checking the updating state of the CDN detection list, and reading the expiration time of the CDN ordered list;
if the CDN detection list is not updated and the expiration time of the CDN ordered list does not exceed the current time, selecting an optimal CDN to play a video through the CDN ordered list, otherwise, sequentially detecting the CDN in the CDN detection list through a preloaded video;
the client uploads the detection result to the server;
the server side scores detection results uploaded by the client side according to predefined rules, sorts the CDNs according to the scoring results, generates a CDN sorted list and returns the CDN sorted list to the client side;
and the client caches the CDN ordered list, sets expiration time for the CDN ordered list, and selects the optimal CDN to play the video.
2. The method for dynamically switching CDNs on a client according to claim 1, wherein the sequentially probing the CDNs in the CDN probe list by the preloaded video includes:
and the client side sequentially acquires and records CDN connectivity, DNS connection time consumption, network connection time consumption, TLS handshake time consumption, network transmission bandwidth and CDN cost of each CDN in the CDN detection list.
3. The client dynamic CDN switching method of claim 2, wherein the server scores the probe results uploaded by the client according to a predefined rule, including:
and assigning corresponding scores according to the connectivity of the CDN and the total network connection time consumption, wherein the total network connection time consumption comprises the sum of DNS connection time consumption, network connection establishment time consumption, TLS handshake time consumption and network transmission bandwidth.
4. The method for dynamically switching the CDNs at the clients according to claim 3, wherein the assigning the corresponding scores according to the connectivity of the CDN and the total network connection time consumption comprises:
when the CDN is not communicated, a corresponding CDN is endowed with a zero score; when the CDNs are connected, comparing the total network connection consumed time of the CDNs with a preset first threshold and a preset second threshold, if the total network connection consumed time is less than the first threshold, giving the corresponding CDN an excellent grade, if the total network connection consumed time is greater than or equal to the first threshold and less than the second threshold, giving the corresponding CDN an passing grade, and if the total network connection consumed time is greater than or equal to the second threshold, giving the corresponding CDN a failing grade, wherein the first threshold is less than the second threshold.
5. The method for client dynamic CDN switching as recited in claim 4, wherein the sorting CDNs according to scoring results comprises:
arranging the CDN in the excellence level at the forefront, arranging the CDN in the passing level at the middle position, abandoning and replacing the CDN in the failing level with the pocketed CDN, and arranging the pocketed CDN at the rearmost;
for the CDNs at the excellent level, sorting is performed according to a rule from low cost to high cost;
for the CDNs at the passing level, the ordering is performed according to a rule that the total network connection time consumption is from low to high.
6. The method for dynamically switching the CDNs at the clients according to claim 1, wherein the caching of the CDN ordered list by the client, the setting of the expiration time for the CDN ordered list, and the selection of an optimal CDN for playing a video comprises:
controlling the validity period of the Cache of the CDN ordered list through a Cache-Control field of an HTTP protocol;
the method further comprises the following steps:
the client caches the detection result of the CDN detection list and controls the validity period of the Cache of the detection result through a Cache-Control field of the HTTP protocol;
the client regularly detects the CDN in the CDN detection list of the local cache, updates the detection result of the local cache, and uploads the detection result to the server.
7. The client dynamic CDN switching method of claim 1, wherein the client uploads the probe result to the server, including:
and attaching the information of the user to the detection result.
8. The client dynamic CDN switching method of claim 7, further comprising:
the server side performs cutting and grouping on corresponding client sides according to the information of the user to obtain an issued group and a non-issued group;
the server side issues a corresponding CDN detection list for the client side of the issuing group, and does not issue the corresponding CDN detection list for the non-issuing group;
and the server collects and sends the test data uploaded by the group client.
9. A client dynamic CDN switching system is characterized by comprising a client and a server;
the client is used for reading a CDN detection list of a local cache when starting, checking the updating state of the CDN detection list and reading the expiration time of the CDN detection list;
the client is further used for selecting an optimal CDN to play a video through the CDN detection list if the CDN detection list is not updated and the expiration time does not exceed the current time, and otherwise, sequentially detecting the CDN in the CDN detection list through a preloaded video;
the client is also used for uploading the detection result to the server;
the server is used for scoring the detection results uploaded by the client according to predefined rules, then sequencing the CDN according to the scoring results, generating a CDN sequencing list and returning the CDN sequencing list to the client;
the client is further used for caching the CDN ordered list, setting expiration time for the CDN ordered list and selecting the optimal CDN to play videos.
10. The client dynamic CDN switching system of claim 9, wherein the client is configured to sequentially obtain CDN connectivity, time consumed for DNS connection, time consumed for establishing network connection, time consumed for TLS handshake, network transmission bandwidth, and CDN cost for each CDN in the CDN detection list, and record the time.
CN202010801622.XA 2020-08-11 2020-08-11 Client dynamic CDN switching method and system Active CN111901362B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010801622.XA CN111901362B (en) 2020-08-11 2020-08-11 Client dynamic CDN switching method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010801622.XA CN111901362B (en) 2020-08-11 2020-08-11 Client dynamic CDN switching method and system

Publications (2)

Publication Number Publication Date
CN111901362A true CN111901362A (en) 2020-11-06
CN111901362B CN111901362B (en) 2022-07-01

Family

ID=73228764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010801622.XA Active CN111901362B (en) 2020-08-11 2020-08-11 Client dynamic CDN switching method and system

Country Status (1)

Country Link
CN (1) CN111901362B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112672392A (en) * 2020-12-14 2021-04-16 武汉市烽视威科技有限公司 Content distribution method, device, equipment and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047696A (en) * 2006-03-27 2007-10-03 互联天下科技发展(深圳)有限公司 Network flow media data playing method and system
CN101834799A (en) * 2010-05-06 2010-09-15 工业和信息化部电信传输研究所 Selection method of server of mobile IPTV (Internet Protocol Television), client, server and system
CN102546226A (en) * 2010-12-08 2012-07-04 中国科学院声学研究所 Multi-node-based network service provision system and method
CN103312667A (en) * 2012-03-09 2013-09-18 华为技术有限公司 Information update method, device and system
CN107645525A (en) * 2016-07-21 2018-01-30 阿里巴巴集团控股有限公司 Detection processing, dispatching method and related device, the node of content distributing network
CN107948684A (en) * 2017-11-20 2018-04-20 广州虎牙信息科技有限公司 Direct broadcasting room video playing control method, device and server
CN108040085A (en) * 2017-11-20 2018-05-15 广州华多网络科技有限公司 Method for network access, device and server
CN108270750A (en) * 2016-12-30 2018-07-10 北京国双科技有限公司 CDN switching methods, client and server
CN108563499A (en) * 2018-04-27 2018-09-21 努比亚技术有限公司 CDN server switching method, mobile terminal and computer readable storage medium
KR102019654B1 (en) * 2018-10-02 2019-09-09 전남대학교산학협력단 Method for switching adaptive streaming server

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047696A (en) * 2006-03-27 2007-10-03 互联天下科技发展(深圳)有限公司 Network flow media data playing method and system
CN101834799A (en) * 2010-05-06 2010-09-15 工业和信息化部电信传输研究所 Selection method of server of mobile IPTV (Internet Protocol Television), client, server and system
CN102546226A (en) * 2010-12-08 2012-07-04 中国科学院声学研究所 Multi-node-based network service provision system and method
CN103312667A (en) * 2012-03-09 2013-09-18 华为技术有限公司 Information update method, device and system
CN107645525A (en) * 2016-07-21 2018-01-30 阿里巴巴集团控股有限公司 Detection processing, dispatching method and related device, the node of content distributing network
CN108270750A (en) * 2016-12-30 2018-07-10 北京国双科技有限公司 CDN switching methods, client and server
CN107948684A (en) * 2017-11-20 2018-04-20 广州虎牙信息科技有限公司 Direct broadcasting room video playing control method, device and server
CN108040085A (en) * 2017-11-20 2018-05-15 广州华多网络科技有限公司 Method for network access, device and server
CN108563499A (en) * 2018-04-27 2018-09-21 努比亚技术有限公司 CDN server switching method, mobile terminal and computer readable storage medium
KR102019654B1 (en) * 2018-10-02 2019-09-09 전남대학교산학협력단 Method for switching adaptive streaming server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SPIRIDON BAKIRAS: "Approximate Server Selection Algorithms in Content Distribution Networks", 《IEEE INTERNATIONAL CONFERENCE ON COMMUNICATION,2005.ICC2005》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112672392A (en) * 2020-12-14 2021-04-16 武汉市烽视威科技有限公司 Content distribution method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN111901362B (en) 2022-07-01

Similar Documents

Publication Publication Date Title
US10783077B2 (en) Managing resources using resource expiration data
CN102118376B (en) Content delivery network service device and content download method
CN102137006B (en) Data transmission method and equipment in CDN (Content Delivery Network)
CN107124630B (en) Method and device for node data management
CN108574685B (en) Streaming media pushing method, device and system
CN102238419B (en) Method and apparatus for playing live content
US20110082931A1 (en) Method, System And DNS Server For Load Balancing Network Servers
US20010051980A1 (en) Preloading content objects on content exchanges
US20100077099A1 (en) Intelligent content stream bandwidth determination
JP2007506296A (en) How to provide content to mobile web browsing devices
CN102065107A (en) Peer-to-peer universal content delivery network and content caching method
CN111901362B (en) Client dynamic CDN switching method and system
KR20030051429A (en) System for network addressing
JP2004509381A (en) Self-published network directory
CN110661862A (en) Method for preheating resource file and central management system
CN105653473B (en) Cache data access method and device based on binary mark
CN1937554A (en) Method for making P2P file download flow localized
CN103595743B (en) A kind of method, apparatus and system of downloading application software
US20190007522A1 (en) Method of optimizing traffic in an isp network
Luo et al. A trace-driven approach to evaluate the scalability of P2P-based video-on-demand service
CN113676514B (en) File source returning method and device
CN1316375C (en) Method, system and terminal for data network having distributed cache-memory
WO2001093533A2 (en) Preloading content objects on content exchanges
CA2413886A1 (en) Client side holistic health check
KR101565353B1 (en) Method for caching contents based on content request record and request priority and HTTP cache server using the method

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
GR01 Patent grant
GR01 Patent grant