WO2023115592A1 - Back-to-source method and apparatus of cdn node server - Google Patents

Back-to-source method and apparatus of cdn node server Download PDF

Info

Publication number
WO2023115592A1
WO2023115592A1 PCT/CN2021/141411 CN2021141411W WO2023115592A1 WO 2023115592 A1 WO2023115592 A1 WO 2023115592A1 CN 2021141411 W CN2021141411 W CN 2021141411W WO 2023115592 A1 WO2023115592 A1 WO 2023115592A1
Authority
WO
WIPO (PCT)
Prior art keywords
node server
cdn node
data
client
request
Prior art date
Application number
PCT/CN2021/141411
Other languages
French (fr)
Chinese (zh)
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 WO2023115592A1 publication Critical patent/WO2023115592A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • 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
    • 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

A back-to-source method of a CDN node server, comprising: obtaining a data request of a user terminal according to a connection relationship between a second-level CDN node server and the user terminal, and searching for corresponding request data according to the data request and sending the request data to the user terminal (S101); if the data request is not responded, the second-level CDN node server sending the data request to a first-level CDN node server to search for the request data and send same to the user terminal (S102); and if the data request is not responded, the first-level CDN node server sending the data request to a source server to search for the request data and send same to the user terminal (S103). The request data is provided by means of the multi-level CDN node servers, so that the number of times that the data returns back to a source node server is greatly reduced, the load of the source node server is reduced, and the stability of data obtaining is improved.

Description

一种CDN节点服务器的回源方法及装置A method and device for returning to the source of a CDN node server 技术领域technical field
本申请涉及一种数据访问方法,尤其涉及一种CDN节点服务器的回源方法。本申请还涉及一种CDN节点服务器的回源方法及装置。The present application relates to a data access method, in particular to a CDN node server back-to-source method. The present application also relates to a method and device for back-to-source of a CDN node server.
背景技术Background technique
CDN(内容分发网络)的基本思路是尽可能避开互联网上有可能影响数据传输速度和稳定性的瓶颈和环节,使内容传输的更快、更稳定。其主要的设置方式是通过在网络各处放置节点服务器构成的在现有的互联网基础之上的一层智能虚拟网络,CDN系统能够实时地根据网络流量和各节点的连接、负载状况以及到用户的距离和响应时间等综合信息将用户的请求重新导向离用户最近的服务节点上。其目的是使用户可就近取得所需内容,解决Internet网络拥挤的状况,提高用户访问网站的响应速度。The basic idea of CDN (Content Distribution Network) is to avoid bottlenecks and links on the Internet that may affect the speed and stability of data transmission as much as possible, so as to make content transmission faster and more stable. Its main setting method is to form a layer of intelligent virtual network based on the existing Internet by placing node servers all over the network. Comprehensive information such as distance and response time will redirect the user's request to the service node closest to the user. Its purpose is to enable users to obtain the required content nearby, solve the congestion situation of the Internet network, and improve the response speed of users' access to websites.
现有技术中,常规的CDN的回源策略是当有用户访问某一个URL的时候,如果被解析到的那个CDN节点没有缓存响应的内容,或者是缓存已经到期,就会回源站去获取,这种回源方式导致源站的负载压力会很大,从而影响数据获取的稳定性和速度。In the existing technology, the conventional CDN back-to-origin strategy is that when a user visits a certain URL, if the resolved CDN node does not cache the content of the response, or the cache has expired, it will go back to the origin site Acquisition, this method of returning to the source will cause a lot of load pressure on the source site, which will affect the stability and speed of data acquisition.
发明内容Contents of the invention
为解决常规回源方式导致的源站负载过大的问题,本申请提供一种CDN节点服务器的回源方法。本申请还涉及一种CDN节点服务器的回源方法及装置。In order to solve the problem of excessive load on the origin site caused by conventional back-to-source methods, this application provides a back-to-source method for CDN node servers. The present application also relates to a method and device for back-to-source of a CDN node server.
本申请提供一种CDN节点服务器的回源方法,包括:This application provides a back-to-source method for a CDN node server, including:
根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求, 并根据所述数据请求搜索对应的请求数据发送到用户端;Obtain the data request of the client according to the connection relationship between the secondary CDN node server and the client, and search for corresponding request data according to the data request and send it to the client;
若所述数据请求未响应,则所述二级CDN节点服务器将所述数据请求发送到一级CDN节点服务器搜索所述请求数据发送到用户端;If the data request does not respond, the secondary CDN node server sends the data request to the primary CDN node server to search for the requested data and send it to the client;
若所述数据请求未响应,则所述一级CDN节点服务器将所述数据请求发送到源服务器搜索所述请求数据发送到用户端。If the data request is not responded, the primary CDN node server sends the data request to the source server to search for the requested data and send it to the client.
可选的,在所述数据请求发送到源服务器之前,还包括:Optionally, before the data request is sent to the source server, it also includes:
所述一级节点服务器将所述数据请求发送到相邻的一级CDN节点服务器搜索所述请求数据发送到用户端。The first-level node server sends the data request to an adjacent first-level CDN node server to search for the requested data and send it to the client.
可选的,所述根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,包括:Optionally, the obtaining the data request of the client according to the connection relationship between the secondary CDN node server and the client includes:
获取多个二级CDN节点服务器的位置信息,根据所述位置信息判断所述二级CDN节点服务器与所述用户端的距离信息,根据所述距离信息确定所述二级CDN节点服务器。Obtaining location information of multiple secondary CDN node servers, judging distance information between the secondary CDN node server and the client according to the location information, and determining the secondary CDN node server according to the distance information.
可选的,所述数据请求未响应包括:数据未存储、数据失效或者数据错误。Optionally, the non-response to the data request includes: the data is not stored, the data is invalid or the data is wrong.
可选的,所述二级CDN节点服务器和一级CDN节点服务器实时记录负载信息,并在所述负载信息超过预设阈值时,将所述数据请求转发到相邻的同级CDN节点服务器。Optionally, the secondary CDN node server and the primary CDN node server record load information in real time, and when the load information exceeds a preset threshold, forward the data request to an adjacent CDN node server at the same level.
本申请还提供一种CDN节点服务器的回源装置,包括:The present application also provides a back-to-source device for a CDN node server, including:
回源模块,用于根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,并根据所述数据请求搜索对应的请求数据发送到用户端;The back-to-source module is used to obtain the data request of the client according to the connection relationship between the secondary CDN node server and the client, and search for corresponding request data according to the data request and send it to the client;
第一转发模块,用于若所述数据请求未响应,则所述二级CDN节点服务器将所述数据请求发送到一级CDN节点服务器搜索所述请求数据发送到用户端;The first forwarding module is configured to send the data request to the first-level CDN node server by the secondary CDN node server if the data request is not responded to, and send the request data to the client;
第二转发模块,用于若所述数据请求未响应,则所述一级CDN节点服务 器将所述数据请求发送到源服务器搜索所述请求数据发送到用户端。The second forwarding module is used to send the data request to the source server if the data request is not responded to by the first-level CDN node server to search for the request data and send it to the client.
可选的,所述第二转发模块还包括:Optionally, the second forwarding module further includes:
平行转发单元,用于所述一级节点服务器将所述数据请求发送到相邻的一级CDN节点服务器搜索所述请求数据发送到用户端。The parallel forwarding unit is used for the first-level node server to send the data request to an adjacent first-level CDN node server to search for the requested data and send it to the client.
可选的,还包括:Optionally, also include:
位置查询模块,用于获取多个二级CDN节点服务器的位置信息,根据所述位置信息判断所述二级CDN节点服务器与所述用户端的距离信息,根据所述距离信息确定所述二级CDN节点服务器。A location query module, configured to acquire location information of multiple secondary CDN node servers, judge distance information between the secondary CDN node server and the client according to the location information, and determine the secondary CDN according to the distance information node server.
可选的,所述数据请求未响应包括:数据未存储、数据失效或者数据错误。Optionally, the non-response to the data request includes: the data is not stored, the data is invalid or the data is wrong.
可选的,所述二级CDN节点服务器和一级CDN节点服务器实时记录负载信息,并在所述负载信息超过预设阈值时,将所述数据请求转发到相邻的同级CDN节点服务器。Optionally, the secondary CDN node server and the primary CDN node server record load information in real time, and when the load information exceeds a preset threshold, forward the data request to an adjacent CDN node server at the same level.
本申请相对与现有技术的优点:Advantages of the present application relative to the prior art:
本申请提供一种CDN节点服务器的回源方法,包括:根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,并根据所述数据请求搜索对应的请求数据发送到用户端;若所述数据请求未响应,则所述二级CDN节点服务器将所述数据请求发送到一级CDN节点服务器搜索所述请求数据发送到用户端;若所述数据请求未响应,则所述一级CDN节点服务器将所述数据请求发送到源服务器搜索所述请求数据发送到用户端。通过多级的CDN节点服务器提供请求数据,极大的减少了数据回源到源节点服务器的次数,降低源节点服务器负载,提高数据获取的稳定性。The present application provides a CDN node server back-to-source method, including: obtaining the data request of the client according to the connection relationship between the secondary CDN node server and the client, and searching for the corresponding request data according to the data request and sending it to the client; If the data request does not respond, the secondary CDN node server sends the data request to the primary CDN node server to search for the requested data and sends it to the client; if the data request does not respond, the primary CDN The node server sends the data request to the source server to search and send the requested data to the client. The request data is provided through multi-level CDN node servers, which greatly reduces the number of times data returns to the source node server, reduces the load on the source node server, and improves the stability of data acquisition.
附图说明Description of drawings
图1是本申请中CDN节点服务器的回源的流程图。Fig. 1 is a flow chart of back-to-source of the CDN node server in this application.
图2是本申请中CDN节点服务器数据的平行请求示意图。FIG. 2 is a schematic diagram of parallel requests for CDN node server data in this application.
图3是本申请中CDN节点服务器的回源装置示意图。FIG. 3 is a schematic diagram of a back-to-source device of a CDN node server in this application.
具体实施方式Detailed ways
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。In the following description, numerous specific details are set forth in order to provide a thorough understanding of the application. However, the present application can be implemented in many other ways different from those described here, and those skilled in the art can make similar promotions without violating the connotation of the present application. Therefore, the present application is not limited by the specific implementation disclosed below.
本申请提供一种CDN节点服务器的回源方法,包括:根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,并根据所述数据请求搜索对应的请求数据发送到用户端;若所述数据请求未响应,则所述二级CDN节点服务器将所述数据请求发送到一级CDN节点服务器搜索所述请求数据发送到用户端;若所述数据请求未响应,则所述一级CDN节点服务器将所述数据请求发送到源服务器搜索所述请求数据发送到用户端。通过多级的CDN节点服务器提供请求数据,极大的减少了数据回源到源节点服务器的次数,降低源节点服务器负载,提高数据获取的稳定性。The present application provides a CDN node server back-to-source method, including: obtaining the data request of the client according to the connection relationship between the secondary CDN node server and the client, and searching for the corresponding request data according to the data request and sending it to the client; If the data request does not respond, the secondary CDN node server sends the data request to the primary CDN node server to search for the requested data and sends it to the client; if the data request does not respond, the primary CDN The node server sends the data request to the source server to search and send the requested data to the client. The request data is provided through multi-level CDN node servers, which greatly reduces the number of times data returns to the source node server, reduces the load on the source node server, and improves the stability of data acquisition.
图1是本申请中CDN节点服务器的回源的流程图。Fig. 1 is a flow chart of back-to-source of the CDN node server in this application.
请参照图1所示,S101根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,并根据所述数据请求搜索对应的请求数据发送到用户端。Please refer to FIG. 1 , S101 obtains the data request of the client according to the connection relationship between the secondary CDN node server and the client, and searches for corresponding request data according to the data request and sends it to the client.
本申请中所述CDN节点服务器是多级分布的,包括源服务器,所述原服务器是总的服务器,包括数据原始存储是在所述源服务器中进行的。所述源服务器连接多个一级CDN服务器,所述一级服务器是分布在各个大区的。例如所述大区可以说一个国家,或者一个省份。所述一级CDN节点服务器之间还相互连接,并可以进行通讯和数据传输。The CDN node servers described in this application are multi-level distributed, including source servers, and the original server is a general server, including data original storage is performed in the source server. The source server is connected to multiple first-level CDN servers, and the first-level servers are distributed in various regions. For example, the region can be a country or a province. The first-level CDN node servers are also connected to each other, and can perform communication and data transmission.
每个所述一级CDN服务器连接有多个二级CDN服务器,所述二级CDN服务器通过所述一级CDN服务器从所述源服务器中获取请求数据,和将所述 请求数据发送给各个客户端。Each of the first-level CDN servers is connected to multiple second-level CDN servers, and the second-level CDN servers obtain request data from the source server through the first-level CDN servers, and send the request data to each client end.
本申请中,包括一级CDN服务器和二级CDN服务器在内的各个CDN服务器通过通讯光缆连接进行数据传递。具体的,每个所述CDN服务器是一个节点,其包括CDN Cache设备,然后各个节点组成CDN节点系统,所述各个节点通过SLB(负载均衡)设备进行管理。其中,所述CDN Cache设备是节点中主要功能设备。In this application, each CDN server, including the first-level CDN server and the second-level CDN server, performs data transmission through a communication optical cable connection. Concretely, each described CDN server is a node, and it comprises CDN Cache equipment, then each node forms CDN node system, and described each node is managed by SLB (load balancing) equipment. Wherein, the CDN Cache device is the main functional device in the node.
在本申请中,用户端和二级CDN节点服务器连接并通讯,具体的,所述二级CDN节点服务器是距离最优的节点,用于减少请求数据的传输时间,降低用户等待时间。优选的,本申请通过获取多个二级CDN节点服务器的位置信息,根据所述位置信息判断所述二级CDN节点服务器与所述用户端的距离信息,根据所述距离信息确定所述二级CDN节点服务器。In this application, the client connects and communicates with the secondary CDN node server. Specifically, the secondary CDN node server is the node with the optimal distance, which is used to reduce the transmission time of requested data and reduce the waiting time of users. Preferably, the present application obtains the location information of multiple secondary CDN node servers, judges the distance information between the secondary CDN node server and the client according to the location information, and determines the secondary CDN node server according to the distance information. node server.
另一种实施方式是,根据如下公式判断所述回源的最优二级CDN节点服务器,所述公式如下:Another embodiment is to judge the optimal secondary CDN node server for back-to-source according to the following formula, the formula is as follows:
P=R*T*Tio*C*F/SP=R*T*Tio*C*F/S
其中,所述S是地理上的距离、R是CDN服务器可用的磁盘空间、T是输出带宽、Tio是磁盘的I/O带宽、C是CPU的处理能力、F是所述CDN节点的空闲资源。所述P越大,则选择权重越大。Wherein, the S is the geographical distance, R is the available disk space of the CDN server, T is the output bandwidth, Tio is the I/O bandwidth of the disk, C is the processing power of the CPU, and F is the free resource of the CDN node . The greater the P, the greater the selection weight.
所述用户对向所述二级CDN节点服务器发送数据请求,所述二级CDN节点服务器根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,并根据所述数据请求搜索对应的请求数据发送到用户端。The user pair sends a data request to the secondary CDN node server, and the secondary CDN node server obtains the data request of the client according to the connection relationship between the secondary CDN node server and the client, and searches for a corresponding request according to the data request Data is sent to the client.
通常,若有用户请求过所述请求数据,则所述二级CDN节点服务器可以根据所述数据请求提高请求数据。所述二级CDN节点服务器从缓存中查询和搜索所述请求数据,当搜索到所述请求数据,则将该请求数据发送到用户端显示。Usually, if a user has requested the request data, the secondary CDN node server may increase the request data according to the data request. The secondary CDN node server queries and searches the request data from the cache, and when the request data is found, sends the request data to the client for display.
请参照图1所示,S102若所述数据请求未响应,则所述二级CDN节点服务器将所述数据请求发送到一级CDN节点服务器搜索所述请求数据发送到用 户端。Please refer to FIG. 1, S102 If the data request is not responded, the secondary CDN node server sends the data request to the primary CDN node server to search for the requested data and send it to the client.
本申请中,若所述请求数据没有由用户端申请过,则该数据将不会在所述二级CDN服务器中存在,或者该请求数据因为时间太长而失效,则该请求数据也无法提供给用户端,此时所述二级CDN节点服务器将无法响应所述用户端的数据请求。具体的,所述数据请求未响应包括:数据未存储、数据失效或者数据错误。本申请所述用户端是指任意一个连接有相同的二级CDN服务器的用户端。In this application, if the requested data has not been applied for by the client, the data will not exist in the secondary CDN server, or the requested data is invalid due to too long time, and the requested data cannot be provided At this time, the secondary CDN node server will not be able to respond to the data request of the client. Specifically, the non-response to the data request includes: the data is not stored, the data is invalid or the data is wrong. The client mentioned in this application refers to any client connected to the same secondary CDN server.
在具体的操作中,所述二级节点服务器将设置由预设的搜索时长,当超过所述预设时长还未响应所述数据请求,则判定所述二级CDN服务器未响应。In a specific operation, the secondary node server will set a preset search time period, and if the data request has not been responded to within the preset time period, it will be determined that the secondary CDN server has not responded.
接下来,所述二级CDN服务器将所述数据请求发送到于所述二级CDN服务器有直接的连接关系的一级CDN服务器,由所述一级CDN服务器搜索所述请求数据,并将所述请求数据发送到用户端。Next, the secondary CDN server sends the data request to a primary CDN server directly connected to the secondary CDN server, and the primary CDN server searches for the requested data and sends the requested data to the secondary CDN server. The above request data is sent to the client.
图2是本申请中CDN节点服务器数据的平行请求示意图。FIG. 2 is a schematic diagram of parallel requests for CDN node server data in this application.
请参照图2所示,S201当所述一级CDN节点服务器未响应所述数据请求,则将所述数据请求发送到相邻的一级CDN服务器中。Please refer to FIG. 2, S201: When the primary CDN node server does not respond to the data request, send the data request to an adjacent primary CDN server.
所述一级CDN服务器若未响应,则判定所述一级CDN节点服务器也无法提供所述请求数据,因此可以继续从所述一级CDN节点服务器相邻的一级节点服务器中进行搜索。If the first-level CDN server does not respond, it is determined that the first-level CDN node server cannot provide the requested data, so the search can be continued from the first-level node servers adjacent to the first-level CDN node server.
请参照图2所示,所述相邻的一级CDN服务器将所述数据请求发送到源服务器。Please refer to FIG. 2 , the adjacent first-level CDN server sends the data request to the source server.
请参照图1所示,S103若所述数据请求未响应,则所述一级CDN节点服务器将所述数据请求发送到源服务器搜索所述请求数据发送到用户端。Please refer to FIG. 1, S103 If the data request is not responded, the primary CDN node server sends the data request to the source server to search for the requested data and send it to the client.
当所述一级CDN节点服务器或者相邻的一级CDN节点服务器未响应所述数据请求,则判定该一级CDN节点服务器或者相邻的一级节点服务器未缓存有所述请求数据,因此需要从源服务器中获取,所以将所述数据请求发送到所 述源服务器中搜索所述请求数据,并将所述请求数据发送到用户端。When the first-level CDN node server or the adjacent first-level CDN node server does not respond to the data request, it is determined that the first-level CDN node server or the adjacent first-level node server does not have the requested data cached, so it is necessary to Obtained from the source server, so the data request is sent to the source server to search for the requested data, and the requested data is sent to the client.
此时,所述一级CDN节点服务器和所述二级CDN节点服务器将所述请求数据进行缓存。当所述请求数据再次被请求时,可以从所述二级或者一级CDN节点服务器中获取。优选的,所述二级CDN节点服务器和一级CDN节点服务器实时还记录负载信息,并在所述负载信息超过预设阈值时,将所述数据请求转发到相邻的同级CDN节点服务器。At this time, the first-level CDN node server and the second-level CDN node server cache the request data. When the requested data is requested again, it may be obtained from the secondary or primary CDN node server. Preferably, the second-level CDN node server and the first-level CDN node server also record load information in real time, and when the load information exceeds a preset threshold, forward the data request to an adjacent CDN node server at the same level.
所述二级CDN节点服务器在获得请求数据后,将根据用户的数据请求判断用户端设备类型,根据所述设备类型对数据进行处理后发送到用户端进行显示。After the secondary CDN node server obtains the requested data, it will determine the device type of the user terminal according to the user's data request, process the data according to the device type, and send it to the user terminal for display.
优选的,所述二级CDN节点服务器中还包括历史数据存储设备,该历史数据存储设备存储由历史数据和设备类型和历史数据对应表。当所述二级CDN节点服务器获取到数据请求后,首先判断所述数据请求中包含的用户端设备类型,根据所述设备端类型从所述设备类型和历史数据对应表查找历史数据中是否具有用户端请求的与所述用户端设备类型对应的请求数据,若没有则进行回源,若有则将该历史数据发送到用户端。Preferably, the secondary CDN node server further includes a historical data storage device, and the historical data storage device stores historical data and a table corresponding to device types and historical data. After the secondary CDN node server obtains the data request, it first judges the type of client device included in the data request, and searches the history data from the device type and historical data correspondence table according to the device type to see if there is If there is no request data corresponding to the type of the client device requested by the client, it will be returned to the source, and if it is, the historical data will be sent to the client.
本申请还提供一种CDN节点服务器的回源装置,包括:回源模块301、第一转发模块302和第二转发模块303。The present application also provides a back-to-source device for a CDN node server, including: a back-to-source module 301 , a first forwarding module 302 and a second forwarding module 303 .
图3是本申请中CDN节点服务器的回源装置示意图。FIG. 3 is a schematic diagram of a back-to-source device of a CDN node server in this application.
请参照图3所示,回源模块301,用于根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,并根据所述数据请求搜索对应的请求数据发送到用户端。Please refer to FIG. 3 , the back-to-source module 301 is used to obtain the data request of the client according to the connection relationship between the secondary CDN node server and the client, and search for corresponding request data according to the data request and send it to the client.
本申请中所述CDN节点服务器是多级分布的,包括源服务器,所述原服务器是总的服务器,包括数据原始存储是在所述源服务器中进行的。所述源服务器连接多个一级CDN服务器,所述一级服务器是分布在各个大区的。例如所述大区可以说一个国家,或者一个省份。所述一级CDN节点服务器之间还相互连接,并可以进行通讯和数据传输。The CDN node servers described in this application are multi-level distributed, including source servers, and the original server is a general server, including data original storage is performed in the source server. The source server is connected to multiple first-level CDN servers, and the first-level servers are distributed in various regions. For example, the region can be a country or a province. The first-level CDN node servers are also connected to each other, and can perform communication and data transmission.
每个所述一级CDN服务器连接有多个二级CDN服务器,所述二级CDN服务器通过所述一级CDN服务器从所述源服务器中获取请求数据,和将所述请求数据发送给各个客户端。Each of the first-level CDN servers is connected to multiple second-level CDN servers, and the second-level CDN servers obtain request data from the source server through the first-level CDN servers, and send the request data to each client end.
本申请中,包括一级CDN服务器和二级CDN服务器在内的各个CDN服务器通过通讯光缆连接进行数据传递。具体的,每个所述CDN服务器是一个节点,其包括CDN Cache设备,然后各个节点组成CDN节点系统,所述各个节点通过SLB(负载均衡)设备进行管理。其中,所述CDN Cache设备是节点中主要功能设备。In this application, each CDN server, including the first-level CDN server and the second-level CDN server, performs data transmission through a communication optical cable connection. Concretely, each described CDN server is a node, and it comprises CDN Cache equipment, then each node forms CDN node system, and described each node is managed by SLB (load balancing) equipment. Wherein, the CDN Cache device is the main functional device in the node.
在本申请中,用户端和二级CDN节点服务器连接并通讯,具体的,所述二级CDN节点服务器是距离最优的节点,用于减少请求数据的传输时间,降低用户等待时间。优选的,本申请通过获取多个二级CDN节点服务器的位置信息,根据所述位置信息判断所述二级CDN节点服务器与所述用户端的距离信息,根据所述距离信息确定所述二级CDN节点服务器。In this application, the client connects and communicates with the secondary CDN node server. Specifically, the secondary CDN node server is the node with the optimal distance, which is used to reduce the transmission time of requested data and reduce the waiting time of users. Preferably, the present application obtains the location information of multiple secondary CDN node servers, judges the distance information between the secondary CDN node server and the client according to the location information, and determines the secondary CDN node server according to the distance information. node server.
另一种实施方式是,根据如下公式判断所述回源的最优二级CDN节点服务器,所述公式如下:Another embodiment is to judge the optimal secondary CDN node server for back-to-source according to the following formula, the formula is as follows:
P=R*T*Tio*C*F/SP=R*T*Tio*C*F/S
其中,所述S是地理上的距离、R是CDN服务器可用的磁盘空间、T是输出带宽、Tio是磁盘的I/O带宽、C是CPU的处理能力、F是所述CDN节点的空闲资源。所述P越大,则选择权重越大。Wherein, the S is the geographical distance, R is the available disk space of the CDN server, T is the output bandwidth, Tio is the I/O bandwidth of the disk, C is the processing power of the CPU, and F is the free resource of the CDN node . The greater the P, the greater the selection weight.
所述用户对向所述二级CDN节点服务器发送数据请求,所述二级CDN节点服务器根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,并根据所述数据请求搜索对应的请求数据发送到用户端。The user pair sends a data request to the secondary CDN node server, and the secondary CDN node server obtains the data request of the client according to the connection relationship between the secondary CDN node server and the client, and searches for a corresponding request according to the data request Data is sent to the client.
通常,若有用户请求过所述请求数据,则所述二级CDN节点服务器可以根据所述数据请求提高请求数据。所述二级CDN节点服务器从缓存中查询和搜索所述请求数据,当搜索到所述请求数据,则将该请求数据发送到用户端显示。Usually, if a user has requested the request data, the secondary CDN node server may increase the request data according to the data request. The secondary CDN node server queries and searches the request data from the cache, and when the request data is found, sends the request data to the client for display.
请参照图3所示,第一转发模块302,用于若所述数据请求未响应,则所述二级CDN节点服务器将所述数据请求发送到一级CDN节点服务器搜索所述请求数据发送到用户端。Please refer to FIG. 3 , the first forwarding module 302 is configured to send the data request to the first-level CDN node server if the data request is not responded to by the second-level CDN node server. user terminal.
本申请中,若所述请求数据没有由用户端申请过,则该数据将不会在所述二级CDN服务器中存在,或者该请求数据因为时间太长而失效,则该请求数据也无法提供给用户端,此时所述二级CDN节点服务器将无法响应所述用户端的数据请求。具体的,所述数据请求未响应包括:数据未存储、数据失效或者数据错误。本申请所述用户端是指任意一个连接有相同的二级CDN服务器的用户端。In this application, if the requested data has not been applied for by the client, the data will not exist in the secondary CDN server, or the requested data is invalid due to too long time, and the requested data cannot be provided At this time, the secondary CDN node server will not be able to respond to the data request of the client. Specifically, the non-response to the data request includes: the data is not stored, the data is invalid or the data is wrong. The client mentioned in this application refers to any client connected to the same secondary CDN server.
在具体的操作中,所述二级节点服务器将设置由预设的搜索时长,当超过所述预设时长还未响应所述数据请求,则判定所述二级CDN服务器未响应。In a specific operation, the secondary node server will set a preset search time period, and if the data request has not been responded to within the preset time period, it will be determined that the secondary CDN server has not responded.
接下来,所述二级CDN服务器将所述数据请求发送到于所述二级CDN服务器有直接的连接关系的一级CDN服务器,由所述一级CDN服务器搜索所述请求数据,并将所述请求数据发送到用户端。Next, the secondary CDN server sends the data request to a primary CDN server directly connected to the secondary CDN server, and the primary CDN server searches for the requested data and sends the requested data to the secondary CDN server. The above request data is sent to the client.
请参照图2所示,S201当所述一级CDN节点服务器未响应所述数据请求,则将所述数据请求发送到相邻的一级CDN服务器中。Please refer to FIG. 2, S201: When the primary CDN node server does not respond to the data request, send the data request to an adjacent primary CDN server.
所述一级CDN服务器若未响应,则判定所述一级CDN节点服务器也无法提供所述请求数据,因此可以继续从所述一级CDN节点服务器相邻的一级节点服务器中进行搜索。If the first-level CDN server does not respond, it is determined that the first-level CDN node server cannot provide the requested data, so the search can be continued from the first-level node servers adjacent to the first-level CDN node server.
请参照图2所示,所述相邻的一级CDN服务器将所述数据请求发送到源服务器。Please refer to FIG. 2 , the adjacent first-level CDN server sends the data request to the source server.
请参照图3所示,第二转发模块303,用于若所述数据请求未响应,则所述一级CDN节点服务器将所述数据请求发送到源服务器搜索所述请求数据发送到用户端。Please refer to FIG. 3 , the second forwarding module 303 is configured to, if the data request is not responded to, the first-level CDN node server sends the data request to the source server to search for the requested data and send it to the client.
当所述一级CDN节点服务器或者相邻的一级CDN节点服务器未响应所述数据请求,则判定该一级CDN节点服务器或者相邻的一级节点服务器未缓存 有所述请求数据,因此需要从源服务器中获取,所以将所述数据请求发送到所述源服务器中搜索所述请求数据,并将所述请求数据发送到用户端。When the first-level CDN node server or the adjacent first-level CDN node server does not respond to the data request, it is determined that the first-level CDN node server or the adjacent first-level node server does not have the requested data cached, so it is necessary to Obtained from the source server, so the data request is sent to the source server to search for the requested data, and the requested data is sent to the client.
此时,所述一级CDN节点服务器和所述二级CDN节点服务器将所述请求数据进行缓存。当所述请求数据再次被请求时,可以从所述二级或者一级CDN节点服务器中获取。优选的,所述二级CDN节点服务器和一级CDN节点服务器实时还记录负载信息,并在所述负载信息超过预设阈值时,将所述数据请求转发到相邻的同级CDN节点服务器。At this time, the first-level CDN node server and the second-level CDN node server cache the request data. When the requested data is requested again, it may be obtained from the secondary or primary CDN node server. Preferably, the second-level CDN node server and the first-level CDN node server also record load information in real time, and when the load information exceeds a preset threshold, forward the data request to an adjacent CDN node server at the same level.
所述二级CDN节点服务器在获得请求数据后,将根据用户的数据请求判断用户端设备类型,根据所述设备类型对数据进行处理后发送到用户端进行显示。After the secondary CDN node server obtains the requested data, it will determine the device type of the user terminal according to the user's data request, process the data according to the device type, and send it to the user terminal for display.
优选的,所述二级CDN节点服务器中还包括历史数据存储设备,该历史数据存储设备存储由历史数据和设备类型和历史数据对应表。当所述二级CDN节点服务器获取到数据请求后,首先判断所述数据请求中包含的用户端设备类型,根据所述设备端类型从所述设备类型和历史数据对应表查找历史数据中是否具有用户端请求的与所述用户端设备类型对应的请求数据,若没有则进行回源,若有则将该历史数据发送到用户端。Preferably, the secondary CDN node server further includes a historical data storage device, and the historical data storage device stores historical data and a table corresponding to device types and historical data. After the secondary CDN node server obtains the data request, it first judges the type of client device included in the data request, and searches the history data from the device type and historical data correspondence table according to the device type to see if there is If there is no request data corresponding to the type of the client device requested by the client, it will be returned to the source, and if it is, the historical data will be sent to the client.

Claims (10)

  1. 一种CDN节点服务器的回源方法,其特征在于,包括:A method for returning to the source of a CDN node server, characterized in that it includes:
    根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,并根据所述数据请求搜索对应的请求数据发送到用户端;Obtain the data request of the client according to the connection relationship between the secondary CDN node server and the client, and search for corresponding request data according to the data request and send it to the client;
    若所述数据请求未响应,则所述二级CDN节点服务器将所述数据请求发送到一级CDN节点服务器搜索所述请求数据发送到用户端;If the data request does not respond, the secondary CDN node server sends the data request to the primary CDN node server to search for the requested data and send it to the client;
    若所述数据请求未响应,则所述一级CDN节点服务器将所述数据请求发送到源服务器搜索所述请求数据发送到用户端。If the data request is not responded, the primary CDN node server sends the data request to the source server to search for the requested data and send it to the client.
  2. 根据权利要求1所述CDN节点服务器的回源方法,其特征在于,在所述数据请求发送到源服务器之前,还包括:The method for returning to the source of the CDN node server according to claim 1, further comprising: before the data request is sent to the source server:
    所述一级节点服务器将所述数据请求发送到相邻的一级CDN节点服务器搜索所述请求数据发送到用户端。The first-level node server sends the data request to an adjacent first-level CDN node server to search for the requested data and send it to the client.
  3. 根据权利要求1所述CDN节点服务器的回源方法,其特征在于,所述根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,包括:The method for returning to the source of the CDN node server according to claim 1, wherein said obtaining the data request of the client according to the connection relationship between the secondary CDN node server and the client includes:
    获取多个二级CDN节点服务器的位置信息,根据所述位置信息判断所述二级CDN节点服务器与所述用户端的距离信息,根据所述距离信息确定所述二级CDN节点服务器。Obtaining location information of multiple secondary CDN node servers, judging distance information between the secondary CDN node server and the client according to the location information, and determining the secondary CDN node server according to the distance information.
  4. 根据权利要求1所述CDN节点服务器的回源方法,其特征在于,所述数据请求未响应包括:数据未存储、数据失效或者数据错误。The back-to-source method of the CDN node server according to claim 1, wherein the non-response to the data request includes: data not stored, data failure or data error.
  5. 根据权利要求1所述CDN节点服务器的回源方法,其特征在于,所述二级CDN节点服务器和一级CDN节点服务器实时记录负载信息,并在所述负载信息超过预设阈值时,将所述数据请求转发到相邻的同级CDN节点服务器。According to the method for returning to the source of the CDN node server according to claim 1, it is characterized in that the second-level CDN node server and the first-level CDN node server record load information in real time, and when the load information exceeds a preset threshold, the The above data request is forwarded to the adjacent CDN node server at the same level.
  6. 一种CDN节点服务器的回源装置,其特征在于,包括:A device for returning to the source of a CDN node server, characterized in that it includes:
    回源模块,用于根据二级CDN节点服务器和用户端的连接关系获取用户端的数据请求,并根据所述数据请求搜索对应的请求数据发送到用户端;The back-to-source module is used to obtain the data request of the client according to the connection relationship between the secondary CDN node server and the client, and search for corresponding request data according to the data request and send it to the client;
    第一转发模块,用于若所述数据请求未响应,则所述二级CDN节点服务器将所述数据请求发送到一级CDN节点服务器搜索所述请求数据发送到用户端;The first forwarding module is configured to send the data request to the first-level CDN node server by the secondary CDN node server if the data request is not responded to, and send the request data to the client;
    第二转发模块,用于若所述数据请求未响应,则所述一级CDN节点服务器将所述数据请求发送到源服务器搜索所述请求数据发送到用户端。The second forwarding module is configured to: if the data request is not responded to, the first-level CDN node server sends the data request to the source server to search for the requested data and send it to the client.
  7. 根据权利要求6所述CDN节点服务器的回源装置,其特征在于,所述第二转发模块还包括:According to the back-to-source device of the CDN node server according to claim 6, wherein the second forwarding module further comprises:
    平行转发单元,用于所述一级节点服务器将所述数据请求发送到相邻的一级CDN节点服务器搜索所述请求数据发送到用户端。The parallel forwarding unit is used for the first-level node server to send the data request to an adjacent first-level CDN node server to search for the requested data and send it to the client.
  8. 根据权利要求6所述CDN节点服务器的回源装置,其特征在于,还包括:The back-to-source device of the CDN node server according to claim 6, further comprising:
    位置查询模块,用于获取多个二级CDN节点服务器的位置信息,根据所述位置信息判断所述二级CDN节点服务器与所述用户端的距离信息,根据所述距离信息确定所述二级CDN节点服务器。A location query module, configured to acquire location information of multiple secondary CDN node servers, judge distance information between the secondary CDN node server and the client according to the location information, and determine the secondary CDN according to the distance information node server.
  9. 根据权利要求6所述CDN节点服务器的回源装置,其特征在于,所述数据请求未响应包括:数据未存储、数据失效或者数据错误。According to the back-to-source device of the CDN node server according to claim 6, wherein the non-response to the data request includes: data not stored, data failure or data error.
  10. 根据权利要求6所述CDN节点服务器的回源装置,其特征在于,所述二级CDN节点服务器和一级CDN节点服务器实时记录负载信息,并在所述负载信息超过预设阈值时,将所述数据请求转发到相邻的同级CDN节点服务器。According to the back-to-source device of the CDN node server according to claim 6, it is characterized in that, the second-level CDN node server and the first-level CDN node server record load information in real time, and when the load information exceeds a preset threshold, the The above data request is forwarded to the adjacent CDN node server at the same level.
PCT/CN2021/141411 2021-12-21 2021-12-25 Back-to-source method and apparatus of cdn node server WO2023115592A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111569130.3A CN114338686A (en) 2021-12-21 2021-12-21 Source returning method and device of CDN node server
CN202111569130.3 2021-12-21

Publications (1)

Publication Number Publication Date
WO2023115592A1 true WO2023115592A1 (en) 2023-06-29

Family

ID=81055253

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/141411 WO2023115592A1 (en) 2021-12-21 2021-12-25 Back-to-source method and apparatus of cdn node server

Country Status (2)

Country Link
CN (1) CN114338686A (en)
WO (1) WO2023115592A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110213879A1 (en) * 2010-03-01 2011-09-01 Ashley Edwardo King Multi-level Decision Support in a Content Delivery Network
WO2018098820A1 (en) * 2016-12-02 2018-06-07 深圳前海达闼云端智能科技有限公司 Method and device for sending and receiving data, server, and computer program product
CN109542613A (en) * 2017-09-22 2019-03-29 中兴通讯股份有限公司 Distribution method, device and the storage medium of service dispatch in a kind of CDN node
CN113301071A (en) * 2020-04-09 2021-08-24 阿里巴巴集团控股有限公司 Network source returning method, device and equipment
CN113472852A (en) * 2021-06-02 2021-10-01 乐视云计算有限公司 CDN node back-source method, device and equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457907A (en) * 2012-05-28 2013-12-18 中国移动通信集团公司 Method, equipment and system for multimedia content distribution

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110213879A1 (en) * 2010-03-01 2011-09-01 Ashley Edwardo King Multi-level Decision Support in a Content Delivery Network
WO2018098820A1 (en) * 2016-12-02 2018-06-07 深圳前海达闼云端智能科技有限公司 Method and device for sending and receiving data, server, and computer program product
CN109542613A (en) * 2017-09-22 2019-03-29 中兴通讯股份有限公司 Distribution method, device and the storage medium of service dispatch in a kind of CDN node
CN113301071A (en) * 2020-04-09 2021-08-24 阿里巴巴集团控股有限公司 Network source returning method, device and equipment
CN113472852A (en) * 2021-06-02 2021-10-01 乐视云计算有限公司 CDN node back-source method, device and equipment

Also Published As

Publication number Publication date
CN114338686A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
US11909639B2 (en) Request routing based on class
US9800539B2 (en) Request routing management based on network components
US20180205697A1 (en) Managing content delivery network service providers by a content broker
WO2021120969A1 (en) Domain name resolution method, domain name resolution server, and terminal device
US20190044787A1 (en) Point of presence management in request routing
US9021128B2 (en) Request routing using network computing components
US20130346534A1 (en) Point of presence managment in request routing
US20120173677A1 (en) Request routing
US11841910B2 (en) Token-based authentication for a proxy web scraping service
US7216154B1 (en) Apparatus and method for facilitating access to network resources
KR100375121B1 (en) Web contents transmission method
WO2023115592A1 (en) Back-to-source method and apparatus of cdn node server
EP4227828A1 (en) Web scraping through use of proxies, and applications thereof
US20230018983A1 (en) Traffic counting for proxy web scraping
US20030061304A1 (en) Method and apparatus for discovering client proximity using in-line translations
US20150019734A1 (en) Processing encoded content
JP2002024191A (en) Www system, traffic relief method for www server and www server
WO2023280593A1 (en) Web scraping through use of proxies, and applications thereof
CN116527756A (en) News content distribution system based on wireless mobile communication network
KR20000017857A (en) Web contents delivery system and delivery method

Legal Events

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

Ref document number: 21968721

Country of ref document: EP

Kind code of ref document: A1