WO2017185614A1 - 路由选择方法及电子设备 - Google Patents

路由选择方法及电子设备 Download PDF

Info

Publication number
WO2017185614A1
WO2017185614A1 PCT/CN2016/100059 CN2016100059W WO2017185614A1 WO 2017185614 A1 WO2017185614 A1 WO 2017185614A1 CN 2016100059 W CN2016100059 W CN 2016100059W WO 2017185614 A1 WO2017185614 A1 WO 2017185614A1
Authority
WO
WIPO (PCT)
Prior art keywords
cdn
state value
content identifier
file
acquisition request
Prior art date
Application number
PCT/CN2016/100059
Other languages
English (en)
French (fr)
Inventor
张鹏
Original Assignee
乐视控股(北京)有限公司
乐视云计算有限公司
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 乐视控股(北京)有限公司, 乐视云计算有限公司 filed Critical 乐视控股(北京)有限公司
Publication of WO2017185614A1 publication Critical patent/WO2017185614A1/zh

Links

Images

Classifications

    • 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/123Evaluation of link metrics

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a routing method and an electronic device.
  • the Content Delivery Network (CDN) system can perform real-time routing based on network traffic and connection information of each node, load status, and distance to user and response time, and redirect the user's request to the nearest user.
  • CDN Content Delivery Network
  • the application of CDN technology can solve the problem of network congestion and improve the response speed of users visiting the website.
  • the CDN implements the routing, and generally adopts the following method: the CDN receives a file acquisition request sent by the client, and if the file requested by the file acquisition request is not stored in the CDN, the CDN needs to be globally load balanced (Global The Server Load Balance (GSLB) server sends a route request, and the GSLB determines a route for the CDN that sends the route request according to the state of each CDN, so that the file requested by the file acquisition request is provided by other CDNs.
  • GLB Global The Server Load Balance
  • the number of CDNs is relatively large, and each routing request is processed by the GSLB server, causing the GSLB server to be overloaded.
  • the GSLB server needs to know the status of each CDN in real time, resulting in occupation of network traffic, and the number of CDNs is increasing. The way of scheduling and determining routes using the GSLB server encounters bottlenecks.
  • the present application provides a routing method and an electronic device, which are used to solve the bottleneck problem caused by using the GSLB server scheduling in the prior art, and implement CDN self-selection routing.
  • an embodiment of the present application provides a routing method, including:
  • the first content distribution network CDN obtains a file acquisition request, where the file acquisition request includes a content identifier of the file requested by the file acquisition request, and the content identifier is used to identify a file content of the file;
  • the first CDN is connected to the first CDN. Randomly selecting a second CDN in a second CDN;
  • the first CDN is based on a three-dimensional correspondence including the content identifier. a relationship, selecting a second CDN in the at least one second CDN connected to the first CDN;
  • the three-dimensional correspondence includes a correspondence between a content identifier, a status value, and a second CDN, where the status value is used to represent a pros and cons of the second CDN to provide a file for the first CDN.
  • the embodiment of the present application further provides a non-transitory computer storage medium, where computer executable instructions are stored, and the computer executable instructions are used to execute any of the foregoing routing methods of the present application.
  • an embodiment of the present application further provides an electronic device, including: at least one processor; and a memory; wherein the memory stores a program executable by the at least one processor, where the instruction is The at least one processor executes to enable the at least one processor to perform the routing method of any of the above-described embodiments of the present application.
  • the embodiment of the present application further provides a computer program product, the computer program product comprising a computer program stored on a non-volatile computer storage medium, the computer program comprising program instructions, when the program instruction is The computer, when executed, causes the computer to perform the routing method of any of the above method embodiments.
  • the routing method and the electronic device provided by the embodiment of the present application obtain the first CDN of the file obtaining request, and if the file requested by the file obtaining request is not stored, according to whether the file obtaining request is obtained for the first time, Selecting a second CDN randomly from the at least one second CDN of the first CDN connection, or selecting a second one of the at least one second CDN connected to the first CDN according to the three-dimensional correspondence including the content identifier CDN, no need to use GSLB service
  • the device performs scheduling, that is, the selection of the second CDN can be realized, and the CDN self-selective routing is realized.
  • FIG. 1 is a flowchart of a routing method provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a scenario applicable to an embodiment of a routing method according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of an embodiment of a routing apparatus according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of an embodiment of a routing device according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 1 is a flowchart of a routing method provided by the present application, as shown in FIG. 1 , including:
  • the first CDN acquires a file acquisition request.
  • the CDN that obtains the file acquisition request is referred to as a first CDN
  • the other CDNs that are connected to the CDN are referred to as a second CDN.
  • a file identifier-based content identifier may be configured for each file in advance, and the file content of the file is identified by the content identifier. For example, a value is determined based on the file name, and the same value corresponds to a content identifier.
  • one file may correspond to one content identifier, or multiple files may correspond to one content identifier.
  • the content identifier may be configured manually or in the CDN configuration, which is not limited in this embodiment.
  • the file acquisition request When the client sends a file acquisition request, the file acquisition request includes a content identifier of the file requested by the file acquisition request, so that the first CDN that receives the file acquisition request can determine the file requested by the file acquisition request. And determining whether the first CDN itself stores the The file requested by the file acquisition request is sent to the client directly if the file requested by the file acquisition request is stored in the first CDN. If the file requested by the file acquisition request is not stored in the first CDN, the CDN may be selected from the second CDN connected to the first CDN to provide the file requested by the file acquisition request.
  • the first CDN is an edge node, is connected to the client, and is connected to a plurality of other CDNs (second CDNs), in other words, the number of second CDNs connected to the first CDN is at least one.
  • FIG. 2 is a schematic diagram of a scenario applicable to the embodiment of the routing method of the present application.
  • the CDNA is the first CDNA, and is connected to the client, and is connected to three second CDNs, which are CDNB1, CDNB2, and CDNB3 connections, respectively.
  • the first CDN is connected to the first CDN if the file requested by the file obtaining request is not stored in the first CDN, and the file obtaining request corresponding to the content identifier is obtained for the first time.
  • a second CDN is randomly selected from at least one of the second CDNs.
  • a second CDN is randomly selected in the at least one second CDN connected to the first CDN, for example, FIG. 2 Among them, CDNA was randomly selected from three of CDNB1, CDNB2 and CDNB3.
  • the state of the second CDN may be acquired, for example, whether the file acquisition request is requested
  • the file if the file requested by the file acquisition request is stored, the download speed, the packet loss rate, and the bandwidth size of the file.
  • the attribute of the requested file is requested. For example, the status value of the file that is stored is higher than the status value of the file that is not stored, and the status value of the fast download speed is higher than the status value of the slow download speed.
  • the three-dimensional correspondence between the content identifier, the status value, and the selected second CDN correspondence may be generated for subsequent follow-up. Used when receiving a file acquisition request containing the content identifier.
  • the three-dimensional correspondence can be expressed in the manner shown in Table 1 below.
  • different second CDN selection methods may be adopted for whether the file acquisition request corresponding to the same content identifier is received for the first time.
  • the first CDN is based on the content identifier that is included in the first CDN. A three-dimensional correspondence, selecting a second CDN in at least one second CDN connected to the first CDN.
  • the first CDN in the embodiment of the present application may determine whether all the second CDNs of the first CDN connection are included in the three-dimensional correspondence including the content identifier, for example, In FIG. 2, it is determined whether the second CDN corresponding to the content identifier in the three-dimensional correspondence including the content identifier includes three CDNB1, CDNB2, and CDNB3.
  • the second CDN having the highest state value may be selected in the at least one second CDN connected to the first CDN. If the second CDN of the first CDN connection is not included in the three-dimensional correspondence including the content identifier, the state value corresponding to the second CDN in the three-dimensional correspondence including the content identifier is selected.
  • the selecting the second CDN according to the state value corresponding to the second CDN in the three-dimensional correspondence including the content identifier may be as follows:
  • the state value of the second CDN whose state value is greater than the preset threshold is newly determined, and the re-determined state value is added to the original state value, so that the selected state value is greater than a preset threshold.
  • the new state value of the second CDN For example, the original state value of the second CDN in the three-dimensional correspondence table is not 8. After the second CDN is selected to repeatedly obtain the file and the re-determined state value is 9, the second selected correspondence file is selected in the three-dimensional correspondence table.
  • the new CDN status value is 17, to increase the status value of the route and increase the probability that the route is selected.
  • the routing method provided by the embodiment of the present application obtains the first CDN of the file obtaining request, and if the file requested by the file obtaining request is not stored, and the file obtaining request is obtained for the first time, the first CDN is obtained.
  • a second CDN is randomly selected from the at least one second CDN, and if the file requested by the file acquisition request is not stored, and the file acquisition request is not obtained for the first time, according to the three-dimensional correspondence including the content identifier, Selecting the second CDN in the at least one second CDN connected to the first CDN enables the selection of the second CDN without using the GSLB server for scheduling, and implements CDN self-selection routing.
  • FIG. 3 is a schematic structural diagram of a routing device according to an embodiment of the present disclosure.
  • the provided routing device includes an obtaining unit 101 and a selecting unit 102.
  • the routing device in the embodiment of the present application can be applied to the first CDN involved in the foregoing embodiment, and the related functional modules can be implemented by a hardware processor.
  • the obtaining unit 101 is configured to obtain a file obtaining request, where the file obtaining request includes a content identifier of a file requested by the file obtaining request, and the content identifier is used to identify a file content of the file.
  • the selecting unit 102 is configured to: when the file requested by the file obtaining request is not stored in the first CDN, and the file obtaining request corresponding to the content identifier is obtained for the first time, the first CDN is in the A second CDN is randomly selected from the at least one second CDN connected to the first CDN; the file requested by the file acquisition request is not stored in the first CDN, and the file corresponding to the content identifier is not acquired for the first time.
  • the first CDN selects the second CDN in the at least one second CDN connected to the first CDN according to the three-dimensional correspondence including the content identifier; wherein the three-dimensional correspondence includes the content a correspondence between the identifier, the status value, and the second CDN, the status value being used to characterize the second CDN to provide the first CDN
  • the three-dimensional correspondence includes the content a correspondence between the identifier, the status value, and the second CDN, the status value being used to characterize the second CDN to provide the first CDN
  • the obtaining unit 101 is further configured to: after randomly selecting a second CDN in the at least one second CDN connected to the first CDN, acquire a state of the second CDN.
  • the routing device further includes a processing unit 103, as shown in FIG.
  • the processing unit in the embodiment of the present application is configured to determine a state value of the second CDN, and generate a three-dimensional correspondence that represents the content identifier, the state value, and the second CDN correspondence.
  • the acquiring unit 101 selects the second CDN with the highest state value among the at least one second CDN connected to the first CDN according to the three-dimensional correspondence including the content identifier:
  • the selecting unit 102 specifically selects the second CDN according to the state value corresponding to the second CDN in the three-dimensional correspondence including the content identifier in the following manner:
  • the processing unit 103 may be further configured to: after the selecting unit 102 selects a second CDN whose state value is greater than a preset threshold, re-determining that the selected state value is greater than a preset threshold. a state value of the second CDN; accumulating the re-determined state value and the original state value to obtain a new state value of the selected second CDN whose state value is greater than a preset threshold.
  • the routing device obtains the first CDN of the file obtaining request, and if the file requested by the file obtaining request is not stored, according to whether the file obtaining request is obtained for the first time, Randomly selecting a second CDN in at least one second CDN connected to the CDN, or in accordance with the three-dimensional correspondence including the content identifier, in the first CDN
  • the second CDN is selected from the at least one second CDN that is connected, and the second CDN is selected without using the GSLB server to implement the CDN self-selection routing.
  • the embodiment of the present application further provides a non-transitory computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions can execute any of the foregoing method embodiments. Routing method in .
  • the embodiment of the present application further provides a computer program product, where the computer program product includes a computer program stored on a non-volatile computer storage medium, where the computer program includes program instructions.
  • the computer is caused to perform the routing method of any of the above method embodiments when the program instructions are executed by a computer.
  • FIG. 5 is a schematic diagram of a hardware structure of an electronic device that performs a routing method, as shown in FIG. Electronic equipment includes:
  • processors 510 and memory 520 one processor 510 is taken as an example in FIG.
  • the electronic device that performs the routing method may further include: an input device 530 and an output device 540.
  • the processor 510, the memory 520, the input device 530, and the output device 540 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 520 is used as a non-transitory computer readable storage medium, and can be used for storing a non-transitory software program, a non-transitory computer executable program, and a module, such as an electronic device corresponding to the routing method in the embodiment of the present application.
  • Program instructions/modules for example, acquisition unit 101, selection unit 102, and processing unit 103 shown in FIGS. 3 and 4).
  • the processor 510 performs various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 520, that is, a method of implementing routing of the above method embodiments.
  • the memory 520 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the routing device, and the like.
  • memory 520 can include high speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
  • memory 520 can optionally include memory remotely located relative to processor 510, which can be connected to the network via Routing device. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Input device 530 can receive input numeric or character information and generate key signal inputs related to user settings and function control of the routing device.
  • the output device 540 can include a display device such as a display screen.
  • the one or more modules are stored in the memory 520, and when executed by the one or more processors 510, perform a routing method in any of the above method embodiments.
  • the electronic device of the embodiment of the present application exists in various forms, including but not limited to:
  • Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
  • Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
  • Portable entertainment devices These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
  • the server consists of a processor, a hard disk, a memory, a system bus, etc.
  • the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to implement the embodiment. The purpose of the program.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种路由选择方法及电子设备,该方法中,第一CDN获取文件获取请求,文件获取请求中包括内容标识;在所述第一CDN中未存储所述文件获取请求所请求的文件、且为首次获取所述内容标识对应的文件获取请求情况下,所述第一CDN在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN;在所述第一CDN中未存储所述文件获取请求所请求的文件、且为非首次获取所述内容标识对应的文件获取请求情况下,所述第一CDN依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择第二CDN,实现了CDN自行选择路由。

Description

路由选择方法及电子设备
本申请要求在2016年04月25日提交中国专利局、申请号为201610262868.8、发明名称为“一种路由选择方法及装置”的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种路由选择方法及电子设备。
背景技术
内容分发网络(Content Delivery Network,CDN)***能够实时地根据网络流量和各节点的连接、负载状况以及到用户的距离和响应时间等综合信息进行路由选择,将用户的请求重新导向离用户最近的服务节点上,故应用CDN技术能够解决网络拥挤的状况,提高用户访问网站的响应速度。
目前,CDN实现路由选择,一般采用如下方式:CDN接收客户端发送的文件获取请求,若所述CDN中未存储所述文件获取请求所请求的文件,则所述CDN需要向全球负载均衡(Global Server Load Balance,GSLB)服务器发送路由请求,并由GSLB根据各CDN的状态为发送路由请求的CDN确定路由,以由其他CDN提供所述文件获取请求所请求的文件。
CDN数量比较大,并且每个路由请求均由GSLB服务器处理,导致GSLB服务器负载过重。此外,GSLB服务器要实时获知各CDN的状态,导致占用网络流量,并且CDN数量不断增长,采用GSLB服务器进行调度并确定路由的方式遇到瓶颈。
故如何提供一种新的路由选择方法,解决使用GSLB服务器调度造成的瓶颈问题,是目前业界亟待解决的需要课题。
发明内容
本申请提供一种路由选择方法及电子设备,用以解决现有技术中使用GSLB服务器调度造成的瓶颈问题,实现CDN自行选择路由。
第一方面,本申请实施例提供一种路由选择方法,包括:
第一内容分发网络CDN获取文件获取请求,所述文件获取请求中包括所述文件获取请求所请求文件的内容标识,所述内容标识用于标识文件的文件内容;
在所述第一CDN中未存储所述文件获取请求所请求的文件、且为首次获取所述内容标识对应的文件获取请求情况下,所述第一CDN在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN;
在所述第一CDN中未存储所述文件获取请求所请求的文件、且为非首次获取所述内容标识对应的文件获取请求情况下,所述第一CDN依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择第二CDN;
其中,所述三维对应关系中包括内容标识、状态值和第二CDN的对应关系,所述状态值用于表征所述第二CDN为所述第一CDN提供文件的优劣属性。
第二方面,本申请实施例还提供了一种非暂态性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行本申请上述任一项路由选择方法。
第三方面,本申请实施例还提供了一种电子设备,包括:至少一个处理器;以及存储器;其中,所述存储器存储有可被所述至少一个处理器执行的程序,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本申请上述任一项路由选择方法。
第四方面,本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储在非易失性计算机存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时使所述计算机执行上述任意方法实施例中的路由选择方法。
本申请实施例提供的路由选择方法及电子设备,获取到文件获取请求的第一CDN,若未存储所述文件获取请求所请求的文件,则按照是否为首次获取到该文件获取请求,在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN,或者依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择第二CDN,无需采用GSLB服务 器进行调度,即能实现第二CDN的选择,实现了CDN自行选择路由。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1为本申请实施例提供的路由选择方法流程图;
图2为本申请实施例提供的路由选择方法实施例适用的场景示意图;
图3为本申请实施例提供的路由选择装置实施例结构示意图;
图4为本申请实施例提供的路由选择装置实施例结构示意图;
图5为本申请实施例提供的电子设备结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,以下将参照本申请实施例中的附图,通过实施方式清楚、完整地描述本申请的技术方案,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。
图1为本申请提供的路由选择方法流程图,如图1所示,包括:
S101:第一CDN获取文件获取请求。
本申请实施例中为描述方便,将获取到文件获取请求的CDN称为第一CDN,将与CDN连接的其它CDN称为第二CDN。
本申请实施例中,可预先为每个文件配置一个基于文件内容的内容标识,通过内容标识来标识文件的文件内容。例如,根据文件名确定一个数值,相同数值对应一个内容标识。在具体实施时,一个文件可对应一个内容标识,也可多个文件对应一个内容标识。内容标识可人工配置,也可CDN配置,本申请实施例不做限定。
当客户端发送文件获取请求时,所述文件获取请求中包括所述文件获取请求所请求文件的内容标识,可使得接收到文件获取请求的第一CDN能够确定所述文件获取请求所请求的文件,进而判断第一CDN本身是否存储有所述 文件获取请求所请求的文件,若所述第一CDN中存储所述文件获取请求所请求的文件,则直接将该文件发送给客户端。若所述第一CDN中未存储所述文件获取请求所请求的文件,则可从与第一CDN连接的第二CDN中选择CDN提供所述文件获取请求所请求的文件。
通常,第一CDN为边缘节点,与客户端连接,并与多个其它CDN(第二CDN)连接,换言之,与第一CDN连接的第二CDN的数量为至少一个。图2所示为本申请路由选择方法实施例适用的场景示意图,图2中CDNA为第一CDNA,与客户端连接,并连接3个第二CDN,分别为CDNB1、CDNB2和CDNB3连接。
S102:在所述第一CDN中未存储所述文件获取请求所请求的文件、且为首次获取所述内容标识对应的文件获取请求情况下,所述第一CDN在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN。
本申请实施例中若所述第一CDN中未存储所述文件获取请求所请求的文件,则在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN,例如图2中,CDNA随机在CDNB1、CDNB2和CDNB3三个中随机选择一个。
所述第一CDN在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN之后,可获取所述第二CDN的状态,例如是否存储有所述文件获取请求所请求的文件、若存储有所述文件获取请求所请求的文件该文件的下载速度、丢包率和带宽大小等。依据获取的所述第二CDN的状态,确定表征所述第二CDN提供所述文件获取请求所请求文件的优劣属性的状态值,状态值越高表征所述第二CDN提供所述文件获取请求所请求文件的属性好,例如,存储有所需文件的状态值高于未存储所需文件的状态值,下载速度快的状态值高于下载速度慢的状态值。
本申请实施例选择了第二CDN以及确定了该选择的第二CDN之后,可生成表征所述内容标识,所述状态值以及所述选择的第二CDN对应关系的三维对应关系,以便后续再次接收到包含所述内容标识的文件获取请求时使用。
三维对应关系可采用如下表1所示方式表示
表1
内容标识 第二CDN 状态值
A ACDNB1 8
本申请实施例中针对是否为首次接收到同一内容标识对应的文件获取请求,可采用不同的第二CDN选择方法。
S103:在所述第一CDN中未存储所述文件获取请求所请求的文件、且为非首次获取所述内容标识对应的文件获取请求情况下,所述第一CDN依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择第二CDN。
可选的,本申请实施例中第一CDN再次接收到同一文件的文件获取请求后,可判断包含所述内容标识的三维对应关系中是否包括所述第一CDN连接的全部第二CDN,例如图2中,判断包含所述内容标识的三维对应关系中所述内容标识对应的第二CDN是否包括了CDNB1、CDNB2和CDNB3三个。
若包含所述内容标识的三维对应关系中包括了所述第一CDN连接的全部第二CDN,则可在与所述第一CDN连接的至少一个第二CDN中选择状态值最高的第二CDN。若包含所述内容标识的三维对应关系中未包括所述第一CDN连接的全部第二CDN,则依据所述包含所述内容标识的三维对应关系中已有第二CDN对应的状态值选择第二CDN。以实现选择提供文件的状态属性较好的CDN提供文件。
具体的,所述依据所述包含所述内容标识的三维对应关系中已有第二CDN对应的状态值选择第二CDN,可采用如下方式:
判断包含所述内容标识的三维对应关系中已有第二CDN对应的状态值中是否存在大于预设阈值的状态值,若是,则选择状态值大于预设阈值的第二CDN,以选择状态值相对较高的第二VDN。若否,则在提高了包含所述内容标识的三维对应关系中未包括的第二CDN的状态值的情况下,随机选择一个第二CDN,以使得未在三维对应关系中的第二CDN被选中的概率提高,将全部第二CDN加入到三维对应关系中。
可选的,本申请实施例中选择状态值大于预设阈值的第二CDN之后,重 新确定所述选择的所述状态值大于预设阈值的第二CDN的状态值,将所述重新确定的状态值与原状态值累加,得到所述选择的所述状态值大于预设阈值的第二CDN的新状态值。例如,三维对应关系表中第二CDN的原状态值未8,选择该第二CDN重复获取文件后重新确定的状态值为9,则该三维对应关系表中该被选择重复获取文件的第二CDN新状态值为17,以提高该条路由的状态值,提高该条路由被选中的几率。
本申请实施例提供的路由选择方法,获取到文件获取请求的第一CDN,若未存储所述文件获取请求所请求的文件,且为首次获取到该文件获取请求,在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN,若未存储所述文件获取请求所请求的文件,且为非首次获取到该文件获取请求,依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择第二CDN,无需采用GSLB服务器进行调度即能实现第二CDN的选择,实现了CDN自行选择路由。
基于上述方法实施例提供的路由选择方法,本申请实施例还提供一种路由选择装置,图3所示为本申请实施例提供的路由选择装置结构示意图,如图3所示,本申请实施例提供的路由选择装置包括获取单元101和选择单元102。
本申请实施例中路由选择装置,可应用于上述实施例涉及的第一CDN,并可通过硬件处理器(hardware processor)来实现相关功能模块。
本申请实施例中,获取单元101,用于获取文件获取请求,所述文件获取请求中包括所述文件获取请求所请求文件的内容标识,所述内容标识用于标识文件的文件内容。
选择单元102,用于在所述第一CDN中未存储所述文件获取请求所请求的文件、且为首次获取所述内容标识对应的文件获取请求情况下,所述第一CDN在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN;在所述第一CDN中未存储所述文件获取请求所请求的文件、且为非首次获取所述内容标识对应的文件获取请求情况下,所述第一CDN依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择第二CDN;其中,所述三维对应关系中包括内容标识、状态值和第二CDN的对应关系,所述状态值用于表征所述第二CDN为所述第一CDN提供 文件的优劣属性。
其中,所述获取单元101还用于:在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN之后,获取所述第二CDN的状态。
本申请实施例中,所述路由选择装置还包括处理单元103,如图4所示。
本申请实施例中所述处理单元,用于确定所述第二CDN的状态值,以及生成表征所述内容标识,所述状态值以及所述第二CDN对应关系的三维对应关系。
其中,所述获取单元101采用如下方式依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择状态值最高的第二CDN:
判断包含所述内容标识的三维对应关系中是否包括所述第一CDN连接的全部第二CDN;若是,则在与所述第一CDN连接的至少一个第二CDN中选择状态值最高的第二CDN;若否,则依据所述包含所述内容标识的三维对应关系中已有第二CDN对应的状态值选择第二CDN。
其中,所述选择单元102具体采用如下方式依据所述包含所述内容标识的三维对应关系中已有第二CDN对应的状态值选择第二CDN:
判断包含所述内容标识的三维对应关系中已有第二CDN对应的状态值中是否存在大于预设阈值的状态值;若是,则选择状态值大于预设阈值的第二CDN;若否,则在提高了包含所述内容标识的三维对应关系中未包括的第二CDN的状态值的情况下,随机选择一个第二CDN。
本申请实施例中,所述处理单元103还可用于:在所述选择单元102选择状态值大于预设阈值的第二CDN之后,重新确定所述选择的所述状态值大于预设阈值的第二CDN的状态值;将所述重新确定的状态值与原状态值累加,得到所述选择的所述状态值大于预设阈值的第二CDN的新状态值。
本申请实施例提供的路由选择装置,获取到文件获取请求的第一CDN,若未存储所述文件获取请求所请求的文件,则按照是否为首次获取到该文件获取请求,在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN,或者依据包含所述内容标识的三维对应关系,在与所述第一CDN 连接的至少一个第二CDN中选择第二CDN,无需采用GSLB服务器进行调度,即能实现第二CDN的选择,实现了CDN自行选择路由。
基于上述实施例提供的路由选择方法,本申请实施例还提供一种非暂态性计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意方法实施例中的路由选择方法。
基于上述实施例提供的路由选择方法,本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储在非易失性计算机存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时使所述计算机执行上述任意方法实施例中的路由选择方法。
基于上述实施例提供的路由选择方法,本申请实施例还提供一种执行路由选择方法的电子设备,图5所示为执行路由选择方法的电子设备的硬件结构示意图,如图5所示,该电子设备包括:
一个或多个处理器510以及存储器520,图5中以一个处理器510为例。
执行路由选择方法的电子设备还可以包括:输入装置530和输出装置540。
处理器510、存储器520、输入装置530和输出装置540可以通过总线或者其他方式连接,图5中以通过总线连接为例。
存储器520作为一种非暂态性计算机可读存储介质,可用于存储非暂态性软件程序、非暂态性计算机可执行程序以及模块,如本申请实施例中的路由选择方法的电子设备对应的程序指令/模块(例如,附图3和附图4所示的获取单元101、选择单元102和处理单元103)。处理器510通过运行存储在存储器520中的非暂态性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例路由选择的方法。
存储器520可以包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需要的应用程序;存储数据区可存储根据路由选择装置的使用所创建的数据等。此外,存储器520可以包括高速随机存取存储器,还可以包括非暂态性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态性固态存储器件。在一些实施例中,存储器520可选包括相对于处理器510远程设置的存储器,这些远程存储器可以通过网络连接至 路由选择装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置530可接收输入的数字或字符信息,以及产生与路由选择装置的用户设置以及功能控制有关的键信号输入。输出装置540可包括显示屏等显示设备。
所述一个或者多个模块存储在所述存储器520中,当被所述一个或者多个处理器510执行时,执行上述任意方法实施例中的路由选择方法。
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。
本申请实施例的电子设备以多种形式存在,包括但不限于:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、***总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。
(5)其他具有数据交互功能的电子装置。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例 方案的目的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (16)

  1. 一种路由选择方法,其特征在于,应用于内容分发网络CDN,包括:
    第一CDN获取文件获取请求,所述文件获取请求中包括所述文件获取请求所请求文件的内容标识,所述内容标识用于标识文件的文件内容;
    在所述第一CDN中未存储所述文件获取请求所请求的文件、且为首次获取所述内容标识对应的文件获取请求情况下,所述第一CDN在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN;
    在所述第一CDN中未存储所述文件获取请求所请求的文件、且为非首次获取所述内容标识对应的文件获取请求情况下,所述第一CDN依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择第二CDN;
    其中,所述三维对应关系中包括内容标识、状态值和第二CDN的对应关系,所述状态值用于表征所述第二CDN为所述第一CDN提供文件的属性信息。
  2. 根据权利要求1所述的方法,其特征在于,所述第一CDN在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN之后,所述方法还包括:
    获取所述第二CDN的状态,并确定所述第二CDN的状态值,以及生成表征所述内容标识,所述状态值以及所述第二CDN对应关系的三维对应关系。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一CDN依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择状态值最高的第二CDN,包括:
    所述第一CDN判断包含所述内容标识的三维对应关系中是否包括所述第一CDN连接的全部第二CDN;
    若是,则在与所述第一CDN连接的至少一个第二CDN中选择状态值最高的第二CDN;
    若否,则依据所述包含所述内容标识的三维对应关系中已有第二CDN对应的状态值选择第二CDN。
  4. 根据权利要求3所述的方法,其特征在于,所述依据所述包含所述内容标识的三维对应关系中已有第二CDN对应的状态值选择第二CDN,包括:
    判断包含所述内容标识的三维对应关系中已有第二CDN对应的状态值中 是否存在大于预设阈值的状态值;
    若是,则选择状态值大于预设阈值的第二CDN;
    若否,则在提高了包含所述内容标识的三维对应关系中未包括的第二CDN的状态值的情况下,随机选择一个第二CDN。
  5. 根据权利要求4所述的方法,其特征在于,选择状态值大于预设阈值的第二CDN之后,所述方法还包括:
    重新确定所述选择的所述状态值大于预设阈值的第二CDN的状态值;
    将所述重新确定的状态值与原状态值累加,得到所述选择的所述状态值大于预设阈值的第二CDN的新状态值。
  6. 一种非暂态性计算机存储介质,其特征在于,存储有计算机可执行指令,所述计算机可执行指令设置为:
    获取文件获取请求,所述文件获取请求中包括所述文件获取请求所请求文件的内容标识,所述内容标识用于标识文件的文件内容;
    在第一CDN中未存储所述文件获取请求所请求的文件、且为首次获取所述内容标识对应的文件获取请求情况下,在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN;
    在第一CDN中未存储所述文件获取请求所请求的文件、且为非首次获取所述内容标识对应的文件获取请求情况下,依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择第二CDN;
    其中,所述三维对应关系中包括内容标识、状态值和第二CDN的对应关系,所述状态值用于表征所述第二CDN为所述第一CDN提供文件的属性信息。
  7. 根据权利要求6所述的非暂态性存储介质,其特征在于,所述第一C DN在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN之后,所述计算机可执行指令还用于:
    获取所述第二CDN的状态,并确定所述第二CDN的状态值,以及生成表征所述内容标识,所述状态值以及所述第二CDN对应关系的三维对应关系。
  8. 根据权利要求6或7所述的非暂态性存储介质,其特征在于,依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择状态值最高的第二CDN,包括:
    判断包含所述内容标识的三维对应关系中是否包括所述第一CDN连接的全部第二CDN;
    若是,则在与所述第一CDN连接的至少一个第二CDN中选择状态值最高的第二CDN;
    若否,则依据所述包含所述内容标识的三维对应关系中已有第二CDN对应的状态值选择第二CDN。
  9. 根据权利要求8所述的非暂态性存储介质,其特征在于,所述依据所述包含所述内容标识的三维对应关系中已有第二CDN对应的状态值选择第二CDN,包括:
    判断包含所述内容标识的三维对应关系中已有第二CDN对应的状态值中是否存在大于预设阈值的状态值;
    若是,则选择状态值大于预设阈值的第二CDN;
    若否,则在提高了包含所述内容标识的三维对应关系中未包括的第二CDN的状态值的情况下,随机选择一个第二CDN。
  10. 根据权利要求9所述的非暂态性存储介质,其特征在于,选择状态值大于预设阈值的第二CDN之后,所述计算机可执行指令还用于:
    重新确定所述选择的所述状态值大于预设阈值的第二CDN的状态值;
    将所述重新确定的状态值与原状态值累加,得到所述选择的所述状态值大于预设阈值的第二CDN的新状态值。
  11. 一种电子设备,其特征在于,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:
    获取文件获取请求,所述文件获取请求中包括所述文件获取请求所请求文件的内容标识,所述内容标识用于标识文件的文件内容;
    在第一CDN中未存储所述文件获取请求所请求的文件、且为首次获取所述内容标识对应的文件获取请求情况下,在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN;
    在第一CDN中未存储所述文件获取请求所请求的文件、且为非首次获取 所述内容标识对应的文件获取请求情况下,依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择第二CDN;
    其中,所述三维对应关系中包括内容标识、状态值和第二CDN的对应关系,所述状态值用于表征所述第二CDN为所述第一CDN提供文件的属性信息。
  12. 根据权利要求11所述的电子设备,其特征在于,所述第一C DN在与所述第一CDN连接的至少一个第二CDN中随机选择一个第二CDN之后,所述程序还设置为执行:
    获取所述第二CDN的状态,并确定所述第二CDN的状态值,以及生成表征所述内容标识,所述状态值以及所述第二CDN对应关系的三维对应关系。
  13. 根据权利要求11或12所述的电子设备,其特征在于,依据包含所述内容标识的三维对应关系,在与所述第一CDN连接的至少一个第二CDN中选择状态值最高的第二CDN,包括:
    判断包含所述内容标识的三维对应关系中是否包括所述第一CDN连接的全部第二CDN;
    若是,则在与所述第一CDN连接的至少一个第二CDN中选择状态值最高的第二CDN;
    若否,则依据所述包含所述内容标识的三维对应关系中已有第二CDN对应的状态值选择第二CDN。
  14. 根据权利要求13所述的电子设备,其特征在于,所述依据所述包含所述内容标识的三维对应关系中已有第二CDN对应的状态值选择第二CDN,包括:
    判断包含所述内容标识的三维对应关系中已有第二CDN对应的状态值中是否存在大于预设阈值的状态值;
    若是,则选择状态值大于预设阈值的第二CDN;
    若否,则在提高了包含所述内容标识的三维对应关系中未包括的第二CDN的状态值的情况下,随机选择一个第二CDN。
  15. 根据权利要求14所述的电子设备,其特征在于,选择状态值大于预设阈值的第二CDN之后,所述程序还设置为执行:
    重新确定所述选择的所述状态值大于预设阈值的第二CDN的状态值;
    将所述重新确定的状态值与原状态值累加,得到所述选择的所述状态值 大于预设阈值的第二CDN的新状态值。
  16. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非易失性计算机存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1-5任一项所述的路由选择方法。
PCT/CN2016/100059 2016-04-25 2016-09-26 路由选择方法及电子设备 WO2017185614A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610262868.8A CN105847154A (zh) 2016-04-25 2016-04-25 一种路由选择方法及装置
CN201610262868.8 2016-04-25

Publications (1)

Publication Number Publication Date
WO2017185614A1 true WO2017185614A1 (zh) 2017-11-02

Family

ID=56589094

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100059 WO2017185614A1 (zh) 2016-04-25 2016-09-26 路由选择方法及电子设备

Country Status (2)

Country Link
CN (1) CN105847154A (zh)
WO (1) WO2017185614A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847154A (zh) * 2016-04-25 2016-08-10 乐视控股(北京)有限公司 一种路由选择方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030115283A1 (en) * 2001-12-13 2003-06-19 Abdulkadev Barbir Content request routing method
CN101394423A (zh) * 2008-09-27 2009-03-25 中兴通讯股份有限公司 一种媒体定位、搜索方法和***
CN101860720A (zh) * 2009-04-10 2010-10-13 中兴通讯股份有限公司 内容定位方法及内容分发网络节点
US9137302B1 (en) * 2009-12-29 2015-09-15 The Directv Group, Inc. Content distribution network selector
CN105847154A (zh) * 2016-04-25 2016-08-10 乐视控股(北京)有限公司 一种路由选择方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101287011A (zh) * 2008-05-26 2008-10-15 蓝汛网络科技(北京)有限公司 内容分发网络中响应用户服务请求的方法、***和设备
CN102447712B (zh) * 2012-01-20 2015-07-08 华为技术有限公司 内容分发网络中节点互联的方法、***及节点
CN102970381A (zh) * 2012-12-21 2013-03-13 网宿科技股份有限公司 基于内容分发网络按比重轮询的多源负载均衡方法和***
CN103747112A (zh) * 2013-12-24 2014-04-23 乐视网信息技术(北京)股份有限公司 一种cdn回源的方法、第一服务器及***
CN104980416A (zh) * 2014-07-31 2015-10-14 腾讯科技(深圳)有限公司 一种内容分布网络中的数据访问方法、装置和***

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030115283A1 (en) * 2001-12-13 2003-06-19 Abdulkadev Barbir Content request routing method
CN101394423A (zh) * 2008-09-27 2009-03-25 中兴通讯股份有限公司 一种媒体定位、搜索方法和***
CN101860720A (zh) * 2009-04-10 2010-10-13 中兴通讯股份有限公司 内容定位方法及内容分发网络节点
US9137302B1 (en) * 2009-12-29 2015-09-15 The Directv Group, Inc. Content distribution network selector
CN105847154A (zh) * 2016-04-25 2016-08-10 乐视控股(北京)有限公司 一种路由选择方法及装置

Also Published As

Publication number Publication date
CN105847154A (zh) 2016-08-10

Similar Documents

Publication Publication Date Title
US20170155695A1 (en) Method, device and system for uploading live video
US20170155928A1 (en) Method, Device and System for Playing Live Video
WO2017107542A1 (zh) 视频节目获取方法、设备及***
JP2017118575A (ja) データネットワークにおける負荷分散
WO2017181587A1 (zh) Cdn网络中的节点管理方法和电子设备
US9712612B2 (en) Method for improving mobile network performance via ad-hoc peer-to-peer request partitioning
US20170185454A1 (en) Method and Electronic Device for Determining Resource Consumption of Task
US20170171344A1 (en) Scheduling method and server for content delivery network service node
US20170180470A1 (en) Method and electronic device for sending CDN address
US11889133B2 (en) Burst traffic processing method, computer device and readable storage medium
US9516684B2 (en) Data transmission method, data acquiring method, and electronic device
US20180013610A1 (en) File delivery method, apparatus and system
US10992972B1 (en) Automatic identification of impermissable account sharing
US11968248B2 (en) Content-based distribution and execution of analytics applications on distributed datasets
CN107920108A (zh) 一种媒体资源的推送方法、客户端及服务器
US20170270561A1 (en) Method, terminal and server for monitoring advertisement exhibition
US9954929B2 (en) Techniques for promoting and viewing social content written by nearby people
US10484484B2 (en) Context-aware task processing for multiple devices
US9195564B2 (en) Advanced notification of workload
US20190370293A1 (en) Method and apparatus for processing information
US20140289307A1 (en) Method for transmitting data between electronic devices
KR102158389B1 (ko) 컨텐츠 중심 네트워크에서 패킷 특성을 고려하는 노드의 동작 방법 및 노드
WO2017185614A1 (zh) 路由选择方法及电子设备
WO2017215144A1 (zh) 调度方法、调度响应方法及设备和***
US20170063956A1 (en) Coordinating state changes among multiple media devices

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16900123

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16900123

Country of ref document: EP

Kind code of ref document: A1