Dynamic content delivery network switching method

By adding script code to the main server and monitoring the server in real time, the connection between the terminal and the CDN node can be dynamically adjusted, which solves the problem that the main server cannot effectively grasp the performance of the CDN operator, improves the content delivery speed and stability, and reduces operating costs.

WO2024239230A1PCT designated stage expired Publication Date: 2024-11-28WISE POINT SOLUTIONS TECH LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/095764
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2024-11-28

AI Technical Summary

Technical Problem

The inability of main server operators to effectively monitor the real-time performance of CDN operators leads to unstable service quality, which may result in customer churn and business losses.

Method used

By adding script code to the content provided by the main server, the monitoring server can monitor the connection speed and traffic between the terminal and the CDN node in real time, dynamically adjust the connection between the terminal and the best CDN node, and optimize the sorting and switching of CDN nodes.

Benefits of technology

It improved the speed and stability of content delivery, reduced service delays and the risk of end-user churn, and optimized operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023095764_28112024_PF_FP_ABST
    Figure CN2023095764_28112024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present invention is a dynamic content delivery network switching method. In the present invention, by using a monitoring server of a third party and by means of constructing a script program code in homepage content of content data, data delivery speeds of CDN nodes, which assist a master server in providing a content service, are dynamically obtained, and which CDN node has a relatively poor performance within an adjustment time period is determined accordingly, so as to notify each using terminal to adjust a connected CDN node within the next adjustment time period. In this way, by means of the present invention, a connection between a CDN node and a using terminal can be dynamically and effectively controlled, thereby increasing the sending speed of a content service which is provided by a master server.
Need to check novelty before this filing date? Find Prior Art

Description

Dynamic content delivery network switching method Technical Field

[0001] The present invention relates to a method for selecting the most advantageous Content Delivery Network (CDN), and more particularly to a method for dynamic CDN switching. Background Art

[0002] A CDN is an architecture that organizes edge servers distributed across different geographic locations, working together to provide fast delivery of internet content. Since the physical distance between the main server providing content information and the client terminal is not necessarily closer than these edge servers, the longer the physical distance between the two, the longer the information transmission time between the two, and the greater the chance of damage to the network infrastructure or signal transmission delays in the middle. Shorter transmission times mean faster service. Therefore, using CDN edge servers to cache content information provided by the main server to support the needs of nearby client terminals is the basic principle of CDN's provision of fast and high-quality content delivery to main server operators. In the era of information competition where traffic is king, using CDN for information transmission has become a mandatory requirement for content providers, social platform service providers, and even instant messaging service providers to improve customer satisfaction. Technical issues

[0003] In reality, there's more than one CDN operator offering primary server CDN services. Each CDN operator's ability to control responsiveness in specific regions (e.g., countries) varies due to differences in infrastructure construction and placement. Furthermore, even a CDN operator with excellent service quality in a region might be overwhelmed by a sudden surge in client demand, resulting in periods where the service quality of these high-quality CDNs falls short of that of lesser CDNs. However, primary server operators lack visibility into the performance of their partner CDNs, creating a potential risk: if client demands aren't met promptly through the existing CDN, users may lose confidence in the primary server operator's services and switch to competitors, resulting in irreparable commercial losses.

[0004] Generally speaking, primary server operators are aware of these risks and, in their commercial operations, contract with multiple CDN operators simultaneously, dynamically adjusting the CDN used for each time period and region based on past experience. However, these operational adjustments are based on historical parameters, or even the operator's subjective opinions. There is no verifiable data basis for whether the currently selected CDN can maximize the services provided by the primary server. To resolve this awkward dilemma, the present invention proposes a dynamic content delivery network switching method. Technical Solutions

[0005] This paragraph extracts and compiles certain features of the present invention. Other features will be disclosed in subsequent paragraphs. It is intended to cover various modifications and similar arrangements within the spirit and scope of the appended claims.

[0006] To solve the aforementioned problem, the present invention proposes a dynamic content delivery network switching method. The method comprises: a) adding a script code to a homepage content in the content data of an original domain provided by a main server, and caching a portion of the content data in multiple CDN (Content Delivery Network) nodes in a region, each CDN node generating a specific CDN URL for the portion of the content data; b) providing the homepage content to multiple user terminals connected to the domain, and designating one of the CDN nodes to provide the portion of the content data; c) running the script code on the browser of each user terminal to perform the following operations: maintaining a connection with a monitoring server; calculating the time difference between issuing a connection request and receiving the portion of the content data, as well as the time difference subsequently fed back when browsing other portions of the content data; and continuously and promptly transmitting any calculated time difference and the CDN URL of the connected CDN node to the monitoring server via the user terminal; and d) The monitoring server receives data transmitted from these user terminals and cyclically performs the following operations: classifying each user terminal according to the CDN website address it transmits, updating the transmission time difference for each user terminal in each category, and dynamically ranking them by percentile; calculating an average value of the latest transmission time difference of all user terminals in each category within an adjustment period, and optimizing these CDN nodes from small to large according to the average value of the corresponding CDN website address; and when the adjustment period ends, notifying all user terminals in the category whose average value is lower than a minimum set value to switch their connection to the CDN node with the best optimization ranking, or notifying all user terminals in any category whose time difference percentile ranking is lower than a threshold percentile value that the CDN node they switched their connection to is the best optimization ranking.

[0007] To solve the aforementioned problem, the present invention also proposes another method for dynamic content delivery network switching. The method includes: a) adding a script code to a homepage content in the content data of an original domain provided by a main server, and caching a portion of the content data in multiple CDN nodes in a region, each CDN node generating a specific CDN URL for the portion of the content data; b) providing the homepage content to multiple user terminals connected to the domain, and designating one of the CDN nodes to provide the portion of the content data; c) running the script code on the browser of each user terminal to perform the following operations: maintaining a connection with a monitoring server; continuously obtaining the download traffic of a stream information contained in the portion of the content data; and periodically transmitting the obtained download traffic and the CDN URL of the connected CDN node to the monitoring server via the user terminal; and d) The monitoring server receives data transmitted from these user terminals and cyclically performs the following operations: classifying each user terminal according to the CDN website address it transmits, updating the most recently transmitted download traffic for each user terminal in each category, and dynamically ranking them by percentile; calculating an average value of the most recently transmitted download traffic of all user terminals in each category within an adjustment period, and optimizing these CDN nodes from large to small according to the average value of the corresponding CDN website address; and when the adjustment period ends, notifying all user terminals in the category whose average value is lower than a minimum set value to switch their connection to the CDN node with the best optimization ranking, or notifying all user terminals in any category whose download traffic percentile ranking is lower than a threshold percentile value to switch their connection to the CDN node with the best optimization ranking.

[0008] In order to solve the aforementioned problem, the present invention also proposes another method for dynamic content delivery network switching. The method includes: a) adding a script program code to a homepage content in the content data of an original domain provided by a main server, and caching a portion of the content data in multiple CDN nodes in a region, each CDN node generates a specific CDN URL for the portion of the content data, wherein each CDN node is set with a weight value; b) for multiple user terminals connected to the domain, the main server provides the homepage content and designates one of the CDN nodes to provide the portion of the content data; c) running the script program code on the browser of each user terminal to perform the following operations: maintaining a connection with a monitoring server; calculating the time difference between issuing a connection request and receiving the portion of the content data, as well as the time difference fed back when browsing other portions of the content data; and continuously and promptly transmitting any calculated time difference and the CDN URL of the connected CDN node to the monitoring server via the user terminal; and d) The monitoring server receives data transmitted from these user terminals and cyclically performs the following operations: classifying each user terminal according to the CDN URL it transmits, updating the transmission time difference for each user terminal in each category, and dynamically ranking them by percentile; calculating an average value of the latest transmission time differences of all user terminals in each category within an adjustment period; and at the end of the adjustment period, notifying all user terminals in the category whose average value is lower than a minimum set value to switch their connection to the CDN node with the highest weight among other CDN nodes, or notifying all user terminals in any category whose time difference percentile ranking is lower than a threshold percentile value to switch their connection to the CDN node with the highest weight among other CDN nodes.

[0009] To solve the aforementioned problem, the present invention also proposes a dynamic content delivery network switching method. The method includes: a) adding a script code to a homepage content in the content data of an original domain provided by a main server, and caching a portion of the content data in multiple CDN nodes in a region, each CDN node generating a specific CDN URL for the portion of the content data, wherein each CDN node is assigned a weight value; b) for multiple user terminals connected to the domain, the main server provides the homepage content and designates one of the CDN nodes to provide the portion of the content data; c) running the script code on the browser of each user terminal to perform the following operations: maintaining a connection with a monitoring server; continuously obtaining the download traffic of a stream information contained in the portion of the content data; and periodically transmitting the obtained download traffic and the CDN URL of the connected CDN node to the monitoring server via the user terminal; and d) The monitoring server receives data transmitted from these user terminals and cyclically performs the following operations: classifying each user terminal according to the CDN website address it transmits, and updating the most recently transmitted download traffic for each user terminal in each category, and dynamically ranking them by percentile; calculating an average value of the most recently transmitted download traffic of all user terminals in each category within an adjustment period; and when the adjustment period ends, notifying all user terminals in the category whose average value is lower than a minimum set value to switch their connection to the CDN node with the highest weight value among other CDN nodes, or notifying all user terminals in any category whose download traffic percentile ranking is lower than a threshold percentile value to switch their connection to the CDN node with the highest weight value among other CDN nodes.

[0010] According to the present invention, the CDN node providing the portion of content data in step b) may be the best or the worst in the optimization ranking.

[0011] According to the present invention, the CDN node providing the portion of content material in step b) may also be the CDN node with the lowest operating cost or the CDN node with the highest operating cost.

[0012] According to the present invention, the script code further periodically transmits a connection confirmation signal to the monitoring server via the user terminal. If the monitoring server does not receive the connection confirmation signal after an offline delay period has elapsed after the user terminal is connected, the monitoring server determines that the corresponding user terminal is offline. At this time, the data transmitted from the corresponding user terminal to the monitoring server is no longer used for percentile ranking and calculation of the average value.

[0013] According to the present invention, the monitoring server further performs the following operations: counting the number of currently connected terminals at each CDN node and notifying the main server.

[0014] According to the present invention, the script code further performs the following operations: if the connected CDN node does not respond to a request, a connection failure message is sent to the monitoring server via the user terminal. Furthermore, the monitoring server further performs the following operations: during the adjustment period, calculating a failure rate based on the number of user terminals that sent connection failure messages relative to the total number of user terminals in that category; and at the end of the adjustment period, if the failure rate for a category exceeds a minimum allowable value, notifying all user terminals in that category to switch their connection to the CDN node with the best optimization ranking or the highest weight among other CDN nodes.

[0015] The present invention utilizes a third-party monitoring server, via script code embedded in the content's homepage, to dynamically obtain the data transmission speeds of CDN nodes that assist the main server in providing content services. Based on this information, the system determines which CDN node is performing poorly during a specific adjustment period, notifying each user terminal to adjust its connection to a different CDN node during the next adjustment period. This allows the present invention to dynamically and effectively control the connection between CDN nodes and user terminals, improving the delivery speed of content services provided by the main server. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] FIG1 is a flow chart of a method for dynamic content delivery network switching according to a first embodiment of the present invention;

[0017] FIG2 shows a hardware architecture for applying the dynamic content delivery network switching method;

[0018] FIG3 shows the classification and time difference of CDN URLs transmitted sequentially by each user terminal during an adjustment period;

[0019] FIG4 shows the change of the hardware architecture diagram after an adjustment period;

[0020] FIG5 shows the CDN website category, time difference, and connection failure message sent by each user terminal in sequence during the adjustment period;

[0021] 6 is a flow chart of a dynamic content delivery network switching method according to a second embodiment of the present invention;

[0022] 7 is a flow chart of a method for dynamic content delivery network switching according to a third embodiment of the present invention;

[0023] FIG. 8 is a flow chart of a dynamic content delivery network switching method according to a fourth embodiment of the present invention.

[0024] Description of Reference Numerals

[0025] 100 Master Server

[0026] 101 Monitoring Server

[0027] 110 First CDN Node

[0028] 120 Second CDN Node

[0029] 130 Third CDN Node

[0030] 201 First user terminal

[0031] 202 Second user terminal

[0032] 203 Third user terminal

[0033] 204 Fourth User Terminal

[0034] 205 Fifth User Terminal

[0035] 206 Sixth User Terminal

[0036] 207 Seventh User Terminal

[0037] 208 Eighth User Terminal

[0038] 209 Ninth User Terminal

[0039] 210 Tenth use terminal. Best Mode for Carrying Out the Invention

[0040] The present invention will be described in more detail with reference to the following embodiments.

[0041] Please see Figures 1 and 2. Figure 1 is a flow chart of a dynamic content delivery network switching method according to a first embodiment of the present invention, and Figure 2 illustrates the hardware architecture for implementing this method. The dynamic content delivery network switching method requires that a content service provider (providing static web content or dynamic streaming data, such as streaming video) deploy a portion of content data corresponding to an origin domain (pointing to the IP address of the primary server 100) on the primary server 100 in Figure 2 and cache it on multiple CDN nodes of CDN service providers in a region (indicated by the thick double arrows in Figure 2). A region refers to a geographic area where a specific population gathers and requires fast internet content, such as a country, state, province, region, or even an offshore island. Due to the physical distance between these regions and the location of the primary server 100, requests for content from the origin domain from a user terminal within the region (such as a smartphone, tablet, laptop, or desktop computer) will experience a long response time, potentially resulting in access failure. Therefore, content service providers lease the right to use CDN nodes from CDN service providers. CDN nodes are servers owned by CDN service providers. In this embodiment, a first CDN node 110, a second CDN node 120, and a third CDN node 130 are operated by three CDN service providers, respectively. In practice, there must be at least two CDN service providers to enable dynamic switching of content delivery networks. Similarly, the number of CDN nodes must also be at least two.

[0042] In this embodiment, the first step of the dynamic content delivery network switching method is to add a script code to the homepage content of the content data of an original domain provided by the main server 100, and cache and store a portion of the content data in multiple CDN nodes in a region. Each CDN node generates a specific CDN URL for this portion of the content data (S01). In practice, the script code is a set of JavaScript codes that can be provided by the operator of a monitoring server 101 to the content service operator of the main server 100, so that the content service operator can add the JavaScript code to the homepage content it provides, that is, the original code of the webpage that complies with the HTML standard. The homepage content is part or all of the content of the first page returned by the monitoring server 101 after a terminal connects to the original domain. For example, if the content service provided by the main server 100 is static news, and the homepage includes several textual content and several images, then the homepage content may be the entire homepage content, and the content of other pages is the so-called partial content data. The homepage content may also be only the layout structure of the homepage, and the text and images therein, as well as the content of other pages, are the so-called partial content data in step S01. The homepage content obtained by the terminal comes from the main server 100 and any CDN node respectively. After browsing the homepage content, the remaining content data will be provided by the corresponding CDN node, and the main server 100 will no longer function (as indicated by the double-arrow dashed line in Figure 2). Therefore, to achieve the aforementioned purpose, each CDN node will generate a specific CDN URL for the partial content data, and this CDN URL points to the physical IP location of the CDN node where the partial content data is stored.

[0043] The second step of the dynamic content delivery network switching method of this embodiment involves providing the homepage content to multiple user terminals connected to the network domain from the main server 100 and designating one of the CDN nodes to provide the portion of content data (S02). See Figure 2. For ease of illustration, this embodiment uses ten user terminals (a first user terminal 201, a second user terminal 202, a third user terminal 203, a fourth user terminal 204, a fifth user terminal 205, a sixth user terminal 206, a seventh user terminal 207, an eighth user terminal 208, a ninth user terminal 209, and a tenth user terminal 210) as an example. However, the actual number of user terminals in operation could reach tens of thousands or more simultaneously. At a certain point in time, the aforementioned user terminals each accessed the main server 100 and obtained the homepage content, including script code, provided by the main server 100 and the portion of content data provided by the designated CDN node. In this embodiment, the CDN node designated by first user terminal 201 and second user terminal 202 is first CDN node 110; the CDN node designated by third user terminal 203, fourth user terminal 204, fifth user terminal 205, and sixth user terminal 206 is second CDN node 120; and the CDN node designated by seventh user terminal 207, eighth user terminal 208, and ninth user terminal 209 is third CDN node 130. Tenth user terminal 210 accesses primary server 100 only after this point in time.

[0044] The third step of the dynamic content delivery network switching method of this embodiment is to execute the script code on the browser of each user terminal to perform multiple operations (S03). The script code monitors the effectiveness of CDN nodes through the browser operation of the user terminal without the user's notice. The first operation executed by the script code is to maintain a connection with the monitoring server 101. Although Figure 2 does not use arrows to represent the signal connection between the monitoring server 101 and each user terminal, each user terminal in the figure does maintain an uninterrupted connection with the monitoring server 101 while obtaining a portion of content data from its respective CDN node. The connection can be direct or through a specific CDN node. In addition, after execution, the script code can calculate the time difference between the user terminal initiating a connection request and receiving the corresponding portion of content data from the corresponding CDN node. For example, when a first user terminal 201 requests content from the primary server 100, the primary server 100 transmits the homepage containing the script code to the first user terminal 201 via the first CDN node 110. Simultaneously, the portion of content cached in the first CDN node 110 is also provided to the first user terminal 201. After the script code executes, it queries the browser logs on the first user terminal 201 to determine the duration of the entire process, for example, 1200 milliseconds, which is known as the time difference. Subsequently, during the script code's execution, it also calculates the time difference between subsequent responses from the first user terminal 201 (received portions of the content) when the first user terminal 201 browses other portions of the content. This is the time difference between the first user terminal 201 issuing the data retrieval request and receiving the corresponding portion of the content. This time difference can take two forms. According to the present invention, when the script code is executed, it will continuously and timely transmit any calculated time difference and the CDN URL of the connected first CDN node 110 to the monitoring server 101 via the first user terminal 201 for the monitoring server 101 to perform subsequent operations.

[0045] The fourth step of the dynamic content delivery network switching method of this embodiment involves monitoring server 101 receiving data transmitted from these user terminals and looping through multiple operations (S04). Using the example from the previous section, monitoring server 101 not only receives data such as the time difference and the CDN URL of first CDN node 110 from first user terminal 201, but also may receive time differences and corresponding CDN URLs from other user terminals, such as the time difference and the CDN URL of second CDN node 120 from third user terminal 203 and the time difference and the CDN URL of third CDN node 130 from seventh user terminal 207. User terminals 201 through 209 periodically send this data to monitoring server 101 for analysis. Therefore, monitoring server 101 loops through the following multiple operations, cyclically executing at an adjustment period. First, monitoring server 101 categorizes each user terminal according to the CDN URL it transmits. Within each category, monitoring server 101 updates the time difference transmitted for each user terminal and dynamically ranks them by percentile. For a better understanding of this, please see Figure 3, which lists the classification and time difference of CDN URLs transmitted sequentially by each user terminal during an adjustment period. According to the present invention, an adjustment period is a period of time used by monitoring server 101 to monitor the performance of each CDN node and adjust the time each user terminal uses the CDN node at the start of the next adjustment period. This can be any suitable continuous duration, such as 30 seconds, 45 seconds, or 60 seconds. The adjustment period in Figure 3 is set to 60 seconds. Figure 3 lists the time differences from each user terminal during this adjustment period. For example, the time difference transmitted by second user terminal 202 is 360 ms. The time received by monitoring server 101 is listed in parentheses after the time difference. For example, the 360 ​​ms from second user terminal 202 is received by monitoring server 101 0.2 seconds after the start of the adjustment period. Since first user terminal 201 and second user terminal 202 transmit the CDN URL of first CDN node 110, they are classified as category 1, and their time difference is outlined by a short dashed line. Similarly, the third through sixth user terminals 203 and 206 transmit the CDN URL of the second CDN node 120, classified as the second category, with their time differences outlined by a long dashed box. The seventh through ninth user terminals 207 and 209 transmit the CDN URL of the third CDN node 130, classified as the third category, with their time differences outlined by a dotted dashed box. In the first category, the percentage distribution is as follows: first user terminal 201 (50%) --> second user terminal 202 (100%). In the second category, although fifth user terminal 205 did not transmit any time differences during the adjustment period, as long as it maintains a connection with monitoring server 101, its time difference can use the most recent data, such as 330 ms.Therefore, the second category's percentile ranking is: sixth user terminal 206 (25%) --> third user terminal 203 (50%) --> fourth user terminal 204 (75%) --> fifth user terminal 205 (100%). In the third category, seventh user terminal 207 transmitted time differences twice during this adjustment period. Therefore, the second category has two percentile rankings in chronological order: seventh user terminal 207 (33%) --> ninth user terminal 209 (66%) --> eighth user terminal 208 (100%) and ninth user terminal 209 (33%) --> eighth user terminal 208 (66%) --> seventh user terminal 207 (100%). If subsequent judgment is necessary, the percentile ranking closer to the end of the adjustment period will be used.

[0046] Another task of monitoring server 101 is to calculate the average of the time differences between the latest transmissions of all terminals in each category during an adjustment period, and then optimize these CDN nodes by increasing the average value of their corresponding CDN URLs. See Figure 3 again. During this adjustment period, the average value for the first category was 350 ms, and the average value for the second category was 315 ms. The average value for the third category, which was the lowest, was 440 ms. Therefore, the optimized ranking is: second CDN node 120 (corresponding to the second category) -> first CDN node 110 (corresponding to the first category) -> third CDN node 130 (corresponding to the third category). Another task of monitoring server 101 is to switch connected CDN nodes at the end of the adjustment period. According to the present invention, there are two ways to switch connections: first, notify all terminals in the category whose average value is below a minimum set value that the CDN node to which they are connected is the best in the optimized ranking; second, notify all terminals in any category whose time difference percentile ranking is below a threshold value that the CDN node to which they are connected is the best in the optimized ranking. In the first switching method, if the minimum value is set to 450 ms, since all average values ​​are above the minimum value, each user terminal will maintain its connection to the same CDN node for the next 60 seconds. If the minimum value is set to 400 ms, and the average value of the third CDN node 130 is below 400 ms, the seventh user terminal 207, the eighth user terminal 208, and the ninth user terminal 209 connected to the third CDN node 130 will be notified to switch to the second CDN node 120 for the next 60 seconds, as shown in Figure 4. In the second switching method, if the threshold percentage is set to 80%, since the second CDN node 120 has the best optimization ranking, the second user terminal 202 in the first category and the seventh user terminal 207 in the third category, both of which have a percentile ranking below 80%, will be notified to switch to the second CDN node 120 for the next 60 seconds.

[0047] According to the present invention, at the beginning of a new adjustment period, if a new user terminal, such as the tenth user terminal 210, wishes to connect to the primary server 100, the tenth user terminal 210 must follow step S02 of the dynamic content delivery network method. In step S02, the primary server 100 designates the CDN node with the best or worst optimization ranking as the one to provide the content. In this embodiment, this could be the second CDN node 120 or the third CDN node 130. The purpose of selecting the best optimization ranking is to enable the tenth user terminal 210 to utilize the second CDN node 120's better service, or to allow the tenth user terminal 210 to serve as a "leader" to test whether the third CDN node 130's service has returned to standard within the next 60 seconds. The best or worst selection can be determined based on the primary server 100 operator's considerations. Furthermore, in step S02, the CDN node designated by the primary server 100 to provide the content could also be the CDN node with the lowest operating cost or the CDN node with the highest operating cost. Connecting to the CDN node with the lowest operating cost may result in a longer feedback delay, while connecting to the CDN node with the highest operating cost may result in the opposite. The operator of the main server 100 can set this according to the service commitment to the end user. In addition, the purpose of the main server 100 operator using the services of each CDN node is to optimize its own service, that is, to minimize the problem of losing the trust of end customers due to information transmission delays. To this end, the operator of the main server 100 must know the effectiveness of each CDN node. Therefore, the monitoring server 101 can further perform the following operations: count the number of terminals currently connected to each CDN node and report it to the main server 100. The time or frequency of the monitoring server 101's report is not limited by the present invention and can be set according to the needs of the main server 100 operator.

[0048] According to the present invention, the script code can also periodically transmit a connection confirmation signal to the monitoring server 101 via the user terminal. The connection confirmation signal can be a simple string, and its transmission time or frequency is not limited, for example, it can be sent every 30 seconds. If the monitoring server 101 does not receive the connection confirmation signal after an offline delay period has elapsed after connecting to the user terminal, the monitoring server 101 determines that the corresponding user terminal is offline. For example, the offline delay period can be set to 90 seconds. If no connection confirmation signal is received after 90 seconds, even if the script code believes that the user terminal is still connected to the monitoring server 101, the monitoring server 101 determines that the two are disconnected. At this point, the data transmitted by the corresponding user terminal to the monitoring server 101 is no longer used for percentile ranking and average calculation. If the disconnected user terminal wishes to reconnect to the monitoring server 101, it must reconnect to the main server 100 and execute step S02.

[0049] Sometimes, the connection between the user terminal and the CDN node may fail due to some unpredictable problems, such as power outages or insufficient bandwidth, resulting in the CDN node being unable to return the corresponding data to the request. In order to solve this problem, the script code can perform the following operations: If the connected CDN node does not respond to the request sent, a connection failure message is sent to the monitoring server 101 through the user terminal. The connection failure message can be a simple string with no limit on the form. Please see Figure 5, which is modified from Figure 3 and shows a list of CDN website categories, time differences and connection failure messages sent in sequence by each user terminal during the adjustment period. The connection failure message is represented by NG, and the time when the monitoring server 101 receives the connection failure message is listed in the brackets after it. In Figure 5, the monitoring server 101 receives the connection failure message sent by the second user terminal 202 at 36.7 seconds, and receives the connection failure message sent by the ninth user terminal 209 at 14.7 seconds. In contrast, monitoring server 101 further performs the following operations: A. During the adjustment period, calculate the failure rate of the number of user terminals that issued connection failure messages relative to the total number of user terminals in their category; B. At the end of the adjustment period, if the failure rate for a category exceeds a minimum allowable value, notify all user terminals in that category to switch their connection to the CDN node with the best optimization ranking. In operation A, the failure rate for the two user terminals in the first category is 50% because the second user terminal 202 experienced a connection failure; the failure rate for the user terminals in the second category is 0 because no connection failure occurred; and the failure rate for the three user terminals in the third category is 33% because the ninth user terminal 209 experienced a connection failure. In operation B, the result depends on the setting of the minimum allowable value. If the minimum allowable value is set to 25%, then all three user terminals in the third category will be notified to switch their connection to the CDN node with the best optimization ranking at the beginning of the next adjustment period.

[0050] In the first embodiment described above, the host server 100 using the dynamic content delivery network switching method provides static content data, which does not include streaming information. If the content data includes dynamic streaming information, such as streaming video, the dynamic content delivery network switching method requires some modifications. The following describes the second embodiment in conjunction with the architecture shown in Figure 3.

[0051] Please see Figure 6, which is a flow chart of a method for dynamic content delivery network switching according to a second embodiment of the present invention. The first step (S11) and the second step (S12) of this embodiment are essentially the same as the first step (S01) and the second step (S02) of the first embodiment, and are not further described here.

[0052] The third step of the dynamic content delivery network switching method in this embodiment involves running the script code on the browser of each user terminal to perform multiple operations (S13). The operations differ from the third step of the first embodiment. One difference is that while maintaining a connection with the monitoring server 101, the script code executes to continuously obtain the download traffic of the stream information contained in the portion of content data from the browser, rather than calculating the time difference between issuing a connection request and receiving the portion of content data, or the time difference between subsequent responses when browsing other portions of the content data. Let's use streaming video as an example. When the second CDN node 120 provides streaming video service to the third user terminal 203, the second CDN node 120 actually transmits the video data packets stored in its cache to the third user terminal 203 in sequence. Calculated, the download traffic can be measured in packets per second or megabits per second, both of which can be found in the browser's logs. The CDN node's service quality (return speed) can be reflected in the download traffic. Another difference lies in the script code's execution, which periodically transmits the acquired download traffic and the CDN URL of the connected CDN node to the monitoring server 101 via the user terminal. This is easy to understand, as the script code in the first embodiment, which determines the CDN node's service quality, now uses download traffic instead of time difference. Furthermore, because the second CDN node 120 continuously provides streaming video data packets, the download traffic also needs to be continuously monitored and updated.

[0053] The fourth step of the dynamic content delivery network switching method in this embodiment involves the monitoring server 101 receiving data transmitted from these user terminals and looping through multiple operations (S14). These operations differ from the fourth step of the first embodiment. In this embodiment, the monitoring server 101 categorizes each user terminal according to the CDN URL it transmits. Within each category, the monitoring server 101 updates the most recently transmitted download traffic for each user terminal and dynamically percentile-ranks the data. This is similar to the corresponding operation in the first embodiment, except that the percentile ranking is based on download traffic rather than time difference. The difference is that because download traffic is constantly updated, the percentile ranking is very fast. Next, the monitoring server 101 calculates the average of the most recently transmitted download traffic for all user terminals in each category within an adjustment period and optimizes the order of these CDN nodes by the corresponding CDN URLs, ranking them from highest to lowest based on this average. This operation is similar to the corresponding operation in the first embodiment. However, due to the large amount of download traffic data, the optimization operation can be performed near the end of the adjustment period. Finally, at the end of the adjustment period, monitoring server 101 can choose to notify all user terminals in the category whose average value is below a minimum set value that the CDN node to which they switched connections is the best in the optimization ranking. Alternatively, monitoring server 101 can notify all user terminals in any category whose download traffic percentage ranking is below a threshold value that the CDN node to which they switched connections is the best in the optimization ranking. The selection of the minimum set value and the threshold percentage value is as described above and will not be repeated here. Simply put, this embodiment notifies the corresponding user terminal of the CDN node to which they should switch connections based on the ranking, calculation, and comparison results of the download traffic, rather than the time difference.

[0054] The method mentioned in the first embodiment, in which the main server 100 designates the CDN node to provide the content in step S02, can also be applied to step S12. Furthermore, the interactive operation between the script code and the monitoring server 101 regarding connection confirmation signals and connection failure messages in the first embodiment is also applicable to this embodiment. Furthermore, in this embodiment, the monitoring server 101 can also count the number of terminals currently connected to each CDN node and report this to the main server 100.

[0055] When the primary server 100 using the dynamic CDN switching method provides static content, using time differences to determine CDN node performance does not necessarily require the user terminal connected to the worst-performing CDN node to be switched to the best-performing CDN node during the next adjustment period. Instead, the switching target can be selected based on business needs, such as lower cost. The following describes a third embodiment with the architecture shown in FIG3 .

[0056] Please see Figure 7, which is a flow chart of a dynamic content delivery network switching method according to a third embodiment of the present invention. The first step of this embodiment's dynamic content delivery network switching method involves inserting a script into a homepage within the content data of an original domain provided by the host server 100. A portion of the content data is cached and stored on multiple CDN nodes within a region. Each CDN node generates a specific CDN URL for the portion of the content data, and a weight value is assigned to each CDN node (S21). Compared to step S01 of the first embodiment, step S21 of this embodiment further assigns a weight value to each CDN node. For example, the first CDN node 110 has a weight value of 1, the second CDN node 120 has a weight value of 2, and the third CDN node 130 has a weight value of 3. The weight values ​​are selected based on commercial considerations, as described above. Furthermore, the weight values ​​of each CDN node may vary over time periods, such as hourly, daily, or weekly, based on commercial practices (e.g., contractual requirements).

[0057] The second step ( S22 ) and the third step ( S23 ) in this embodiment are substantially the same as the second step ( S02 ) and the third step ( S03 ) in the first embodiment, and are not described in detail here.

[0058] The fourth step of the dynamic content delivery network switching method in this embodiment involves the monitoring server 101 receiving data transmitted from these user terminals and looping through multiple operations (S24). The operations differ from step S04 of the first embodiment. In this embodiment, the monitoring server 101 categorizes each user terminal based on the CDN URL it transmits, updates the transmission time difference for each user terminal within each category, and dynamically percentile-ranks the transmissions. This is similar to the first embodiment. However, during an adjustment period, the monitoring server 101 only calculates the average of the most recently transmitted time differences for all user terminals in each category, without performing an optimized ranking. Therefore, at the end of the adjustment period, the monitoring server 101 notifies all user terminals in a category whose average value falls below a minimum set value to switch their connection to the CDN node with the highest weight among the other CDN nodes (the third CDN node 130), rather than the one with the best optimized ranking. Alternatively, the monitoring server 101 may notify all user terminals in any category whose time difference percentile ranking falls below a threshold value to switch their connection to the CDN node with the highest weight among the other CDN nodes. That is to say, no matter which user terminal receives poor service from the CDN node, the CDN node to which it is forwarded will not change for a period of time.

[0059] The method mentioned in the first embodiment, in step S02, where the primary server 100 specifies the CDN node to provide the content, can also be used in step S22, in addition to optimizing the ranking. Furthermore, the interactive operation between the script code and the monitoring server 101 in the first embodiment regarding connection confirmation and connection failure messages is also applicable in this embodiment. The CDN node to which the user terminal switches connection is simply changed from the one with the best optimization ranking to the one with the highest weight among the other CDN nodes. In this embodiment, the monitoring server 101 can also count the number of users currently connected to each CDN node and report this to the primary server 100.

[0060] When the primary server 100 using the dynamic content delivery network switching method provides dynamic content, determining the performance of the CDN node based on download traffic does not necessarily require the user terminal connected to the worst-performing CDN node to be adjusted to connect to the best-performing CDN node during the next adjustment period. The fourth embodiment is described below.

[0061] Please see Figure 8, which is a flow chart of a method for dynamic content delivery network switching according to a fourth embodiment of the present invention. The first step (S31) and the second step (S32) of this embodiment are identical to the first step (S01) and the second step (S02) of the third embodiment, respectively, and are not further described here.

[0062] The third step of the dynamic content delivery network switching method in this embodiment involves running the script code on the browser of each user terminal to perform multiple operations (S33). The operations differ from step S23 of the third embodiment. One difference is that while maintaining a connection with the monitoring server 101, the script code executes to continuously obtain the download traffic of a stream of information contained in the portion of content from the browser, rather than calculating the time difference between the two. Another difference is that the script code executes to periodically transmit the obtained download traffic and the CDN URL of the connected CDN node via the user terminal to the monitoring server 101. Please refer to the second embodiment for a description of this aspect.

[0063] The fourth step of the dynamic content delivery network switching method in this embodiment involves the monitoring server 101 receiving data transmitted from these user terminals and looping through multiple operations (S34). The operations differ from step S24 of the third embodiment. In this embodiment, the monitoring server 101 first categorizes each user terminal according to the CDN URL it transmits. Within each category, the monitoring server 101 updates the most recently transmitted download traffic for each user terminal and dynamically ranks them by percentile. Next, the monitoring server 101 calculates an average of the most recently transmitted download traffic for all user terminals in each category over an adjustment period. Finally, at the end of the adjustment period, the monitoring server 101 may choose to notify all user terminals in the category whose average falls below a minimum set value to switch to the CDN node with the highest weight among the other CDN nodes. Alternatively, the monitoring server 101 may notify all user terminals in any category whose download traffic percentile ranking falls below a threshold value to switch to the CDN node with the highest weight among the other CDN nodes. This embodiment replaces the time difference in the third embodiment with download traffic, and weight is the sole consideration for determining when a user terminal switches its connection to a CDN node.

[0064] Although the present invention has been disclosed in the form of embodiments as described above, it is not intended to limit the present invention. Any person skilled in the art may make slight changes, modifications and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be based on the claims.

Claims

1. A method for dynamically switching content delivery networks, characterized in that: include: a) adding a script code to a homepage content in content data of an original domain provided by a main server, and caching a portion of the content data in a plurality of CDN nodes in a region, each CDN node generating a specific CDN URL for the portion of the content data; b) providing the homepage content to multiple user terminals connected to the network domain by the main server, and designating one of the CDN nodes to provide the portion of content data; c) Run the script on each terminal’s browser to perform the following operations: Maintaining connection with a monitoring server; Calculate the time difference between sending out the connection request and receiving the content, as well as the time difference of subsequent feedback when browsing other content; and Continuously and timely transmit any calculated time difference and the CDN URL of the connected CDN node to the monitoring server via the user terminal; and d) The monitoring server receives data sent from these user terminals and executes the following operations in a loop: Classify each user terminal according to the CDN URL it transmits, and update the transmission time difference for each user terminal in each category, and dynamically rank them in percentiles; In an adjustment period, an average value of the time difference of the latest transmission of all the terminals in each category is calculated, and these CDN nodes are optimized in ascending order according to the average value of the corresponding CDN URLs; and When the adjustment period ends, all user terminals in the category whose average value is lower than a minimum set value are notified to switch their connections to the CDN node that has the best optimization ranking, or all user terminals in any category whose percentile ranking of time difference is lower than a threshold percentile value are notified to switch their connections to the CDN node that has the best optimization ranking.

2. A method for dynamically switching content delivery networks, characterized in that: include: a) adding a script code to a homepage content in content data of an original domain provided by a main server, and caching a portion of the content data in a plurality of CDN nodes in a region, each CDN node generating a specific CDN URL for the portion of the content data; b) providing the homepage content to multiple user terminals connected to the network domain by the main server, and designating one of the CDN nodes to provide the portion of content data; c) Run the script on each terminal’s browser to perform the following operations: Maintaining connection with a monitoring server; Continue to obtain the download traffic of a stream of information contained in the content data; and Regularly transmitting the obtained download traffic and the CDN website address of the connected CDN node to the monitoring server via the user terminal; and d) The monitoring server receives data sent from these user terminals and executes the following operations in a loop: Classify each user terminal according to the CDN URL it transmits, and update the most recently transmitted download traffic for each user terminal in each category, and dynamically rank them by percentile; In an adjustment period, an average value of the latest download traffic transmitted by all the terminals in each category is calculated, and these CDN nodes are optimized in descending order according to the average value of the corresponding CDN URLs; and When the adjustment period ends, all user terminals in the category whose average value is lower than a minimum set value are notified to switch their connections to the CDN node with the best optimization ranking, or all user terminals in any category whose download traffic percentage ranking is lower than a threshold percentage value are notified to switch their connections to the CDN node with the best optimization ranking.

3. A method for dynamically switching content delivery networks, characterized in that: include: a) adding a script code to a homepage content in content data of an original domain provided by a main server, and caching a portion of the content data in a plurality of CDN nodes in a region, each CDN node generating a specific CDN URL for the portion of the content data, wherein a weight value is set for each CDN node; b) providing the homepage content to multiple user terminals connected to the network domain by the main server, and designating one of the CDN nodes to provide the portion of content data; c) Run the script on each terminal’s browser to perform the following operations: Maintaining connection with a monitoring server; Calculate the time difference between sending out the connection request and receiving the content, as well as the time difference of subsequent feedback when browsing other content; and Continuously and timely transmit any calculated time difference and the CDN URL of the connected CDN node to the monitoring server via the user terminal; and d) The monitoring server receives data sent from these user terminals and executes the following operations in a loop: Classify each user terminal according to the CDN URL it transmits, and update the transmission time difference for each user terminal in each category, and dynamically rank them in percentiles; Calculate an average value of the time differences of the latest transmissions of all the terminals in each category within an adjustment period; and When the adjustment period ends, all the user terminals in the category whose average value is lower than a minimum set value are notified to switch their connections to the CDN node with the largest weight value among other CDN nodes, or all the user terminals in any category whose percentile ranking of time difference is lower than a threshold percentile value are notified to switch their connections to the CDN node with the largest weight value among other CDN nodes.

4. A method for dynamically switching content delivery networks, characterized in that: include: a) adding a script code to a homepage content in content data of an original domain provided by a main server, and caching a portion of the content data in a plurality of CDN nodes in a region, each CDN node generating a specific CDN URL for the portion of the content data, wherein a weight value is set for each CDN node; b) providing the homepage content to multiple user terminals connected to the network domain by the main server, and designating one of the CDN nodes to provide the portion of content data; c) Run the script on each terminal’s browser to perform the following operations: Maintaining connection with a monitoring server; Continue to obtain the download traffic of a stream of information contained in the content data; and Regularly transmitting the obtained download traffic and the CDN website address of the connected CDN node to the monitoring server via the user terminal; and d) The monitoring server receives data sent from these user terminals and executes the following operations in a loop: Classify each user terminal according to the CDN URL it transmits, and update the most recently transmitted download traffic for each user terminal in each category, and dynamically rank them by percentile; Calculate an average value of the latest download traffic sent by all the terminals in each category within an adjustment period; and When the adjustment period ends, all user terminals in the category whose average value is lower than a minimum set value are notified to switch their connections to the CDN node with the largest weight value among other CDN nodes, or all user terminals in any category whose percentile ranking of download traffic is lower than a threshold percentile value are notified to switch their connections to the CDN node with the largest weight value among other CDN nodes.

5. The method for dynamic content delivery network switching according to claim 1 or 2, characterized in that: The CDN node that provides the portion of content data in step b) is the best or worst in the optimization ranking.

6. The method for dynamic content delivery network switching according to any one of claims 1 to 4, characterized in that: The CDN node that provides the content material in step b) is the CDN node with the lowest operating cost or the CDN node with the highest operating cost.

7. The method for dynamic content delivery network switching according to any one of claims 1 to 4, characterized in that: The script program code further periodically transmits a confirmation connection signal to the monitoring server through the user terminal. If the monitoring server does not receive the confirmation connection signal after an offline delay after the connection, the monitoring server determines that the corresponding user terminal is in an offline state. At this time, the data transmitted to the monitoring server by the corresponding user terminal is no longer used for percentile arrangement and calculation of the average value.

8. The method for dynamic content delivery network switching according to any one of claims 1 to 4, characterized in that: The monitoring server further performs the following operations: counting the number of currently connected terminals of each CDN node and notifying the main server.

9. The method for dynamic content delivery network switching according to any one of claims 1 to 4, characterized in that: The script code further performs the following operations: if the connected CDN node does not respond to the issued request, a connection failure message is sent to the monitoring server through the user terminal.

10. The method for dynamic content delivery network switching according to claim 9, wherein: The monitoring server further performs the following tasks: During the adjustment period, calculate a failure rate of the number of user terminals that send out connection failure messages to the total number of user terminals in the category; and When the adjustment period ends, if the failure rate of a category is higher than a minimum allowable value, all the CDN nodes using the terminals of the category are notified to switch connections to the CDN node with the best optimization ranking or the one with the largest weight value among other CDN nodes.

Citation Information

Patent Citations

  • Method for selecting CDN service nodes through clients in streaming medium playing

    CN105450675A

  • Content distribution network CDN node selection method and apparatus

    CN105897822A

  • Technique for selecting a content distribution network entity

    CN109565501A

  • Client dynamic CDN switching method and system

    CN111901362A

  • Method of selecting optimal network node for contents delivery service and apparatus therefor

    KR1020180060844A