CN107493232B - CDN access acceleration method and device - Google Patents

CDN access acceleration method and device Download PDF

Info

Publication number
CN107493232B
CN107493232B CN201610408230.0A CN201610408230A CN107493232B CN 107493232 B CN107493232 B CN 107493232B CN 201610408230 A CN201610408230 A CN 201610408230A CN 107493232 B CN107493232 B CN 107493232B
Authority
CN
China
Prior art keywords
node
distance
cdn
predetermined
cdn node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610408230.0A
Other languages
Chinese (zh)
Other versions
CN107493232A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610408230.0A priority Critical patent/CN107493232B/en
Publication of CN107493232A publication Critical patent/CN107493232A/en
Application granted granted Critical
Publication of CN107493232B publication Critical patent/CN107493232B/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
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/122Shortest path evaluation by minimising distances, e.g. by selecting a route with minimum of number of hops
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

An accelerated access method for a CDN comprises the following steps: the CDN node determines a first distance and a second distance between the CDN node and each predetermined node, wherein the second distance between the CDN node and the predetermined node is obtained according to the currently determined first distance between the CDN node and the predetermined node and N previously determined first distances, N is an integer greater than or equal to 1, and the predetermined node comprises a source station and/or other CDN nodes; the CDN node determines an optimal path for accessing the corresponding domain name according to a second distance between the node and each predetermined node, or according to the second distance between the node and each predetermined node and second distances between other one or more CDN nodes and the corresponding predetermined nodes; and when receiving an access request for the domain name, the CDN node forwards the access request for the domain name according to the determined optimal path. The method can improve the speed of back-source access through the CDN.

Description

CDN access acceleration method and device
Technical Field
The present invention relates to the technical field of Content Distribution Networks (CDNs), and in particular, to a method and an apparatus for accelerating access to a CDN.
Background
A Content Delivery Network (CDN) is a distributed Network composed of a set of proxy servers deployed in multiple data centers. CDNs can provide a fast, highly available access experience for end users.
The current CDN acceleration strategy mainly accelerates cacheable static data, such as pictures, videos, Cascading Style Sheets (CSSs), and the like. The core principle of CDN acceleration is as follows: the cacheable data is stored in an Edge Server (Edge Server) in the CDN in advance, and the user terminal can obtain the data nearby without obtaining the data by a source station (Origin Server). The edge server is a proxy server near the client in the CDN and providing acceleration for the source station.
However, since dynamic content cannot be cached in a CDN as static content, handling access to dynamic content in the same manner as static content affects access speed. When the user terminal accesses the dynamic content, each access to the dynamic content needs to return to the source, namely, the accessed dynamic content is obtained from the source station. The back-source link is determined by routing at an Internet Protocol (IP) layer, but due to various reasons, such as different routing policies between Internet Service Providers (ISPs), limitations between ISPs, and the like, the determined back-source link is not the optimal link, and thus the back-source access speed is reduced.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
The embodiment of the application provides a method and a device for accelerating access of a CDN, which can improve the speed of back-source access through the CDN.
The embodiment of the application provides an access acceleration method for a CDN, which comprises the following steps:
the CDN node determines a first distance and a second distance between the CDN node and each predetermined node, wherein the second distance between the CDN node and the predetermined node is obtained according to the currently determined first distance between the CDN node and the predetermined node and N previously determined first distances, N is an integer greater than or equal to 1, and the predetermined node comprises a source station and/or other CDN nodes;
the CDN node determines an optimal path for accessing the corresponding domain name according to a second distance between the node and each predetermined node, or according to the second distance between the node and each predetermined node and second distances between other one or more CDN nodes and the corresponding predetermined nodes;
and when receiving an access request for the domain name, the CDN node forwards the access request for the domain name according to the determined optimal path.
Optionally, the CDN node determines a first distance between the node and each predetermined node by:
for each predetermined node, the CDN node obtains response time for accessing a detection address set by the predetermined node, and determines the response time as a first distance between the node and the predetermined node.
Optionally, the CDN node determines a second distance between the node and each predetermined node by:
for each predetermined node, the CDN node determines a jitter compensation value Dev between the node and the predetermined node according to the following formulanew
Devnew={(1-β)×Devold+β×(Dcur-Dold)}/2,
Wherein, DevoldJitter compensation values between the CDN node and the predetermined node determined for the previous time, DoldA second distance, D, between the CDN node and the predetermined node determined for the previous timecurThe value range of beta is greater than 0 and less than or equal to 1 for the first distance between the CDN node and the predetermined node which is determined currently;
when a first distance between the currently determined CDN node and the predetermined node is smaller than or equal to a second distance between the previously determined CDN node and the predetermined node, the CDN node determines a second distance D between the current node and the predetermined node according to the following formulanew
Dnew=(1-α)×Dold+Dcur×α,
Wherein the value range of alpha is more than 0 and less than or equal to 1;
when a first distance between the CDN node and the predetermined node which is determined currently is larger than a second distance between the CDN node and the predetermined node which is determined last time, the CDN node determines a second distance D between the current node and the predetermined node according to the following formulanew
Dnew=(1-α)×Dold+Dcur×α+Devnew/8。
Optionally, the determining, by the CDN node, a first distance and a second distance between the node and each predetermined node includes:
the CDN node periodically determines a first distance and a second distance between the node and each preset node.
Optionally, after the CDN node determines a first distance and a second distance between the node and each predetermined node, the method further includes:
and the CDN node updates a second distance between the locally stored node and each preset node according to the recording period.
Optionally, the determining, by the CDN node, an optimal path for accessing the corresponding domain name according to the second distance between the local node and each predetermined node, or according to the second distance between the local node and each predetermined node and the second distances between the other one or more CDN nodes and the corresponding predetermined node includes:
the CDN node determines an optimal path for accessing the corresponding domain name according to a second distance between the locally latest stored local node and each preset node; alternatively, the first and second electrodes may be,
the CDN node acquires a second distance between the CDN node and a corresponding preset node, which is newly stored by the other CDN node, from the other CDN node or nodes; and the CDN node determines an optimal path for accessing the corresponding domain name according to a second distance between the local node and each preset node which is stored locally and latest and the obtained second distance between one or more CDN nodes and the corresponding preset node.
Optionally, the determining, by the CDN node, an optimal path for accessing the corresponding domain name according to the second distance between the local node and each predetermined node, or according to the second distance between the local node and each predetermined node and the second distances between the other one or more CDN nodes and the corresponding predetermined node includes:
the CDN node determines an optimal path from the node to a source station of a corresponding domain name by adopting a Dijkstra algorithm according to a second distance between the node and each predetermined node, or according to the second distance between the node and each predetermined node and second distances between other one or more CDN nodes and the corresponding predetermined nodes;
when the domain name corresponds to a source station, the CDN node determines the determined optimal path from the node to the source station as the optimal path for accessing the domain name through the node;
and when the domain name corresponds to at least two source stations, the CDN node selects the optimal path with the minimum sum of the second distances from the determined optimal paths from the node to each source station of the domain name as the optimal path for accessing the domain name through the node.
Optionally, the CDN node determines, by using a Dijkstra algorithm, that the node hop count included in the optimal path from the node to the source station is less than or equal to a preset hop count.
The embodiment of the present application further provides an access acceleration device for a CDN, which is disposed at a CDN node, and includes:
a distance determining module, configured to determine a first distance and a second distance between the CDN node where the CDN node is located and each predetermined node, where the second distance between the CDN node and the predetermined node is obtained according to a currently determined first distance between the CDN node and the predetermined node and N first distances determined before, where N is an integer greater than or equal to 1, and the predetermined node includes a source station and/or other CDN nodes;
a path determining module, configured to determine an optimal path for accessing the corresponding domain name according to a second distance between the CDN node and each predetermined node, or according to the second distance between the CDN node and each predetermined node and a second distance between another one or more CDN nodes and the corresponding predetermined node;
and the transmission module is used for forwarding the access request to the domain name according to the determined optimal path when the access request to the domain name is received.
Optionally, the distance determining module determines the first distance between the CDN node and each predetermined node by:
and for each predetermined node, acquiring response time for accessing a detection address set by the predetermined node, and determining the response time as a first distance between the CDN node and the predetermined node.
Optionally, the distance determining module determines the second distance between the CDN node and each predetermined node by:
for each predetermined node, determining a jitter compensation value Dev between the CDN node and the predetermined node according to the following formulanew
Devnew={(1-β)×Devold+β×(Dcur-Dold)}/2,
Wherein, DevoldJitter compensation values between the CDN node and the predetermined node determined for the previous time, DoldA second distance, D, between the CDN node and the predetermined node determined for the previous timecurThe value range of beta is greater than 0 and less than or equal to 1 for the first distance between the CDN node and the predetermined node which is determined currently;
when the first distance between the CDN node and the predetermined node which is determined currently is smaller than or equal to the second distance between the CDN node and the predetermined node which is determined last time, determining a second distance D between the CDN node and the predetermined node which is determined currently according to the following formulanew
Dnew=(1-α)×Dold+Dcur×α,
Wherein the value range of alpha is more than 0 and less than or equal to 1;
when a first distance between the CDN node and the predetermined node which is determined currently is larger than a second distance between the CDN node and the predetermined node which is determined last time, determining a second distance D between the CDN node and the predetermined node which is determined currently according to the following formulanew
Dnew=(1-α)×Dold+Dcur×α+Devnew/8。
Optionally, the distance determining module is configured to periodically determine the first distance and the second distance between the node and each predetermined node.
Optionally, the apparatus further comprises: and the storage module is used for updating the stored second distance between the CDN node and each preset node according to the recording period.
Optionally, the path determining module is configured to:
determining an optimal path for accessing a corresponding domain name according to a second distance between the CDN node and each predetermined node which is newly stored by the storage module; alternatively, the first and second electrodes may be,
acquiring a second distance between the self and a corresponding preset node which are newly stored by other CDN nodes from other CDN node or nodes; and determining an optimal path for accessing the corresponding domain name according to a second distance between the CDN node and each predetermined node which is newly stored by the storage module and the obtained second distance between one or more other CDN nodes and the corresponding predetermined node.
Optionally, the path determining module is configured to:
determining an optimal path from the CDN node to a source station of a corresponding domain name by adopting a Dijkstra algorithm according to a second distance between the CDN node and each predetermined node, or according to the second distance between the CDN node and each predetermined node and a second distance between other one or more CDN nodes and the corresponding predetermined nodes;
when the domain name corresponds to a source station, determining the determined optimal path from the CDN node to the source station as the optimal path for accessing the domain name through the CDN node;
and when the domain name corresponds to at least two source stations, selecting the optimal path with the minimum sum of the second distances from the determined optimal paths from the CDN node to each source station of the domain name as the optimal path for accessing the domain name through the CDN node.
Optionally, the path determining module determines, by using Dijkstra algorithm, that the optimal path from the CDN node to the source station includes a node hop count that is less than or equal to a preset hop count.
In addition, an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed, the method for accelerating access to the CDN is implemented.
In the embodiment of the application, the CDN nodes are used as transit nodes, the distances between the CDN nodes and a source station are determined according to the current network quality through mutual cooperation between the CDN nodes, and an optimal back source link is calculated according to the determined distance information. And when the link between the nodes has problems, the link can be switched back to the source link in time.
Other aspects will be apparent upon reading and understanding the attached drawings and detailed description.
Drawings
Fig. 1 is a flowchart of an access acceleration method for a CDN according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an access accelerating device of a CDN according to an embodiment of the present application;
fig. 3 is a schematic view of an application scenario in the second embodiment of the present application.
Detailed Description
The embodiments of the present application will be described in detail below with reference to the accompanying drawings, and it should be understood that the embodiments described below are only for illustrating and explaining the present application and are not intended to limit the present application.
It should be noted that, if not conflicted, the embodiments and the features of the embodiments can be combined with each other and are within the scope of protection of the present application. Additionally, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
Fig. 1 is a flowchart of an access acceleration method for a CDN according to an embodiment of the present application. As shown in fig. 1, the method for accelerating access to the CDN provided in this embodiment includes the following steps:
step 101: the CDN node determines a first distance and a second distance between the CDN node and each predetermined node, wherein the second distance between the CDN node and the predetermined node is obtained according to the currently determined first distance between the CDN node and the predetermined node and N previously determined first distances, N is an integer greater than or equal to 1, and the predetermined node comprises a source station and/or other CDN nodes.
In this embodiment, the predetermined node may include a plurality of source stations, or the predetermined node may include a plurality of other CDN nodes, or the predetermined node may include one or more source stations and one or more other CDN nodes. This embodiment is not limited to this. For example, the CDN node may determine which CDN nodes the corresponding predetermined nodes include according to the CDN configuration center grouping for the CDN nodes. In addition, the predetermined node corresponding to each CDN node may be the same or different. This embodiment is not limited to this. For example, the predetermined node corresponding to the CDN node 1 may include a CDN node 2, a CDN node 3 and a source station 1, the predetermined node corresponding to the CDN node 2 may include the CDN node 1, the CDN node 3 and the source station 1, and the predetermined node corresponding to the CDN node 3 may include the CDN node 1, the CDN node 2 and the source station 1.
Optionally, the CDN node determines the first distance between the node and each predetermined node by:
for each predetermined node, the CDN node obtains response time for accessing a detection address set by the predetermined node, and determines the response time as a first distance between the node and the predetermined node.
The CDN node respectively probes other CDN nodes and the source station in a Transmission Control Protocol (TCP) manner to obtain a detection distance (i.e., a first distance). Each CDN node and source station would set a detection address (checkUrl) that is 2KB in size. The checkUrl of any CDN node accessing other CDN nodes or the source station obtains the response time Rt as the distance between two points (the CDN node and other CDN nodes, or the CDN node and the source station). Since the response Time Rt includes packet loss and Round-Trip Time (RTT), it can be used as a measure of the distance between two points. Here, the unit of the first distance is milliseconds (ms).
In this embodiment, since the network condition between two points (CDN node and predetermined node) is uncertain, the fitting distance (i.e., the second distance) between the two points at present is determined based on the fitting result of the first distance between the two points currently detected and the N first distances between the two points previously determined (i.e., the fitting distance between the two points previously determined). Wherein N is an integer greater than or equal to 1. For example, each time the distance detection process determines a first distance between two points, the second distance between two points determined by the mth detection process is a fitting result of the first distance between two points currently detected and the first distance determined from the lth time to the M-1 st time. In this case, N is M-L, M is an integer of 2 or more, and L is an integer of 1 or more and less than M. The value of M, L can be determined according to actual needs. Here, the unit of the second distance is also milliseconds (ms).
For each predetermined node, when determining a second distance between two points (the CDN node and the predetermined node), the CDN node needs to calculate a jitter compensation value between the current two points, and when a first distance between the current two points is less than or equal to a second distance between two points determined at a previous time, the second distance between the current two points is determined according to the first distance between the current two points and the second distance between two points determined at the previous time; when the first distance between the two points determined at present is larger than the second distance between the two points determined at the previous time, the jitter influence is considered, namely the second distance between the two points at present is determined according to the first distance between the two points measured at present, the second distance between the two points determined at the previous time and the jitter compensation value between the two points at present, so that the condition of network deterioration can be found in time. Wherein the jitter compensation value between the two current points is determined according to the jitter compensation value between the two points in the previous measurement, the first distance between the two currently measured points and the second distance between the two previously measured points.
Optionally, the CDN node determines the second distance between the node and each predetermined node by:
for each predetermined node, the CDN node determines a jitter compensation value between the node and the predetermined node according to the following formulaDevnew
Devnew={(1-β)×Devold+β×(Dcur-Dold)}/2,
Wherein, DevoldJitter compensation values between the CDN node and the predetermined node determined for the previous time, DoldA second distance, D, between the CDN node and the predetermined node determined for the previous timecurThe value range of beta is greater than 0 and less than or equal to 1 for the first distance between the CDN node and the predetermined node which is determined currently;
when a first distance between the currently determined CDN node and the predetermined node is smaller than or equal to a second distance between the previously determined CDN node and the predetermined node, the CDN node determines a second distance D between the current node and the predetermined node according to the following formulanew
Dnew=(1-α)×Dold+Dcur×α,
Wherein the value range of alpha is more than 0 and less than or equal to 1;
when a first distance between the CDN node and the predetermined node which is determined currently is larger than a second distance between the CDN node and the predetermined node which is determined last time, the CDN node determines a second distance D between the current node and the predetermined node according to the following formulanew
Dnew=(1-α)×Dold+Dcur×α+Devnew/8。
The CDN node may determine the second distance between the node and the predetermined node directly after determining the first distance between the node and the predetermined node, and then determine the first distance and the second distance between the node and the next predetermined node, or the CDN node may determine the first distance between the node and each predetermined node first and then determine the second distance between the node and each predetermined node in sequence. However, this embodiment is not limited to this.
The CDN node determines the current second distance according to the historical fitting result of the first distance, and thus determines the current second distance according to the calculation formula of the second distance in the second distance detection process and the subsequent distance detection process. In addition, an initial value of a jitter compensation value between the CDN node and the predetermined node may be set to 0.
In the present embodiment, α is, for example, 3/8, and β is, for example, 1/4. However, this embodiment is not limited to this. In practical application, the values of α and β can be adjusted according to the fitting effect required in practice.
Optionally, step 101 comprises: the CDN node periodically determines a first distance and a second distance between the node and each predetermined node.
The CDN node may perform periodic distance detection according to a detection period, and determine a first distance and a second distance between the node and each predetermined node in each distance detection process. However, this embodiment is not limited to this. The CDN node may perform distance detection, for example, when a corresponding detection trigger condition is met or a detection instruction is received, to determine a first distance and a second distance between the node and each reservation.
The detection periods of different CDN nodes may be the same or different. This embodiment is not limited to this.
Step 102: and the CDN node determines an optimal path for accessing the corresponding domain name according to the second distance between the node and each predetermined node, or the second distance between the node and each predetermined node and the second distances between other one or more CDN nodes and the corresponding predetermined nodes.
Optionally, the CDN node may determine an optimal path for accessing the corresponding domain name according to a second distance between the node and each predetermined node. For example, when the domain name requested to be accessed by the user terminal corresponds to multiple source stations, the CDN node may determine the optimal path for accessing the domain name according to the second distance between the local node determined in step 101 and the multiple source stations corresponding to the domain name.
Optionally, the CDN node may determine the optimal path for accessing the corresponding domain name according to the second distance between the local node and each predetermined node and the second distance between the other one or more CDN nodes and the corresponding predetermined node. For example, when a domain name requested to be accessed by the user terminal corresponds to one or more source stations, the CDN node may determine an optimal path for accessing the domain name according to the second distance between the local node and the one or more source stations corresponding to the domain name determined in step 101 and the second distance between the other CDN node and the one or more source stations corresponding to the domain name determined in step 101.
Optionally, after step 101 and before step 102, the method further comprises:
and the CDN node updates the second distance between the local node and each preset node which is locally stored according to the recording period.
And the recording period is greater than or equal to the detection period of the CDN node. For example, the detection period is 5 seconds(s), and the recording period is 1 minute (min), that is, the CDN node performs distance detection every 5s to determine a first distance and a second distance between the local node and each predetermined node, and the CDN node performs data storage every 1min to record a second distance between the local node and each predetermined node, which is obtained newly.
The recording periods of different CDN nodes may be the same or different. This embodiment is not limited to this.
Optionally, step 102 comprises:
the CDN node determines an optimal path for accessing the corresponding domain name according to a second distance between the locally latest stored local node and each preset node; alternatively, the first and second electrodes may be,
the CDN node acquires a second distance between the CDN node and a corresponding predetermined node, which is newly stored by the other CDN node, from the other CDN node or nodes; and the CDN node determines an optimal path for accessing the corresponding domain name according to a second distance between the local node and each preset node which is stored locally and latest and the obtained second distance between one or more CDN nodes and the corresponding preset node.
Each CDN node may store a second distance between the latest local node and the predetermined node in a file in a local predetermined directory. Therefore, any CDN node can obtain the second distance between the CDN node and the corresponding preset node determined by other CDN nodes by accessing the files under the preset directories of other CDN nodes.
In this embodiment, when a link between a CDN node and another CDN node has a problem, the CDN node cannot obtain a second distance between itself and a corresponding preset node, which is stored by the another CDN node, and then the CDN node does not consider the another CDN node where the link has a problem when determining the optimal path, so as to ensure real-time effectiveness of the optimal path determined by the CDN node. Moreover, the CDN node can switch the link in time when a link failure occurs.
Optionally, step 102 comprises:
determining, by the CDN node, an optimal path from the node to a source station of a corresponding domain name by using a Dijkstra algorithm according to a second distance between the node and each predetermined node, or according to a second distance between the node and each predetermined node and a second distance between the other one or more CDN nodes and the corresponding predetermined node;
when the domain name corresponds to a source station, the CDN node determines the determined optimal path from the node to the source station as the optimal path for accessing the domain name through the node;
and when the domain name corresponds to at least two source stations, the CDN node selects the optimal path with the minimum sum of the second distances from the determined optimal paths from the node to each source station of the domain name as the optimal path for accessing the domain name through the node.
And the CDN node determines that the node hop count included in the optimal path from the node to the source station by adopting a Dijkstra algorithm is less than or equal to a preset hop count.
The Dijkstra algorithm is a single-source shortest path algorithm invented by Dikstra, a netherlands computer scientist, and is mainly characterized in that the Dijkstra algorithm is expanded layer by layer towards an outer layer by taking a starting point as a center until the Dijkstra algorithm is expanded to an end point. The Dijkstra algorithm is well known to those skilled in the art and is not described herein in detail.
In this embodiment, in the process that the CDN node determines the optimal path from the node to the source station of the corresponding domain name by using the Dijkstra algorithm, in the process of outward expansion by using the start node, not only the sum of the second distances of the expansion paths is calculated, but also the node hop count of the expansion path is determined, and when the node hop count of the expansion path is greater than or equal to the preset hop count, the expansion path is discarded. Therefore, the node hop count included in the optimal path determined by the CDN node is less than or equal to the preset hop count, and the optimal path is a path that has the smallest sum of the second distances and satisfies the node hop count condition.
Step 103: and when receiving the access request to the domain name, the CDN node forwards the access request to the domain name according to the determined optimal path.
In this embodiment, the CDN nodes are used as transit nodes, and through mutual cooperation between the CDN nodes, an optimal source return link is calculated according to the current network quality, and may be directly returned to the source or may be relayed back to the source through other CDN nodes. And when the link between the nodes has problems, the link can be switched back to the source link in time.
Fig. 2 is an access acceleration apparatus for a CDN according to an embodiment of the present application. As shown in fig. 2, the access accelerating device for CDN provided in this embodiment is disposed at a CDN node, and the device includes:
a distance determining module, configured to determine a first distance and a second distance between the CDN node where the CDN node is located and each predetermined node, where the second distance between the CDN node and the predetermined node is obtained according to a currently determined first distance between the CDN node and the predetermined node and N first distances determined before, where N is an integer greater than or equal to 1, and the predetermined node includes a source station and/or other CDN nodes;
a path determining module, configured to determine an optimal path for accessing the corresponding domain name according to a second distance between the CDN node and each predetermined node, or according to the second distance between the CDN node and each predetermined node and a second distance between another one or more CDN nodes and the corresponding predetermined node;
and the transmission module is used for forwarding the access request to the domain name according to the determined optimal path when the access request to the domain name is received.
Optionally, the distance determining module determines the first distance between the CDN node and each predetermined node by:
and for each predetermined node, acquiring response time for accessing a detection address set by the predetermined node, and determining the response time as a first distance between the CDN node and the predetermined node.
Optionally, the distance determining module determines the second distance between the CDN node and each predetermined node by:
for each predetermined node, determining a jitter compensation value Dev between the CDN node and the predetermined node according to the following formulanew
Devnew={(1-β)×Devold+β×(Dcur-Dold)}/2,
Wherein, DevoldJitter compensation values between the CDN node and the predetermined node determined for the previous time, DoldA second distance, D, between the CDN node and the predetermined node determined for the previous timecurThe value range of beta is greater than 0 and less than or equal to 1 for the first distance between the CDN node and the predetermined node which is determined currently;
when the first distance between the CDN node and the predetermined node which is determined currently is smaller than or equal to the second distance between the CDN node and the predetermined node which is determined last time, determining a second distance D between the CDN node and the predetermined node which is determined currently according to the following formulanew
Dnew=(1-α)×Dold+Dcur×α,
Wherein the value range of alpha is more than 0 and less than or equal to 1;
a first distance between the CDN node and the predetermined node determined currently is larger than a first distance between the CDN node and the predetermined node determined last timeWhen the second distance between the points is larger than the preset distance, determining a second distance D between the CDN node and the preset node according to the following formulanew
Dnew=(1-α)×Dold+Dcur×α+Devnew/8。
Optionally, the distance determining module is configured to periodically determine the first distance and the second distance between the node and each predetermined node.
Optionally, the apparatus further comprises: and the storage module is used for updating the stored second distance between the CDN node and each preset node according to the recording period.
Optionally, the path determining module is configured to:
determining an optimal path for accessing a corresponding domain name according to a second distance between the CDN node and each predetermined node which is newly stored by the storage module; alternatively, the first and second electrodes may be,
acquiring a second distance between the self and a corresponding preset node which are newly stored by other CDN nodes from other CDN node or nodes; and determining an optimal path for accessing the corresponding domain name according to a second distance between the CDN node and each predetermined node which is newly stored by the storage module and the obtained second distance between one or more other CDN nodes and the corresponding predetermined node.
Optionally, the path determining module is configured to:
determining an optimal path from the CDN node to a source station of a corresponding domain name by adopting a Dijkstra algorithm according to a second distance between the CDN node and each predetermined node, or according to the second distance between the CDN node and each predetermined node and a second distance between other one or more CDN nodes and the corresponding predetermined nodes;
when the domain name corresponds to a source station, determining the determined optimal path from the CDN node to the source station as the optimal path for accessing the domain name through the CDN node;
and when the domain name corresponds to at least two source stations, selecting the optimal path with the minimum sum of the second distances from the determined optimal paths from the CDN node to each source station of the domain name as the optimal path for accessing the domain name through the CDN node.
The path determining module determines that the optimal path from the CDN node to the source station includes node hops which are less than or equal to a preset hop count by using a Dijkstra algorithm.
In addition, the specific processing flow of the above device is the same as that of the above method embodiment, and therefore, the detailed description thereof is omitted.
In practical applications, the distance determining module and the path determining module are, for example, components with information processing capability such as a processor, the transmitting module is, for example, components with information transmission capability such as a receiver and/or a transmitter, and the storage module is, for example, components with information storage capability such as a memory. However, this embodiment is not limited to this. In other embodiments, the functions of the modules may be implemented by a processor executing programs/instructions stored in a memory.
Fig. 3 is a schematic view of an application scenario in the second embodiment of the present application. In this embodiment, the user terminal is, for example, a mobile phone or a personal computer. Source station a and source station B correspond to a domain name. The CDN node a receives an access request for the domain name sent by the user terminal, and forwards the access request according to the optimal path dynamically selected according to the method described in the first embodiment.
In this embodiment, the predetermined node corresponding to the CDN node a includes: CND node B, CDN node C, source station a, and source station B are illustrated as examples. However, this embodiment is not limited to this.
In this embodiment, every time a probing period comes, the CDN node a may determine a second distance (i.e., a fitting distance) between the local node and each predetermined node according to the description of step 101 in the first embodiment, and every time a recording period comes, the CDN node a writes the newly obtained second distance between the local node and each predetermined node into a file in the local predetermined directory. Here, CDN node a stores the second distance as the first row data in table 1. It should be noted that N in table 1 indicates Null (Null), i.e., there is no second distance from the node to the node itself. The unit of data in table 1 is milliseconds (ms).
TABLE 1
CDN node A CDN node B CDN node C Source station A Source station B
CDN node A N 5 6 30 20
CDN node B 3 N 4 10 5
CDN node C 6 4 N 50 20
In this embodiment, when determining the optimal path for accessing the domain name, the CDN node a may obtain, from the CDN node B, a second distance (e.g., the second line of data in table 1) between the CDN node B and the corresponding predetermined node, and obtain, from the CDN node C, a second distance (e.g., the third line of data in table 1) between the CDN node C and the corresponding predetermined node. Thus, CDN node a may obtain a second distance matrix, that is, table 1, by synthesizing the second distance stored locally and the second distances obtained from other CDN nodes.
In this embodiment, based on the data in table 1, the CDN node a determines an optimal path from the CDN node a to the source station a and an optimal path from the CDN node a to the source station B by using a Dijkstra algorithm with a node hop limit. Here, the CDN node a may determine that the optimal path from the node to the source station a is: CDN node A- > CDN node B- > source station A; the sum of the second distances for this path is 15 ms. The CDN node a may determine that the optimal path from the node to the source station B is: CDN node A- > CDN node B- > source station B, and the sum of the second distances corresponding to the path is 10 ms.
As can be seen from the above, the sum of the second distances of the optimal paths from the CDN node a to the source station B is smaller than the sum of the second distances of the optimal paths from the CDN node a to the source station a. Therefore, the optimal path for accessing the domain names corresponding to the source station a and the source station B through the CDN node a is as follows: CDN node A- > CDN node B- > source station B. That is, the CDN node a forwards the received access request sent by the user terminal to the CDN node B.
In this embodiment, when a link between the CDN node a and the CDN node B and the CDN node C fails, the CDN node a cannot obtain, from the CDN node B, a second distance between the CDN node B and the corresponding predetermined node, and cannot obtain, from the CDN node C, a second distance between the CDN node C and the corresponding predetermined node. At this time, the CDN node a does not select a path including the CDN node B and the CDN node C when determining the optimal path for domain name access. That is, CDN node a may determine the optimal path for domain name access according to the second distance between source station a and source station B obtained by the last probe (as shown in table 2, the unit of data in table 2 is milliseconds (ms)). As can be seen from table 2, a second distance (30ms) from the CDN node a to the source station a is greater than a second distance (20ms) from the CDN node a to the source station B, and therefore, an optimal path for accessing domain names corresponding to the source station a and the source station B through the CDN node a is as follows: CDN node A- > Source station B. That is, the CDN node a directly forwards the received access request sent by the user terminal to the source station B.
TABLE 2
Source station A Source station B
CDN node A 30 20
In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method for accelerating access to the CDN is implemented.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include forms of volatile memory, Random Access Memory (RAM), and/or non-volatile memory in a computer-readable storage medium, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable storage medium. Computer-readable storage media include permanent and non-permanent, removable and non-removable media and may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer readable storage media include, but are not limited to: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium may be used to store information that may be accessed by a computing device.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by a program instructing associated hardware (e.g., a processor) to perform the steps, and the program may be stored in a computer readable storage medium, such as a read only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits. Accordingly, the modules/units in the above embodiments may be implemented in hardware, for example, by an integrated circuit, or may be implemented in software, for example, by a processor executing programs/instructions stored in a memory to implement the corresponding functions. The present application is not limited to any specific form of hardware or software combination.
The foregoing shows and describes the general principles and features of the present application, together with the advantages thereof. The present application is not limited to the above-described embodiments, which are described in the specification and drawings only to illustrate the principles of the application, but also to provide various changes and modifications within the spirit and scope of the application, which are within the scope of the claimed application.

Claims (12)

1. An access acceleration method for a Content Distribution Network (CDN), comprising:
the CDN node determines a first distance and a second distance between the CDN node and each predetermined node, wherein the second distance between the CDN node and the predetermined node is obtained according to the currently determined first distance between the CDN node and the predetermined node and N previously determined first distances, N is an integer greater than or equal to 1, and the predetermined node comprises a source station and/or other CDN nodes;
the CDN node determines an optimal path for accessing the corresponding domain name according to a second distance between the node and each predetermined node, or according to the second distance between the node and each predetermined node and second distances between other one or more CDN nodes and the corresponding predetermined nodes;
when the CDN node receives an access request for the domain name, forwarding the access request for the domain name according to the determined optimal path;
for each preset node, the CDN node obtains response time for accessing a detection address set by the preset node, and the response time is used as a first distance between the node and the preset node;
the CDN node determines a second distance between the node and each predetermined node in the following mode:
for each predetermined node, a jitter compensation value Dev between the CDN node and the predetermined nodenewEqual to half the sum of the two products: jitter compensation value Dev between the CDN node and the predetermined node determined last timeoldProduct of (1-beta), first distance D between the CDN node and the predetermined node currently determinedcurA second distance D between the CDN node and the predetermined node determined last timeoldThe product of the difference between and β;
a first distance D between the currently determined CDN node and the predetermined nodecurLess than or equal to a second distance D between the CDN node and the predetermined node determined last timeoldThen, a second distance between the CDN node and the predetermined node is equal to a sum of two products: doldProduct of (1-. alpha.), DcurThe product of α;
at the currently determined CDN node and the CDN nodeA first distance D between predetermined nodescurA second distance D between the CDN node and the predetermined node which is larger than the last determined distance DoldThen, a second distance between the CDN node and the predetermined node is equal to Dev of 1/8 multiplied by the following two productsnewAnd (3) the sum: doldProduct of (1-. alpha.), DcurThe product of α;
wherein the value ranges of alpha and beta are more than 0 and less than or equal to 1.
2. The method of claim 1, wherein the CDN node determines a first distance and a second distance between the node and each predetermined node, comprising:
the CDN node periodically determines a first distance and a second distance between the node and each preset node.
3. The method of claim 1 or 2, wherein after the CDN node determines a first distance and a second distance between the node and each predetermined node, the method further comprises:
and the CDN node updates a second distance between the locally stored node and each preset node according to the recording period.
4. The method of claim 3, wherein the determining, by the CDN node, an optimal path for accessing the corresponding domain name according to the second distance between the local node and each predetermined node, or according to the second distance between the local node and each predetermined node and the second distances between the other one or more CDN nodes and the corresponding predetermined nodes comprises:
the CDN node determines an optimal path for accessing the corresponding domain name according to a second distance between the locally latest stored local node and each preset node; alternatively, the first and second electrodes may be,
the CDN node acquires a second distance between the CDN node and a corresponding preset node, which is newly stored by the other CDN node, from the other CDN node or nodes; and the CDN node determines an optimal path for accessing the corresponding domain name according to a second distance between the local node and each preset node which is stored locally and latest and the obtained second distance between one or more CDN nodes and the corresponding preset node.
5. The method of claim 1, wherein the determining, by the CDN node, an optimal path for accessing the corresponding domain name according to the second distance between the local node and each predetermined node, or according to the second distances between the other one or more CDN nodes and the corresponding predetermined node, includes:
the CDN node determines an optimal path from the node to a source station of a corresponding domain name by adopting a Dijkstra algorithm according to a second distance between the node and each predetermined node, or according to the second distance between the node and each predetermined node and second distances between other one or more CDN nodes and the corresponding predetermined nodes;
when the domain name corresponds to a source station, the CDN node determines the determined optimal path from the node to the source station as the optimal path for accessing the domain name through the node;
and when the domain name corresponds to at least two source stations, the CDN node selects the optimal path with the minimum sum of the second distances from the determined optimal paths from the node to each source station of the domain name as the optimal path for accessing the domain name through the node.
6. The method of claim 5, wherein the optimal path from the CDN node to the source station, determined by using Dijkstra's algorithm, includes a node hop count that is less than or equal to a preset hop count.
7. An access acceleration device for a Content Distribution Network (CDN) is arranged at a CDN node and is characterized by comprising:
a distance determining module, configured to determine a first distance and a second distance between the CDN node where the CDN node is located and each predetermined node, where the second distance between the CDN node and the predetermined node is obtained according to a currently determined first distance between the CDN node and the predetermined node and N first distances determined before, where N is an integer greater than or equal to 1, and the predetermined node includes a source station and/or other CDN nodes;
a path determining module, configured to determine an optimal path for accessing the corresponding domain name according to a second distance between the CDN node and each predetermined node, or according to the second distance between the CDN node and each predetermined node and a second distance between another one or more CDN nodes and the corresponding predetermined node;
the transmission module is used for forwarding the access request to the domain name according to the determined optimal path when the access request to the domain name is received;
the distance determining module acquires response time for accessing a detection address set by the predetermined node as a first distance between the CDN node and the predetermined node for each predetermined node;
the distance determination module determines a second distance between the CDN node and each predetermined node by:
for each predetermined node, a jitter compensation value Dev between the CDN node and the predetermined nodenewEqual to half the sum of the two products: jitter compensation value Dev between the CDN node and the predetermined node determined last timeoldProduct of (1-beta), first distance D between the CDN node and the predetermined node currently determinedcurA second distance D between the CDN node and the predetermined node determined last timeoldThe product of the difference between and β;
a first distance D between the currently determined CDN node and the predetermined nodecurLess than or equal to a second distance D between the CDN node and the predetermined node determined last timeoldThen, a second distance between the CDN node and the predetermined node is equal to a sum of two products: doldProduct of (1-. alpha.), DcurThe product of α;
a first distance D between the currently determined CDN node and the predetermined nodecurA second distance D between the CDN node and the predetermined node which is larger than the last determined distance DoldThen, a second distance between the CDN node and the predetermined node is equal to Dev of 1/8 multiplied by the following two productsnewAnd (3) the sum: doldProduct of (1-. alpha.), DcurThe product of α;
wherein the value ranges of alpha and beta are more than 0 and less than or equal to 1.
8. The apparatus of claim 7, wherein the distance determining module is configured to periodically determine the first distance and the second distance between the node and each predetermined node.
9. The apparatus of claim 7 or 8, further comprising: and the storage module is used for updating the stored second distance between the CDN node and each preset node according to the recording period.
10. The apparatus of claim 9, wherein the path determination module is configured to:
determining an optimal path for accessing a corresponding domain name according to a second distance between the CDN node and each predetermined node which is newly stored by the storage module; alternatively, the first and second electrodes may be,
acquiring a second distance between the self and a corresponding preset node which are newly stored by other CDN nodes from other CDN node or nodes; and determining an optimal path for accessing the corresponding domain name according to a second distance between the CDN node and each predetermined node which is newly stored by the storage module and the obtained second distance between one or more other CDN nodes and the corresponding predetermined node.
11. The apparatus of claim 7, wherein the path determination module is configured to:
determining an optimal path from the CDN node to a source station of a corresponding domain name by adopting a Dijkstra algorithm according to a second distance between the CDN node and each predetermined node, or according to the second distance between the CDN node and each predetermined node and a second distance between other one or more CDN nodes and the corresponding predetermined nodes;
when the domain name corresponds to a source station, determining the determined optimal path from the CDN node to the source station as the optimal path for accessing the domain name through the CDN node;
and when the domain name corresponds to at least two source stations, selecting the optimal path with the minimum sum of the second distances from the determined optimal paths from the CDN node to each source station of the domain name as the optimal path for accessing the domain name through the CDN node.
12. The apparatus of claim 11, wherein the optimal path from the CDN node to the source station determined by the path determining module using Dijkstra's algorithm includes a node hop count that is less than or equal to a preset hop count.
CN201610408230.0A 2016-06-12 2016-06-12 CDN access acceleration method and device Active CN107493232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610408230.0A CN107493232B (en) 2016-06-12 2016-06-12 CDN access acceleration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610408230.0A CN107493232B (en) 2016-06-12 2016-06-12 CDN access acceleration method and device

Publications (2)

Publication Number Publication Date
CN107493232A CN107493232A (en) 2017-12-19
CN107493232B true CN107493232B (en) 2020-12-01

Family

ID=60642221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610408230.0A Active CN107493232B (en) 2016-06-12 2016-06-12 CDN access acceleration method and device

Country Status (1)

Country Link
CN (1) CN107493232B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109951738B (en) * 2017-12-21 2022-02-01 腾讯数码(天津)有限公司 Transmission path acquisition method, first electronic device, and readable storage medium
CN108712335A (en) * 2018-05-14 2018-10-26 平安科技(深圳)有限公司 Dispatching method, system, equipment and the storage medium that network accesses
CN110875941A (en) * 2018-09-03 2020-03-10 阿里巴巴集团控股有限公司 Source station access flow adjusting method and device, electronic device and storage device
CN109495568B (en) * 2018-11-19 2021-06-18 北京金山云网络技术有限公司 Data acquisition method, data acquisition device, server and storage medium
CN109660624B (en) * 2018-12-26 2022-05-17 网宿科技股份有限公司 Planning method, server and storage medium for content distribution network resources

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790798A (en) * 2012-05-23 2012-11-21 蓝汛网络科技(北京)有限公司 Transparent proxy implementation method, device and system in content distribution network
CN103532817A (en) * 2013-10-12 2014-01-22 无锡云捷科技有限公司 CDN (content delivery network) dynamic acceleration system and method
CN103747112A (en) * 2013-12-24 2014-04-23 乐视网信息技术(北京)股份有限公司 CDN back-to-source method, first server and system thereof
CN104954219A (en) * 2014-03-27 2015-09-30 北京奇虎科技有限公司 CDN (Content Delivery Network) access path optimization method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8612413B2 (en) * 2010-08-12 2013-12-17 Cdnetworks Co., Ltd. Distributed data cache for on-demand application acceleration

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790798A (en) * 2012-05-23 2012-11-21 蓝汛网络科技(北京)有限公司 Transparent proxy implementation method, device and system in content distribution network
CN103532817A (en) * 2013-10-12 2014-01-22 无锡云捷科技有限公司 CDN (content delivery network) dynamic acceleration system and method
CN103747112A (en) * 2013-12-24 2014-04-23 乐视网信息技术(北京)股份有限公司 CDN back-to-source method, first server and system thereof
CN104954219A (en) * 2014-03-27 2015-09-30 北京奇虎科技有限公司 CDN (Content Delivery Network) access path optimization method, device and system

Also Published As

Publication number Publication date
CN107493232A (en) 2017-12-19

Similar Documents

Publication Publication Date Title
CN107493232B (en) CDN access acceleration method and device
CN107896241B (en) Network access speed detection method and device, storage medium and electronic equipment
US11283715B2 (en) Updating routing information based on client location
US11483231B2 (en) Context-aware path computation and selection
CN106537880B (en) Caching data in an information centric network architecture
US7992201B2 (en) Dynamic network tunnel endpoint selection
KR101379864B1 (en) Request routing using network computing components
US20200145328A1 (en) Providing differentiated service to traffic flows obscured by content distribution systems
US10243917B2 (en) Method and apparatus for calculating distance in contents delivery network
WO2017084274A1 (en) Method and apparatus for selecting retrieval server
KR20150088713A (en) End-to-end route tracing over a named-data network
WO2012089062A1 (en) Method and device for data transmission in cdn network
KR20140009931A (en) Communication method of contents requester and contents provider for providing contents and real-time streaming contents in a contents centric network based on contents name
EP3176994B1 (en) Explicit content deletion commands in a content centric network
CN108886536B (en) Method and system for adjusting entries in a library of transponded signals in a content-centric network
WO2018214853A1 (en) Method, apparatus, medium and device for reducing length of dns message
CN109039794A (en) One kind returning source path and determines method and device
JP2015197919A (en) System and method for dynamic name configuration in content-centric network
US20160164952A1 (en) Systems and Methods For Information Centric Networking
CN109873855A (en) A kind of resource acquiring method and system based on block chain network
US11336579B2 (en) Predictive Anycast traffic shaping
US9729428B2 (en) Peer-to-peer connection system with capability of peer-to-peer connection path routing, path routing method of peer-to-peer connection and computer application program thereof
WO2016177185A1 (en) Method and apparatus for processing media access control (mac) address
CN107682271B (en) Method and device for generating routing line
KR102141444B1 (en) Apparatus and method for delivering and receiving data in mobile content network

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1248412

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant