[go: up one dir, main page]

CN108234639A - A kind of data access method and device based on content distributing network CDN - Google Patents

A kind of data access method and device based on content distributing network CDN Download PDF

Info

Publication number
CN108234639A
CN108234639A CN201711485184.5A CN201711485184A CN108234639A CN 108234639 A CN108234639 A CN 108234639A CN 201711485184 A CN201711485184 A CN 201711485184A CN 108234639 A CN108234639 A CN 108234639A
Authority
CN
China
Prior art keywords
data
identification information
stored
resource identification
access request
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.)
Pending
Application number
CN201711485184.5A
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201711485184.5A priority Critical patent/CN108234639A/en
Publication of CN108234639A publication Critical patent/CN108234639A/en
Pending legal-status Critical Current

Links

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/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
    • H04L67/63Routing a service request depending on the request content or context
    • 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/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例提供了一种基于内容分发网络CDN的数据访问方法和装置,在内容分发网络CDN中具有多个节点,所述方法包括:在当前节点中接收访问请求;从所述访问请求中提取资源标识信息;判断是否存储有所述访问请求中的资源标识信息对应的数据;当已存储所述数据时,返回所述数据。通过资源标识信息对数据进行缓存、定位,可以在多URL的情况下,识别出相同的数据进行缓存,减少了在此情况下的存储量,减少数据在查询时查询数量,提高了数据的命中率,从而减少了回源操作的频次,降低了源网站的访问压力。

An embodiment of the present invention provides a data access method and device based on a content distribution network CDN. There are multiple nodes in the content distribution network CDN. The method includes: receiving an access request in the current node; Extracting resource identification information; judging whether data corresponding to the resource identification information in the access request is stored; and returning the data when the data has been stored. Cache and locate data through resource identification information. In the case of multiple URLs, the same data can be identified for caching, which reduces the amount of storage in this case, reduces the number of data queries when querying, and improves data hits. rate, thereby reducing the frequency of back-to-source operations and lowering the access pressure on the source website.

Description

一种基于内容分发网络CDN的数据访问方法和装置A data access method and device based on content distribution network CDN

技术领域technical field

本发明涉及计算机处理的技术领域,特别是涉及一种基于内容分发网络CDN的数据访问方法和一种基于内容分发网络CDN的数据访问装置。The invention relates to the technical field of computer processing, in particular to a CDN-based data access method and a CDN-based data access device.

背景技术Background technique

在网站中经常使用CDN(Content Delivery Network,内容分发网络)对数据进行传输,CDN是通过在现有的网络中增加一层新的网络结构,部署有多个节点,用于缓存数据,使用户可以将数据传输到就近的节点上或从就近的节点获取所需的数据,提供相应的服务。CDN (Content Delivery Network, content distribution network) is often used in websites to transmit data. CDN adds a new network structure to the existing network and deploys multiple nodes for caching data so that users Data can be transmitted to or obtained from nearby nodes to provide corresponding services.

目前,在CDN中通常是基于URL(Uniform Resource Locator,统一资源定位符)进行数据的缓存,即同一个URL下的数据缓存一次,造成了数据存储量较大,导致数据在查询时查询数量较多,数据的命中率较低,在未命中时进行回源操作,即从源网站获取数据进行缓存,从而增加了回源操作的频次,增加了源网站的访问压力。At present, in CDN, data is usually cached based on URL (Uniform Resource Locator, Uniform Resource Locator), that is, data under the same URL is cached once, resulting in a large amount of data storage, resulting in a relatively large amount of data to be queried when querying. If there are too many data, the hit rate of the data is low, and the back-to-source operation is performed when there is a miss, that is, the data is obtained from the source website for caching, thereby increasing the frequency of back-to-source operations and increasing the access pressure of the source website.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的一种基于内容分发网络CDN的数据访问方法和相应的一种基于内容分发网络CDN的数据访问装置。In view of the above problems, the present invention is proposed to provide a CDN-based data access method and a corresponding CDN-based data access device that overcome the above problems or at least partially solve the above problems.

依据本发明的一个方面,提供了一种基于内容分发网络CDN的数据访问方法,在内容分发网络CDN中具有多个节点,所述方法包括:According to one aspect of the present invention, a data access method based on a content distribution network CDN is provided. There are multiple nodes in the content distribution network CDN, and the method includes:

在当前节点中接收访问请求;Receive an access request in the current node;

从所述访问请求中提取资源标识信息;extracting resource identification information from the access request;

判断是否存储有所述访问请求中的资源标识信息对应的数据;judging whether data corresponding to the resource identification information in the access request is stored;

当已存储所述数据时,返回所述数据。When the data has been stored, return the data.

可选地,还包括:Optionally, also include:

当未存储所述数据时,获取所述数据;when the data is not stored, obtaining the data;

返回所述数据。Return the data.

可选地,所述判断是否存储有所述访问请求中的资源标识信息对应的数据,包括:Optionally, the judging whether data corresponding to the resource identification information in the access request is stored includes:

查询预设的存储信息表,所述存储信息表中记录有已存储的数据的资源标识信息;Querying a preset storage information table, the resource identification information of the stored data is recorded in the storage information table;

将所述访问请求中的资源标识信息与所述存储信息表中的资源标识信息进行匹配;matching the resource identification information in the access request with the resource identification information in the stored information table;

当匹配成功时,确定已存储有所述数据;When the matching is successful, it is determined that the data has been stored;

当匹配失败时,确定未存储有所述数据。When the matching fails, it is determined that the data is not stored.

可选地,所述资源标识信息包括服务器信息Host与统一资源标识符URI;Optionally, the resource identification information includes server information Host and uniform resource identifier URI;

所述将所述访问请求中的资源标识信息与所述存储信息表中的资源标识信息进行匹配,包括:The matching of the resource identification information in the access request with the resource identification information in the storage information table includes:

子步骤S121,判断所述访问请求中的服务器信息Host与所述存储信息表中的服务器信息Host是否相同;若是,则执行子步骤S122,若否,则执行子步骤S124;Sub-step S121, judging whether the server information Host in the access request is the same as the server information Host in the stored information table; if yes, execute sub-step S122, if not, execute sub-step S124;

子步骤S122,判断所述访问请求中的统一资源标识符URI与所述存储信息表中的统一资源标识符URI是否相同;若是,则执行子步骤S123,若否,则执行子步骤S124;Sub-step S122, judging whether the uniform resource identifier URI in the access request is the same as the uniform resource identifier URI in the stored information table; if yes, execute sub-step S123, if not, execute sub-step S124;

子步骤S123,确定匹配成功;Sub-step S123, determine that the matching is successful;

子步骤S124,确定匹配失败。In sub-step S124, it is determined that the matching fails.

可选地,还包括:Optionally, also include:

缓存所述数据;cache said data;

在预设的存储信息表中建立所述资源标识信息与所述数据之间的映射关系。A mapping relationship between the resource identification information and the data is established in a preset storage information table.

可选地,所述在预设的存储信息表中建立所述资源标识信息与所述数据之间的映射关系,包括:Optionally, establishing the mapping relationship between the resource identification information and the data in the preset storage information table includes:

以服务器信息Host与统一资源标识符URI作为键、所述数据作为值,在预设的存储信息表中建立键值对。A key-value pair is established in a preset storage information table with the server information Host and the uniform resource identifier URI as a key and the data as a value.

可选地,所述资源标识信息包括数据标识,Optionally, the resource identification information includes a data identification,

所述判断是否存储有所述访问请求中资源标识信息对应的数据,包括:The judging whether data corresponding to the resource identification information in the access request is stored includes:

查询预设的存储信息表,所述存储信息表中记录有已存储的数据的数据标识;Querying a preset storage information table, the data identifier of the stored data is recorded in the storage information table;

将所述访问请求中的资源标识信息与所述存储信息表中的数据标识进行匹配;matching the resource identification information in the access request with the data identification in the storage information table;

当匹配成功时,确定已存储有所述数据;When the matching is successful, it is determined that the data has been stored;

当匹配失败时,确定未存储有所述数据。When the matching fails, it is determined that the data is not stored.

可选地,所述资源标识信息还包括服务器信息Host与统一资源标识符URI,所述存储信息表中还记录有已存储的数据对应的服务器信息Host与统一资源标识符URI,所述方法还包括:Optionally, the resource identification information also includes server information Host and uniform resource identifier URI, and the stored information table also records server information Host and uniform resource identifier URI corresponding to the stored data, and the method further includes include:

当确定已存储所述数据时,判断所述资源标识信息中服务器信息Host与统一资源标识符URI与所述存储信息表中所述数据对应的服务器信息Host与统一资源标识符URI是否一致;When it is determined that the data has been stored, judging whether the server information Host and the uniform resource identifier URI in the resource identification information are consistent with the server information Host and the uniform resource identifier URI corresponding to the data in the storage information table;

若否,则在所述存储信息表中建立所述资源标识信息与所述数据之间的映射关系。If not, establish a mapping relationship between the resource identification information and the data in the storage information table.

根据本发明的另一方面,提供了一种基于内容分发网络CDN的数据访问装置,在内容分发网络CDN中具有多个节点,所述装置包括:According to another aspect of the present invention, a data access device based on a content distribution network CDN is provided, and there are multiple nodes in the content distribution network CDN, the device includes:

访问请求接收模块,用于在当前节点中接收访问请求;An access request receiving module, configured to receive an access request in the current node;

资源标识信息提取模块,用于从所述访问请求中提取资源标识信息;A resource identification information extraction module, configured to extract resource identification information from the access request;

存储判断模块,用于判断是否存储有所述访问请求中的资源标识信息对应的数据;A storage judging module, configured to judge whether data corresponding to the resource identification information in the access request is stored;

第一数据返回模块,用于当已存储所述数据时,返回所述数据。The first data returning module is used for returning the data when the data has been stored.

可选地,还包括:Optionally, also include:

数据获取模块,用于当未存储所述数据时,获取所述数据;A data acquisition module, configured to acquire the data when the data is not stored;

第二数据返回模块,用于返回所述数据。The second data return module is used to return the data.

可选地,所述存储判断模块包括:Optionally, the storage judgment module includes:

第一存储信息表查询子模块,用于查询预设的存储信息表,所述存储信息表中记录有已存储的数据的资源标识信息;The first storage information table query submodule is used to query a preset storage information table, and resource identification information of stored data is recorded in the storage information table;

资源标识信息匹配子模块,用于将所述访问请求中的资源标识信息与所述存储信息表中的资源标识信息进行匹配;A resource identification information matching submodule, configured to match the resource identification information in the access request with the resource identification information in the storage information table;

第一已存储确定子模块,用于当匹配成功时,确定已存储有所述数据;The first stored determination submodule is used to determine that the data has been stored when the matching is successful;

第一未存储确定子模块,用于当匹配失败时,确定未存储有所述数据。The first non-storage determining submodule is configured to determine that the data is not stored when the matching fails.

可选地,所述资源标识信息包括服务器信息Host与统一资源标识符URI;Optionally, the resource identification information includes server information Host and uniform resource identifier URI;

所述资源标识信息匹配子模块包括:The resource identification information matching submodule includes:

Host判断单元,用于判断所述访问请求中的服务器信息Host与所述存储信息表中的服务器信息Host是否相同;若是,则调用URI判断单元,若否,则匹配失败确定单元;Host judging unit, used to judge whether the server information Host in the access request is the same as the server information Host in the stored information table; if so, call the URI judging unit, if not, then match failure determining unit;

URI判断单元,用于判断所述访问请求中的统一资源标识符URI与所述存储信息表中的统一资源标识符URI是否相同;若是,则调用匹配成功确定单元,若否,则调用匹配失败确定单元;The URI judging unit is used to judge whether the uniform resource identifier URI in the access request is the same as the uniform resource identifier URI in the stored information table; if so, call the matching success determination unit, if not, call the matching failure Determine the unit;

匹配成功确定单元,用于确定匹配成功;A matching success determination unit, configured to determine that the matching is successful;

匹配失败确定单元,用于确定匹配失败。The matching failure determination unit is configured to determine the matching failure.

可选地,还包括:Optionally, also include:

数据缓存模块,用于缓存所述数据;A data cache module, configured to cache the data;

第一映射关系建立模块,用于在预设的存储信息表中建立所述资源标识信息与所述数据之间的映射关系。The first mapping relationship establishment module is configured to establish a mapping relationship between the resource identification information and the data in a preset storage information table.

可选地,所述第一映射关系建立模块包括:Optionally, the first mapping relationship establishment module includes:

键值对建立子模块,用于以服务器信息Host与统一资源标识符URI作为键、所述数据作为值,在预设的存储信息表中建立键值对。The key-value pair establishment sub-module is used for establishing key-value pairs in a preset storage information table with the server information Host and the uniform resource identifier URI as keys and the data as a value.

可选地,所述资源标识信息包括数据标识,Optionally, the resource identification information includes a data identification,

所述存储判断模块包括:The storage judgment module includes:

第二存储信息表查询子模块,用于查询预设的存储信息表,所述存储信息表中记录有已存储的数据的数据标识;The second storage information table query submodule is used to query the preset storage information table, and the data identification of the stored data is recorded in the storage information table;

数据标识匹配子模块,用于将所述访问请求中的资源标识信息与所述存储信息表中的数据标识进行匹配;A data identifier matching submodule, configured to match the resource identifier information in the access request with the data identifier in the storage information table;

第二已存储确定子模块,用于当匹配成功时,确定已存储有所述数据;The second stored determination submodule is used to determine that the data has been stored when the matching is successful;

第二未存储确定子模块,用于当匹配失败时,确定未存储有所述数据。The second non-storage determining submodule is used to determine that the data is not stored when the matching fails.

可选地,所述资源标识信息还包括服务器信息Host与统一资源标识符URI,所述存储信息表中还记录有已存储的数据对应的服务器信息Host与统一资源标识符URI,所述装置还包括:Optionally, the resource identification information further includes server information Host and uniform resource identifier URI, and the stored information table also records server information Host and uniform resource identifier URI corresponding to the stored data, and the device also include:

信息匹配模块,用于当确定已存储所述数据时,判断所述资源标识信息中服务器信息Host与统一资源标识符URI与所述存储信息表中所述数据对应的服务器信息Host与统一资源标识符URI是否一致;若否,则调用第二映射关系建立模块;An information matching module, configured to determine that the server information Host and the uniform resource identifier URI in the resource identification information correspond to the server information Host and the uniform resource identifier corresponding to the data in the stored information table when it is determined that the data has been stored Whether the symbol URI is consistent; if not, then call the second mapping relationship establishment module;

第二映射关系建立模块,用于在所述存储信息表中建立所述资源标识信息与所述数据之间的映射关系。The second mapping relationship establishment module is configured to establish a mapping relationship between the resource identification information and the data in the storage information table.

在本发明实施例中在内容分发网络CDN中具有多个节点,在当前节点中接收访问请求,从访问请求中提取资源标识信息,判断是否存储有所述访问请求中的资源标识信息对应的数据,当已存储数据时,返回所述数据,通过资源标识信息对数据进行缓存、定位,可以在多URL的情况下,识别出相同的数据进行缓存,减少了在此情况下的存储量,减少数据在查询时查询数量,提高了数据的命中率,从而减少了回源操作的频次,降低了源网站的访问压力。In the embodiment of the present invention, there are multiple nodes in the content distribution network CDN, the current node receives the access request, extracts the resource identification information from the access request, and judges whether the data corresponding to the resource identification information in the access request is stored , when the data has been stored, the data is returned, and the data is cached and located through the resource identification information. In the case of multiple URLs, the same data can be identified and cached, which reduces the amount of storage in this case and reduces the When the data is queried, the number of queries increases the hit rate of the data, thereby reducing the frequency of back-to-source operations and reducing the access pressure of the source website.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:

图1示出了根据本发明一个实施例的一种基于内容分发网络CDN的数据访问方法实施例的步骤示意流程图;FIG. 1 shows a schematic flow chart of the steps of an embodiment of a data access method based on a content distribution network CDN according to an embodiment of the present invention;

图2示出了根据本发明一个实施例的一种内容分发网络CDN的结构示意图;Fig. 2 shows a schematic structural diagram of a content distribution network CDN according to an embodiment of the present invention;

图3示出了根据本发明一个实施例的另一种基于内容分发网络CDN的数据访问方法实施例的步骤示意流程图;以及FIG. 3 shows a schematic flow chart of the steps of another embodiment of a data access method based on a content distribution network (CDN) according to an embodiment of the present invention; and

图4示出了根据本发明一个实施例的一种基于内容分发网络CDN的数据访问装置实施例的结构示意框图。Fig. 4 shows a schematic block diagram of an embodiment of a data access device based on a content distribution network (CDN) according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

参照图1,示出了根据本发明一个实施例的一种基于内容分发网络CDN的数据访问方法实施例的步骤示意流程图,具体可以包括如下步骤:Referring to FIG. 1 , it shows a schematic flowchart of the steps of an embodiment of a data access method based on a content distribution network CDN according to an embodiment of the present invention, which may specifically include the following steps:

步骤101,在当前节点中接收访问请求。Step 101, receiving an access request in the current node.

在内容分发网络CDN中,通常具有多个用于传输、缓存数据(如直播流、缓存数据等)的节点,在某个节点接收到客户端、源网站的数据(如直播流、缓存数据等)之后,可以推送至其他节点,在用户访问数据(如直播流、缓存数据等)的时候,通过调度将用户的请求路由或者引导到离用户接入网络最近或者访问效果最佳的节点上,由该节点为用户提供数据(如直播流、缓存数据等);相对于直接访问源网站,这种方式缩短了用户和数据(如直播流、缓存数据等)之间的网络距离,从而达到加速的效果。In the content distribution network CDN, there are usually multiple nodes for transmitting and caching data (such as live streams, cached data, etc.), and the data of the client and the source website (such as live streams, cached data, etc.) ), it can be pushed to other nodes, and when the user accesses data (such as live streaming, cached data, etc.), the user's request is routed or directed to the node closest to the user's access network or with the best access effect through scheduling. The node provides users with data (such as live streaming, cached data, etc.); compared with directly accessing the source website, this method shortens the network distance between the user and the data (such as live streaming, cached data, etc.), thereby achieving acceleration Effect.

需要说明的是,在不同的内容分发网络CDN中,拓扑结构可能有所不同。It should be noted that, in different CDNs, the topological structures may be different.

在一种实施方式中,内容分发网络CDN的多个节点包括中心节点、父层节点、边缘节点。In one embodiment, the multiple nodes of the CDN include a central node, a parent node, and an edge node.

在某些情况下,中心节点为资源的超汇聚节点,可以与源网站进行通信,汇聚了大量源网站的资源,这些资源一般为变化较少的资源,例如,视频、图片等等。In some cases, the central node is a resource super-convergence node, which can communicate with the source website and gather a large number of resources of the source website. These resources are generally less-changing resources, such as videos, pictures, and so on.

在某些情况下,中心节点仅保存文件信息,如URL(Uniform Resource Locator,统一资源定位符)、大小等,并不直接缓存文件,内容分发网络CDN中的其他节点从该中心节点中获取待缓存的文件的文件信息,在缓存完该文件之后,上报至中心节点,中心节点统计出其他节点缓存的文件。In some cases, the central node only saves file information, such as URL (Uniform Resource Locator, Uniform Resource Locator), size, etc., and does not directly cache the file. Other nodes in the content distribution network CDN obtain the pending The file information of the cached file is reported to the central node after the file is cached, and the central node counts the files cached by other nodes.

需要说明的是,在某些内容分发网络CDN中可以部署中心节点,即该部分内容分发网络CDN为中心节点-父层节点-边缘节点的三层结构,在某些内容分发网络CDN中可以不部署中心节点,即该部分内容分发网络CDN为父层节点-边缘节点的二层结构,本发明实施例对此不加以限制。It should be noted that the central node can be deployed in some content distribution network CDN, that is, this part of the content distribution network CDN is a three-layer structure of central node-parent layer node-edge node, in some content distribution network CDN may not The deployment center node, that is, the part of the content distribution network CDN is a two-layer structure of parent layer node-edge node, which is not limited in the embodiment of the present invention.

父层节点为资源的次汇聚节点,一方面,由于在内容分发网络CDN内部,各节点之间一般使用双向光纤等专有的通信线缆进行通信,中心节点与父层节点之间的通信质量有较高的保障,在获取变化较少的资源、外部源网站通信质量较差等情况下,可以与中心节点进行通信,从中心节点获取资源,另一方面,在获取新的资源、进行数据操作(如支付)等情况下,可以与源网站进行通信,从源网站获取资源。The parent layer node is the sub-convergence node of resources. On the one hand, because in the content distribution network CDN, each node generally uses proprietary communication cables such as two-way optical fiber for communication, the communication quality between the central node and the parent layer node It has a high degree of guarantee. In the case of obtaining less-changing resources and poor communication quality of external source websites, it can communicate with the central node and obtain resources from the central node. On the other hand, when obtaining new resources and performing data In the case of operations (such as payment), etc., it is possible to communicate with the source website and obtain resources from the source website.

再者,父层节点之间可以相互通信,从而组成父层节点与边缘节点之间的传输路径,即一个节点到另一个节点所经过的中间传输的节点及通信线缆所组成的路径。Furthermore, parent layer nodes can communicate with each other to form a transmission path between parent layer nodes and edge nodes, that is, a path composed of intermediate transmission nodes and communication cables from one node to another node.

具体而言,选取传输路径的方式可以有多种,可以根据实际需求选择如下至少一种方式:Specifically, there are many ways to select the transmission path, and at least one of the following ways can be selected according to actual needs:

1、选取传输性能符合设定的要求的传输路径。1. Select a transmission path whose transmission performance meets the set requirements.

传输性能是指传输流数据的传输路径的传输能力,可以根据节点间的距离、传输速度、数据丢失率、阻塞状况等确定传输路径的传输性能,通过定期更新每两个节点间的传输性能,根据节点之间的各传输路径的传输性能,选取其中传输性能符合要求或传输性能最好的传输路径。Transmission performance refers to the transmission capability of the transmission path of the transmission stream data. The transmission performance of the transmission path can be determined according to the distance between nodes, transmission speed, data loss rate, and congestion status. By regularly updating the transmission performance between every two nodes, According to the transmission performance of each transmission path between nodes, select the transmission path whose transmission performance meets the requirements or has the best transmission performance.

2、选取经过的节点数量最少的传输路径。2. Select the transmission path with the least number of passing nodes.

在多条传输路径中选取节点数量最少的传输路径,这样,就可以占用最少的传输资源完成数据从一个节点到另一个节点的传输。Select the transmission path with the least number of nodes among multiple transmission paths, so that the transmission of data from one node to another node can be completed by occupying the least transmission resources.

3、选取在一段时间内没有选择过的传输路径。3. Select a transmission path that has not been selected for a period of time.

如果历史上有流数据从一个节点传输至另一个节点,那么,当有新的数据要从这两个之间进行传输,可以在一段时间内没有选择过的各传输路径中选取一条,以避免一直选取同一条传输路径导致该传输路径上的节点负载过重。If there is streaming data transmitted from one node to another node in history, then when there is new data to be transmitted between the two, one of the transmission paths that has not been selected for a period of time can be selected to avoid Always selecting the same transmission path causes the nodes on the transmission path to be overloaded.

当然,上述传输路径的选取方式只是作为示例,在实施本发明实施例时,可以根据实际情况设置其他传输路径的选取方式,本发明实施例对此不加以限制。另外,除了上述传输路径的选取方式外,本领域技术人员还可以根据实际需要采用其它传输路径的选取方式,本发明实施例对此也不加以限制。Certainly, the above-mentioned selection method of the transmission path is only an example. When implementing the embodiment of the present invention, other selection methods of the transmission path may be set according to the actual situation, which is not limited in the embodiment of the present invention. In addition, in addition to the above method of selecting the transmission path, those skilled in the art may also use other methods of selecting the transmission path according to actual needs, which is not limited in this embodiment of the present invention.

此外,父层节点一般部署有多个运营商的机房,机房之间通过双线光线等专有的通信线缆进行连接,边缘节点一般是部署在某个运营商的网络中,同运营商之间的父层节点的机房可以与边缘节点进行通信。In addition, the parent node is generally deployed with multiple operators' computer rooms, and the computer rooms are connected by proprietary communication cables such as dual-wire optical cables. Edge nodes are generally deployed in a certain operator's network The computer room of the parent layer node can communicate with the edge node.

边缘节点之间具有相互通信的能力,但是,一般情况下,不会直接进行通信。Edge nodes have the ability to communicate with each other, but generally, they do not communicate directly.

边缘节点可以接入客户端,例如,手机、平板电脑、电视等等,用于与客户端进行通信,如获取其采集的直播流,或者,将直播流推送至该客户端。Edge nodes can access clients, such as mobile phones, tablet computers, TVs, etc., to communicate with clients, such as obtaining live streams collected by them, or pushing live streams to the client.

为使本领域技术人员更好地理解本发明实施例,以下通过具体的示例来说明本发明实施例中的内容分发网络CDN。In order for those skilled in the art to better understand the embodiment of the present invention, the content delivery network CDN in the embodiment of the present invention is described below through specific examples.

如图2所示,父层节点为A1、A2、A3、A4,可以按照地理位置进行部署,例如,A1部署在北京、A2部署在上海、A3部署在广州,A4部署在郑州,A1可以与A2进行通信,A2可以与A3进行通信,A3可以与A4进行通信,A4可以与A1进行通信,父层节点之间的循环通信,可以组成环状的父层结构。As shown in Figure 2, the parent layer nodes are A1, A2, A3, and A4, which can be deployed according to geographical locations. For example, A1 is deployed in Beijing, A2 is deployed in Shanghai, A3 is deployed in Guangzhou, A4 is deployed in Zhengzhou, and A1 can be deployed with A2 communicates, A2 can communicate with A3, A3 can communicate with A4, A4 can communicate with A1, and the circular communication between parent layer nodes can form a ring-shaped parent layer structure.

此外,每个父层节点可以连接一个或多个边缘节点,边缘节点也可以按照地理位置、运营商等因素进行部署,边缘节点之间一般不直接进行通信,而是经过父层节点进行中转,父层节点A1连接边缘节点A11、A12,父层节点A2连接缘节点A21、A22,父层节点A3连接缘节点A31、A32、A33,父层节点A4连接缘节点A41、A42、A43。In addition, each parent layer node can be connected to one or more edge nodes, and edge nodes can also be deployed according to factors such as geographic location and operators. Generally, edge nodes do not communicate directly, but transit through parent layer nodes. Parent node A1 is connected to edge nodes A11 and A12, parent node A2 is connected to edge nodes A21 and A22, parent node A3 is connected to edge nodes A31, A32 and A33, and parent node A4 is connected to edge nodes A41, A42 and A43.

边缘节点接入客户端,如边缘节点A32接入客户端B1,用于接收客户端的数据(如直播流),或者,将数据(如直播流)发送至该客户端。The edge node accesses the client, such as the edge node A32 accesses the client B1, and is used to receive data (such as a live stream) from the client, or send data (such as a live stream) to the client.

在本发明实施例中,当前节点可以接收访问请求,即访问某个数据的请求。In this embodiment of the present invention, the current node may receive an access request, that is, a request to access certain data.

在上述内容分发网络CDN中,若当前节点为边缘节点,则可以接收客户端的访问请求,若当前节点为父层节点,则可以接收边缘节点的访问请求。In the above content distribution network CDN, if the current node is an edge node, it can receive an access request from a client, and if the current node is a parent node, it can receive an access request from an edge node.

步骤102,从所述访问请求中提取资源标识信息。Step 102, extract resource identification information from the access request.

在实际应用中,对于多个URL,可能存在相同的资源,如视频、音频、图片等。In practical applications, the same resource may exist for multiple URLs, such as video, audio, picture, and so on.

例如,在浏览器并发的情况下,访问存在限制,一个URL通常只能接受2-5个访问,导致浏览器阻塞,所以,出现了多URL。For example, in the case of concurrent browsers, there are restrictions on access. Usually, a URL can only accept 2-5 accesses, causing the browser to block, so multiple URLs appear.

又例如,在运营商劫持的情况下,应用存在双域名,第一个URL异常用,即调用第二个URL。For another example, in the case of operator hijacking, the application has dual domain names, and the first URL is abnormal, that is, the second URL is called.

又例如,一个URL下挂了非法内容,则从根域名屏蔽,所以会有多URL。For another example, if illegal content is linked to a URL, it will be blocked from the root domain name, so there will be multiple URLs.

不同的URL,但是资源相同,如果按照URL进行缓存,将会导致缓存多份相同的资源。Different URLs, but the same resource, if cached according to the URL, it will result in caching multiple copies of the same resource.

而在本发明实施例中,可以基于资源标识信息对资源进行缓存。However, in the embodiment of the present invention, resources may be cached based on resource identification information.

所谓资源标识信息,可以指对资源进行标识的信息,例如,Host(服务器信息)、URI(统一资源标识符(Uniform Resource Identifier)等。The so-called resource identification information may refer to information identifying resources, for example, Host (server information), URI (Uniform Resource Identifier) and the like.

对于访问请求,则可以从其头信息heaer中提取资源标识信息。For an access request, resource identification information can be extracted from its header information header.

例如,在一个访问请求中包括如下信息:For example, include the following information in an access request:

GET http://download.123.de:80/somedata.exeGET http://download.123.de:80/somedata.exe

Host:download.microtool.deHost:download.microtool.de

Accept:*/*Accept:*/*

Pragma:no-cachePragma: no-cache

Cache-Control:no-cacheCache-Control: no-cache

Referer:http://download.microtool.de/Referer: http://download.microtool.de/

User-Agent:Mozilla/4.04[en](Win95;I;Nav)User-Agent: Mozilla/4.04[en] (Win95; I; Nav)

Range:bytes=554554-Range:bytes=554554-

其中,上例第一行表示HTTP客户端(可能是浏览器、下载程序)通过GET方法获得指定URL下的文件。Wherein, the first line of the above example indicates that the HTTP client (possibly a browser, download program) obtains the file under the specified URL through the GET method.

Host头域指定请求资源的Intenet主机和端口号,表示请求URL的原始服务器或网关的位置。The Host header field specifies the Internet host and port number of the requested resource, indicating the location of the original server or gateway of the requested URL.

Referer头域允许客户端指定请求URI的源资源地址,这可以允许服务器生成回退链表,可用来登陆、优化cache等。也允许废除的或错误的连接由于维护的目的被追踪。如果请求的URI没有自己的URI地址,Referer不能被发送。如果指定的是部分URI地址,则此地址应该是一个相对地址。The Referer header field allows the client to specify the source resource address of the request URI, which allows the server to generate a fallback list, which can be used for login, cache optimization, etc. It also allows aborted or erroneous connections to be tracked for maintenance purposes. If the requested URI does not have its own URI address, the Referer cannot be sent. If a partial URI address is specified, this address should be a relative address.

步骤103,判断是否存储有所述访问请求中的资源标识信息映射的数据。Step 103, judging whether the data mapped to the resource identification information in the access request is stored.

在具体实现中,从访问请求中提取了资源标识信息,则可以在本地查询在先是否缓存有该资源标识信息对应的数据。In a specific implementation, if the resource identification information is extracted from the access request, it may be queried locally whether the data corresponding to the resource identification information is previously cached.

在本发明的一个实施例中,步骤103可以包括如下子步骤:In one embodiment of the present invention, step 103 may include the following sub-steps:

子步骤S11,查询预设的存储信息表。Sub-step S11, querying a preset storage information table.

应用本发明实施例,可以预先针对缓存的数据,记录其资源标识信息,写入存储信息表中,因此,存储信息表中记录有已存储的数据的资源标识信息。By applying the embodiment of the present invention, the resource identification information of cached data can be recorded in advance and written into the storage information table. Therefore, the resource identification information of the stored data is recorded in the storage information table.

子步骤S12,将所述访问请求中的资源标识信息与所述存储信息表中的资源标识信息进行匹配。Sub-step S12, matching the resource identification information in the access request with the resource identification information in the stored information table.

在具体实现中,可以通过正则表达式等方式对访问请求中资源标识信息与存储信息表中的资源标识信息进行匹配。In a specific implementation, the resource identification information in the access request can be matched with the resource identification information in the storage information table by means of regular expressions or the like.

在本发明的一个实施例中,资源标识信息包括服务器信息Host与统一资源标识符URI,则子步骤S12进一步可以包括如下子步骤:In one embodiment of the present invention, the resource identification information includes server information Host and Uniform Resource Identifier URI, then substep S12 may further include the following substeps:

子步骤S121,判断所述访问请求中的服务器信息Host与所述存储信息表中的服务器信息Host是否相同;若是,则执行子步骤S122,若否,则执行子步骤S124。Sub-step S121, judging whether the server information Host in the access request is the same as the server information Host in the stored information table; if yes, execute sub-step S122, and if not, execute sub-step S124.

子步骤S122,判断所述访问请求中的统一资源标识符URI与所述存储信息表中的统一资源标识符URI是否相同;若是,则执行子步骤S123,若否,则执行子步骤S124。Sub-step S122, judging whether the URI in the access request is the same as the URI in the storage information table; if yes, execute sub-step S123, and if not, execute sub-step S124.

子步骤S123,确定匹配成功;Sub-step S123, determine that the matching is successful;

子步骤S124,确定匹配失败。In sub-step S124, it is determined that the matching fails.

在本发明实施例中,如果服务器信息Host与统一资源标识符URI均相同,则可以确定访问请求中资源标识信息与存储信息表中的资源标识信息匹配成功;如果服务器信息Host与统一资源标识符URI任一不相同,则可以确定访问请求中资源标识信息与存储信息表中的资源标识信息匹配失败。In the embodiment of the present invention, if the server information Host and the uniform resource identifier URI are all the same, it can be determined that the resource identification information in the access request matches the resource identification information in the storage information table successfully; if the server information Host and the uniform resource identifier URI If any of the URIs are different, it can be determined that the resource identification information in the access request fails to match the resource identification information in the storage information table.

子步骤S13,当匹配成功时,确定已存储有所述数据。Sub-step S13, when the matching is successful, it is determined that the data has been stored.

子步骤S14,当匹配失败时,确定未存储有所述数据。Sub-step S14, when the matching fails, it is determined that the data is not stored.

如果访问请求中资源标识信息与存储信息表中的资源标识信息匹配成功,则表示在先已缓存资源标识信息标识的数据。If the resource identification information in the access request matches the resource identification information in the storage information table successfully, it means that the data identified by the resource identification information has been cached previously.

如果访问请求中资源标识信息与存储信息表中的资源标识信息匹配失败,则表示在先未缓存资源标识信息标识的数据。If the resource identification information in the access request fails to match the resource identification information in the storage information table, it means that the data identified by the resource identification information has not been cached previously.

步骤104,当已存储所述数据时,返回所述数据。Step 104, when the data has been stored, return the data.

如果当前节点已缓存访问请求所需的数据,则可以对该访问请求进行响应,返回该数据。If the current node has cached the data required for the access request, it can respond to the access request and return the data.

在上述内容分发网络CDN中,若当前节点为边缘节点,则可以将数据返回客户端,若当前节点为父层节点,则可以将数据返回边缘节点。In the above content delivery network CDN, if the current node is an edge node, the data can be returned to the client, and if the current node is a parent layer node, the data can be returned to the edge node.

在本发明实施例中在内容分发网络CDN中具有多个节点,在当前节点中接收访问请求,从访问请求中提取资源标识信息,判断是否存储有所述访问请求中的资源标识信息对应的数据,当已存储数据时,返回所述数据,通过资源标识信息对数据进行缓存、定位,可以在多URL的情况下,识别出相同的数据进行缓存,减少了在此情况下的存储量,减少数据在查询时查询数量,提高了数据的命中率,从而减少了回源操作的频次,降低了源网站的访问压力。In the embodiment of the present invention, there are multiple nodes in the content distribution network CDN, the current node receives the access request, extracts the resource identification information from the access request, and judges whether the data corresponding to the resource identification information in the access request is stored , when the data has been stored, the data is returned, and the data is cached and located through the resource identification information. In the case of multiple URLs, the same data can be identified and cached, which reduces the amount of storage in this case and reduces the When the data is queried, the number of queries increases the hit rate of the data, thereby reducing the frequency of back-to-source operations and reducing the access pressure of the source website.

参照图3,示出了根据本发明一个实施例的一种基于内容分发网络CDN的数据访问方法实施例的步骤示意流程图,具体可以包括如下步骤:Referring to FIG. 3 , it shows a schematic flowchart of the steps of an embodiment of a data access method based on a content distribution network CDN according to an embodiment of the present invention, which may specifically include the following steps:

步骤301,在当前节点中接收访问请求。Step 301, receiving an access request in the current node.

步骤302,从所述访问请求中提取资源标识信息。Step 302, extract resource identification information from the access request.

步骤303,判断是否存储有所述访问请求中的资源标识信息映射的数据。Step 303, judging whether the data mapped to the resource identification information in the access request is stored.

在本发明的另一个实施例中,步骤103可以包括如下子步骤:In another embodiment of the present invention, step 103 may include the following sub-steps:

子步骤S21,查询预设的存储信息表。Sub-step S21, querying a preset storage information table.

应用本发明实施例,可以预先针对缓存的数据,记录其资源标识,写入存储信息表中,存储信息表中记录有已存储的数据的数据标识。By applying the embodiment of the present invention, the cached data can be pre-recorded with its resource identifier and written into the storage information table, where the data identifier of the stored data is recorded.

子步骤S22,将所述访问请求中的资源标识信息与所述存储信息表中的数据标识进行匹配。Sub-step S22, matching the resource identification information in the access request with the data identification in the storage information table.

子步骤S23,当匹配成功时,确定已存储有所述数据。Sub-step S23, when the matching is successful, it is determined that the data has been stored.

子步骤S24,当匹配失败时,确定未存储有所述数据。Sub-step S24, when the matching fails, it is determined that the data is not stored.

在具体实现中,可以通过正则表达式等方式对访问请求中资源标识信息与存储信息表中的资源标识进行匹配。In a specific implementation, the resource identification information in the access request can be matched with the resource identification in the storage information table by means of regular expressions or the like.

如果访问请求中资源标识信息与存储信息表中的资源标识匹配成功,则表示在先已缓存资源标识信息标识的数据。If the resource identification information in the access request matches the resource identification in the storage information table successfully, it means that the data identified by the resource identification information has been cached previously.

如果访问请求中资源标识信息与存储信息表中的资源标识匹配失败,则表示在先未缓存资源标识信息标识的数据。If the resource identification information in the access request fails to match the resource identification in the storage information table, it means that the data identified by the resource identification information has not been cached previously.

在本发明实施例中,资源标识信息还可以包括服务器信息Host与统一资源标识符URI,所述存储信息表中还记录有已存储的数据对应的服务器信息Host与统一资源标识符URI。In the embodiment of the present invention, the resource identification information may further include server information Host and uniform resource identifier URI, and the stored information table also records server information Host and uniform resource identifier URI corresponding to the stored data.

因此,在本发明实施例中,当确定已存储该数据时,判断资源标识信息中服务器信息Host与统一资源标识符URI与存储信息表中数据对应的服务器信息Host与统一资源标识符URI是否一致;若否,则在存储信息表中建立资源标识信息与数据之间的映射关系。Therefore, in the embodiment of the present invention, when it is determined that the data has been stored, it is judged whether the server information Host and the uniform resource identifier URI in the resource identification information are consistent with the server information Host and the uniform resource identifier URI corresponding to the data in the storage information table ; If not, establish a mapping relationship between resource identification information and data in the storage information table.

步骤304,当未存储所述数据时,获取所述数据。Step 304, when the data is not stored, obtain the data.

如果当前节点未缓存访问请求所需的数据,则可以进行回源操作,即从源网站获取访问请求所需的数据。If the current node does not cache the data required for the access request, a back-to-source operation can be performed, that is, the data required for the access request is obtained from the source website.

在上述内容分发网络CDN中,若当前节点为边缘节点,则向父层节点发送访问请求,接收父层节点针对访问请求发送的数据。In the above content distribution network CDN, if the current node is an edge node, it sends an access request to the parent layer node, and receives data sent by the parent layer node in response to the access request.

若当前节点为父层节点,则向源网站发送访问请求,接收源网站针对访问请求发送的数据。If the current node is a parent layer node, an access request is sent to the source website, and data sent by the source website in response to the access request is received.

对于父层节点而言,可以判断是否已缓存该数据;若是,则将该数据块发送至边缘节点,否则,通过该数据的URL,从源网站获取该数据,并发送至边缘节点。For the parent layer node, it can be judged whether the data has been cached; if so, the data block is sent to the edge node, otherwise, the data is obtained from the source website through the URL of the data and sent to the edge node.

步骤305,返回所述数据。Step 305, returning the data.

通过回源操作获得数据之后,可以对该访问请求进行响应,返回该数据。After obtaining the data through the back-to-source operation, you can respond to the access request and return the data.

步骤306,缓存所述数据。Step 306, cache the data.

步骤307,在预设的存储信息表中建立所述资源标识信息与所述数据之间的映射关系。Step 307, establishing a mapping relationship between the resource identification information and the data in a preset storage information table.

对于当前节点而言,在获取了该数据之后,可以对其进行缓存,并且,已该数据的资源标识信息作为key(键)、以该数据作为value(值),写入存储信息表中,建立键值对形式的映射关系。For the current node, after obtaining the data, it can be cached, and the resource identification information of the data is used as the key (key), and the data is used as the value (value), and written into the storage information table, Establish a mapping relationship in the form of key-value pairs.

在具体实现中,若资源标识信息包括服务器信息Host与统一资源标识符URI,则可以以服务器信息Host与统一资源标识符URI作为键、数据作为值,在预设的存储信息表中建立键值对。In a specific implementation, if the resource identification information includes the server information Host and the uniform resource identifier URI, then the server information Host and the uniform resource identifier URI can be used as the key and data as the value, and the key value can be established in the preset storage information table right.

对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明实施例所必须的。For the method embodiment, for the sake of simple description, it is expressed as a series of action combinations, but those skilled in the art should know that the embodiment of the present invention is not limited by the described action order, because according to the embodiment of the present invention , certain steps may be performed in other order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

参照图4,示出了根据本发明一个实施例的一种基于内容分发网络CDN的数据访问装置实施例的结构示意框图,在内容分发网络CDN中具有多个节点,所述装置具体可以包括如下模块:Referring to FIG. 4 , it shows a schematic block diagram of a data access device embodiment based on a content distribution network CDN according to an embodiment of the present invention. There are multiple nodes in the content distribution network CDN, and the device may specifically include the following module:

访问请求接收模块401,用于在当前节点中接收访问请求;An access request receiving module 401, configured to receive an access request in the current node;

资源标识信息提取模块402,用于从所述访问请求中提取资源标识信息;A resource identification information extraction module 402, configured to extract resource identification information from the access request;

存储判断模块403,用于判断是否存储有所述访问请求中的资源标识信息对应的数据;A storage judging module 403, configured to judge whether data corresponding to the resource identification information in the access request is stored;

第一数据返回模块404,用于当已存储所述数据时,返回所述数据。The first data return module 404 is configured to return the data when the data has been stored.

在本发明的一个实施例中,还包括:In one embodiment of the present invention, also include:

数据获取模块,用于当未存储所述数据时,获取所述数据;A data acquisition module, configured to acquire the data when the data is not stored;

第二数据返回模块,用于返回所述数据。The second data return module is used to return the data.

在本发明的一个实施例中,所述存储判断模块403包括:In one embodiment of the present invention, the storage judging module 403 includes:

第一存储信息表查询子模块,用于查询预设的存储信息表,所述存储信息表中记录有已存储的数据的资源标识信息;The first storage information table query submodule is used to query a preset storage information table, and resource identification information of stored data is recorded in the storage information table;

资源标识信息匹配子模块,用于将所述访问请求中的资源标识信息与所述存储信息表中的资源标识信息进行匹配;A resource identification information matching submodule, configured to match the resource identification information in the access request with the resource identification information in the storage information table;

第一已存储确定子模块,用于当匹配成功时,确定已存储有所述数据;The first stored determination submodule is used to determine that the data has been stored when the matching is successful;

第一未存储确定子模块,用于当匹配失败时,确定未存储有所述数据。The first non-storage determining submodule is configured to determine that the data is not stored when the matching fails.

在本发明的一个实施例中,所述资源标识信息包括服务器信息Host与统一资源标识符URI;In one embodiment of the present invention, the resource identification information includes server information Host and uniform resource identifier URI;

所述资源标识信息匹配子模块包括:The resource identification information matching submodule includes:

Host判断单元,用于判断所述访问请求中的服务器信息Host与所述存储信息表中的服务器信息Host是否相同;若是,则调用URI判断单元,若否,则匹配失败确定单元;Host judging unit, used to judge whether the server information Host in the access request is the same as the server information Host in the stored information table; if so, call the URI judging unit, if not, then match failure determining unit;

URI判断单元,用于判断所述访问请求中的统一资源标识符URI与所述存储信息表中的统一资源标识符URI是否相同;若是,则调用匹配成功确定单元,若否,则调用匹配失败确定单元;The URI judging unit is used to judge whether the uniform resource identifier URI in the access request is the same as the uniform resource identifier URI in the stored information table; if so, call the matching success determination unit, if not, call the matching failure Determine the unit;

匹配成功确定单元,用于确定匹配成功;A matching success determination unit, configured to determine that the matching is successful;

匹配失败确定单元,用于确定匹配失败。The matching failure determination unit is configured to determine the matching failure.

在本发明的一个实施例中,还包括:In one embodiment of the present invention, also include:

数据缓存模块,用于缓存所述数据;A data cache module, configured to cache the data;

第一映射关系建立模块,用于在预设的存储信息表中建立所述资源标识信息与所述数据之间的映射关系。The first mapping relationship establishment module is configured to establish a mapping relationship between the resource identification information and the data in a preset storage information table.

在本发明的一个实施例中,所述第一映射关系建立模块包括:In one embodiment of the present invention, the first mapping relationship establishment module includes:

键值对建立子模块,用于以服务器信息Host与统一资源标识符URI作为键、所述数据作为值,在预设的存储信息表中建立键值对。The key-value pair establishment sub-module is used for establishing key-value pairs in a preset storage information table with the server information Host and the uniform resource identifier URI as keys and the data as a value.

在本发明的一个实施例中,所述资源标识信息包括数据标识,In an embodiment of the present invention, the resource identification information includes a data identification,

所述存储判断模块403包括:The storage judging module 403 includes:

第二存储信息表查询子模块,用于查询预设的存储信息表,所述存储信息表中记录有已存储的数据的数据标识;The second storage information table query submodule is used to query the preset storage information table, and the data identification of the stored data is recorded in the storage information table;

数据标识匹配子模块,用于将所述访问请求中的资源标识信息与所述存储信息表中的数据标识进行匹配;A data identifier matching submodule, configured to match the resource identifier information in the access request with the data identifier in the storage information table;

第二已存储确定子模块,用于当匹配成功时,确定已存储有所述数据;The second stored determination submodule is used to determine that the data has been stored when the matching is successful;

第二未存储确定子模块,用于当匹配失败时,确定未存储有所述数据。The second non-storage determining submodule is used to determine that the data is not stored when the matching fails.

在本发明的一个实施例中,所述资源标识信息还包括服务器信息Host与统一资源标识符URI,所述存储信息表中还记录有已存储的数据对应的服务器信息Host与统一资源标识符URI,所述装置还包括:In one embodiment of the present invention, the resource identification information also includes server information Host and uniform resource identifier URI, and the stored information table also records server information Host and uniform resource identifier URI corresponding to the stored data , the device also includes:

信息匹配模块,用于当确定已存储所述数据时,判断所述资源标识信息中服务器信息Host与统一资源标识符URI与所述存储信息表中所述数据对应的服务器信息Host与统一资源标识符URI是否一致;若否,则调用第二映射关系建立模块;An information matching module, configured to determine that the server information Host and the uniform resource identifier URI in the resource identification information correspond to the server information Host and the uniform resource identifier corresponding to the data in the stored information table when it is determined that the data has been stored Whether the symbol URI is consistent; if not, then call the second mapping relationship establishment module;

第二映射关系建立模块,用于在所述存储信息表中建立所述资源标识信息与所述数据之间的映射关系。The second mapping relationship establishment module is configured to establish a mapping relationship between the resource identification information and the data in the storage information table.

对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的基于内容分发网络CDN的数据访问设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of some or all of the components in the data access device based on the content distribution network CDN according to the embodiment of the present invention. Full functionality. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

本发明实施例公开了A1、一种基于内容分发网络CDN的数据访问方法,在内容分发网络CDN中具有多个节点,所述方法包括:The embodiment of the present invention discloses A1, a data access method based on content distribution network CDN, which has multiple nodes in content distribution network CDN, and the method includes:

在当前节点中接收访问请求;Receive an access request in the current node;

从所述访问请求中提取资源标识信息;extracting resource identification information from the access request;

判断是否存储有所述访问请求中的资源标识信息对应的数据;judging whether data corresponding to the resource identification information in the access request is stored;

当已存储所述数据时,返回所述数据。When the data has been stored, return the data.

A2、如A1所述的方法,还包括:A2, the method as described in A1, also includes:

当未存储所述数据时,获取所述数据;when the data is not stored, obtaining the data;

返回所述数据。Return the data.

A3、如A1或A2所述的方法,所述判断是否存储有所述访问请求中的资源标识信息对应的数据,包括:A3. The method described in A1 or A2, the judging whether the data corresponding to the resource identification information in the access request is stored includes:

查询预设的存储信息表,所述存储信息表中记录有已存储的数据的资源标识信息;Querying a preset storage information table, the resource identification information of the stored data is recorded in the storage information table;

将所述访问请求中的资源标识信息与所述存储信息表中的资源标识信息进行匹配;matching the resource identification information in the access request with the resource identification information in the stored information table;

当匹配成功时,确定已存储有所述数据;When the matching is successful, it is determined that the data has been stored;

当匹配失败时,确定未存储有所述数据。When the matching fails, it is determined that the data is not stored.

A4、如A3所述的方法,所述资源标识信息包括服务器信息Host与统一资源标识符URI;A4, the method as described in A3, the resource identification information includes server information Host and uniform resource identifier URI;

所述将所述访问请求中的资源标识信息与所述存储信息表中的资源标识信息进行匹配,包括:The matching of the resource identification information in the access request with the resource identification information in the storage information table includes:

子步骤S121,判断所述访问请求中的服务器信息Host与所述存储信息表中的服务器信息Host是否相同;若是,则执行子步骤S122,若否,则执行子步骤S124;Sub-step S121, judging whether the server information Host in the access request is the same as the server information Host in the stored information table; if yes, execute sub-step S122, if not, execute sub-step S124;

子步骤S122,判断所述访问请求中的统一资源标识符URI与所述存储信息表中的统一资源标识符URI是否相同;若是,则执行子步骤S123,若否,则执行子步骤S124;Sub-step S122, judging whether the uniform resource identifier URI in the access request is the same as the uniform resource identifier URI in the stored information table; if yes, execute sub-step S123, if not, execute sub-step S124;

子步骤S123,确定匹配成功;Sub-step S123, determine that the matching is successful;

子步骤S124,确定匹配失败。In sub-step S124, it is determined that the matching fails.

A5、如A2或A4所述的方法,还包括:A5. The method as described in A2 or A4, further comprising:

缓存所述数据;cache said data;

在预设的存储信息表中建立所述资源标识信息与所述数据之间的映射关系。A mapping relationship between the resource identification information and the data is established in a preset storage information table.

A6、如A5所述的方法,所述在预设的存储信息表中建立所述资源标识信息与所述数据之间的映射关系,包括:A6. The method as described in A5, the establishment of the mapping relationship between the resource identification information and the data in the preset storage information table includes:

以服务器信息Host与统一资源标识符URI作为键、所述数据作为值,在预设的存储信息表中建立键值对。A key-value pair is established in a preset storage information table with the server information Host and the uniform resource identifier URI as a key and the data as a value.

A7、如A2所述的方法,所述资源标识信息包括数据标识,A7. The method as described in A2, wherein the resource identification information includes a data identification,

所述判断是否存储有所述访问请求中资源标识信息对应的数据,包括:The judging whether data corresponding to the resource identification information in the access request is stored includes:

查询预设的存储信息表,所述存储信息表中记录有已存储的数据的数据标识;Querying a preset storage information table, the data identifier of the stored data is recorded in the storage information table;

将所述访问请求中的资源标识信息与所述存储信息表中的数据标识进行匹配;matching the resource identification information in the access request with the data identification in the storage information table;

当匹配成功时,确定已存储有所述数据;When the matching is successful, it is determined that the data has been stored;

当匹配失败时,确定未存储有所述数据。When the matching fails, it is determined that the data is not stored.

A8、如A7所述的方法,所述资源标识信息还包括服务器信息Host与统一资源标识符URI,所述存储信息表中还记录有已存储的数据对应的服务器信息Host与统一资源标识符URI,所述方法还包括:A8, the method as described in A7, the resource identification information also includes server information Host and uniform resource identifier URI, and the server information Host and uniform resource identifier URI corresponding to the stored data are also recorded in the storage information table , the method also includes:

当确定已存储所述数据时,判断所述资源标识信息中服务器信息Host与统一资源标识符URI与所述存储信息表中所述数据对应的服务器信息Host与统一资源标识符URI是否一致;When it is determined that the data has been stored, judging whether the server information Host and the uniform resource identifier URI in the resource identification information are consistent with the server information Host and the uniform resource identifier URI corresponding to the data in the storage information table;

若否,则在所述存储信息表中建立所述资源标识信息与所述数据之间的映射关系。If not, establish a mapping relationship between the resource identification information and the data in the storage information table.

本发明实施例还公开了B9、一种基于内容分发网络CDN的数据访问装置,在内容分发网络CDN中具有多个节点,所述装置包括:The embodiment of the present invention also discloses B9, a data access device based on a content distribution network CDN, which has multiple nodes in the content distribution network CDN, and the device includes:

访问请求接收模块,用于在当前节点中接收访问请求;An access request receiving module, configured to receive an access request in the current node;

资源标识信息提取模块,用于从所述访问请求中提取资源标识信息;A resource identification information extraction module, configured to extract resource identification information from the access request;

存储判断模块,用于判断是否存储有所述访问请求中的资源标识信息对应的数据;A storage judging module, configured to judge whether data corresponding to the resource identification information in the access request is stored;

第一数据返回模块,用于当已存储所述数据时,返回所述数据。The first data returning module is used for returning the data when the data has been stored.

B10、如B9所述的装置,还包括:B10. The device as described in B9, further comprising:

数据获取模块,用于当未存储所述数据时,获取所述数据;A data acquisition module, configured to acquire the data when the data is not stored;

第二数据返回模块,用于返回所述数据。The second data return module is used to return the data.

B11、如B9或B10所述的装置,所述存储判断模块包括:B11, the device as described in B9 or B10, the storage judgment module includes:

第一存储信息表查询子模块,用于查询预设的存储信息表,所述存储信息表中记录有已存储的数据的资源标识信息;The first storage information table query submodule is used to query a preset storage information table, and resource identification information of stored data is recorded in the storage information table;

资源标识信息匹配子模块,用于将所述访问请求中的资源标识信息与所述存储信息表中的资源标识信息进行匹配;A resource identification information matching submodule, configured to match the resource identification information in the access request with the resource identification information in the storage information table;

第一已存储确定子模块,用于当匹配成功时,确定已存储有所述数据;The first stored determination submodule is used to determine that the data has been stored when the matching is successful;

第一未存储确定子模块,用于当匹配失败时,确定未存储有所述数据。The first non-storage determining submodule is configured to determine that the data is not stored when the matching fails.

B12、如B11所述的装置,所述资源标识信息包括服务器信息Host与统一资源标识符URI;B12. The device as described in B11, wherein the resource identification information includes server information Host and uniform resource identifier URI;

所述资源标识信息匹配子模块包括:The resource identification information matching submodule includes:

Host判断单元,用于判断所述访问请求中的服务器信息Host与所述存储信息表中的服务器信息Host是否相同;若是,则调用URI判断单元,若否,则匹配失败确定单元;Host judging unit, used to judge whether the server information Host in the access request is the same as the server information Host in the stored information table; if so, call the URI judging unit, if not, then match failure determining unit;

URI判断单元,用于判断所述访问请求中的统一资源标识符URI与所述存储信息表中的统一资源标识符URI是否相同;若是,则调用匹配成功确定单元,若否,则调用匹配失败确定单元;The URI judging unit is used to judge whether the uniform resource identifier URI in the access request is the same as the uniform resource identifier URI in the stored information table; if so, call the matching success determination unit, if not, call the matching failure Determine the unit;

匹配成功确定单元,用于确定匹配成功;A matching success determination unit, configured to determine that the matching is successful;

匹配失败确定单元,用于确定匹配失败。The matching failure determination unit is configured to determine the matching failure.

B13、如B10或B12所述的装置,还包括:B13. The device as described in B10 or B12, further comprising:

数据缓存模块,用于缓存所述数据;A data cache module, configured to cache the data;

第一映射关系建立模块,用于在预设的存储信息表中建立所述资源标识信息与所述数据之间的映射关系。The first mapping relationship establishment module is configured to establish a mapping relationship between the resource identification information and the data in a preset storage information table.

B14、如B13所述的装置,所述第一映射关系建立模块包括:B14, the device as described in B13, described first mapping relation establishment module comprises:

键值对建立子模块,用于以服务器信息Host与统一资源标识符URI作为键、所述数据作为值,在预设的存储信息表中建立键值对。The key-value pair establishment sub-module is used for establishing key-value pairs in a preset storage information table with the server information Host and the uniform resource identifier URI as keys and the data as a value.

B15、如B10所述的装置,所述资源标识信息包括数据标识,B15. The device as described in B10, the resource identification information includes a data identification,

所述存储判断模块包括:The storage judgment module includes:

第二存储信息表查询子模块,用于查询预设的存储信息表,所述存储信息表中记录有已存储的数据的数据标识;The second storage information table query submodule is used to query the preset storage information table, and the data identification of the stored data is recorded in the storage information table;

数据标识匹配子模块,用于将所述访问请求中的资源标识信息与所述存储信息表中的数据标识进行匹配;A data identifier matching submodule, configured to match the resource identifier information in the access request with the data identifier in the storage information table;

第二已存储确定子模块,用于当匹配成功时,确定已存储有所述数据;The second stored determination submodule is used to determine that the data has been stored when the matching is successful;

第二未存储确定子模块,用于当匹配失败时,确定未存储有所述数据。The second non-storage determining submodule is used to determine that the data is not stored when the matching fails.

B16、如B15所述的装置,所述资源标识信息还包括服务器信息Host与统一资源标识符URI,所述存储信息表中还记录有已存储的数据对应的服务器信息Host与统一资源标识符URI,所述装置还包括:B16, the device as described in B15, the resource identification information also includes server information Host and uniform resource identifier URI, and the server information Host and uniform resource identifier URI corresponding to the stored data are also recorded in the storage information table , the device also includes:

信息匹配模块,用于当确定已存储所述数据时,判断所述资源标识信息中服务器信息Host与统一资源标识符URI与所述存储信息表中所述数据对应的服务器信息Host与统一资源标识符URI是否一致;若否,则调用第二映射关系建立模块;An information matching module, configured to determine that the server information Host and the uniform resource identifier URI in the resource identification information correspond to the server information Host and the uniform resource identifier corresponding to the data in the stored information table when it is determined that the data has been stored Whether the symbol URI is consistent; if not, then call the second mapping relationship establishment module;

第二映射关系建立模块,用于在所述存储信息表中建立所述资源标识信息与所述数据之间的映射关系。The second mapping relationship establishment module is configured to establish a mapping relationship between the resource identification information and the data in the storage information table.

Claims (10)

1.一种基于内容分发网络CDN的数据访问方法,在内容分发网络CDN中具有多个节点,所述方法包括:1. A data access method based on content distribution network CDN, has a plurality of nodes in content distribution network CDN, described method comprises: 在当前节点中接收访问请求;Receive an access request in the current node; 从所述访问请求中提取资源标识信息;extracting resource identification information from the access request; 判断是否存储有所述访问请求中的资源标识信息对应的数据;judging whether data corresponding to the resource identification information in the access request is stored; 当已存储所述数据时,返回所述数据。When the data has been stored, return the data. 2.如权利要求1所述的方法,其特征在于,还包括:2. The method of claim 1, further comprising: 当未存储所述数据时,获取所述数据;when the data is not stored, obtaining the data; 返回所述数据。Return the data. 3.如权利要求1或2所述的方法,其特征在于,所述判断是否存储有所述访问请求中的资源标识信息对应的数据,包括:3. The method according to claim 1 or 2, wherein the judging whether data corresponding to the resource identification information in the access request is stored comprises: 查询预设的存储信息表,所述存储信息表中记录有已存储的数据的资源标识信息;Querying a preset storage information table, the resource identification information of the stored data is recorded in the storage information table; 将所述访问请求中的资源标识信息与所述存储信息表中的资源标识信息进行匹配;matching the resource identification information in the access request with the resource identification information in the stored information table; 当匹配成功时,确定已存储有所述数据;When the matching is successful, it is determined that the data has been stored; 当匹配失败时,确定未存储有所述数据。When the matching fails, it is determined that the data is not stored. 4.如权利要求3所述的方法,其特征在于,所述资源标识信息包括服务器信息Host与统一资源标识符URI;4. The method according to claim 3, wherein the resource identification information includes server information Host and Uniform Resource Identifier URI; 所述将所述访问请求中的资源标识信息与所述存储信息表中的资源标识信息进行匹配,包括:The matching of the resource identification information in the access request with the resource identification information in the storage information table includes: 子步骤S121,判断所述访问请求中的服务器信息Host与所述存储信息表中的服务器信息Host是否相同;若是,则执行子步骤S122,若否,则执行子步骤S124;Sub-step S121, judging whether the server information Host in the access request is the same as the server information Host in the stored information table; if yes, execute sub-step S122, if not, execute sub-step S124; 子步骤S122,判断所述访问请求中的统一资源标识符URI与所述存储信息表中的统一资源标识符URI是否相同;若是,则执行子步骤S123,若否,则执行子步骤S124;Sub-step S122, judging whether the uniform resource identifier URI in the access request is the same as the uniform resource identifier URI in the stored information table; if yes, execute sub-step S123, if not, execute sub-step S124; 子步骤S123,确定匹配成功;Sub-step S123, determine that the matching is successful; 子步骤S124,确定匹配失败。In sub-step S124, it is determined that the matching fails. 5.如权利要求2或4所述的方法,其特征在于,还包括:5. The method according to claim 2 or 4, further comprising: 缓存所述数据;cache said data; 在预设的存储信息表中建立所述资源标识信息与所述数据之间的映射关系。A mapping relationship between the resource identification information and the data is established in a preset storage information table. 6.如权利要求5所述的方法,其特征在于,所述在预设的存储信息表中建立所述资源标识信息与所述数据之间的映射关系,包括:6. The method according to claim 5, wherein said establishing a mapping relationship between said resource identification information and said data in a preset storage information table comprises: 以服务器信息Host与统一资源标识符URI作为键、所述数据作为值,在预设的存储信息表中建立键值对。A key-value pair is established in a preset storage information table with the server information Host and the uniform resource identifier URI as a key and the data as a value. 7.如权利要求2所述的方法,其特征在于,所述资源标识信息包括数据标识,7. The method according to claim 2, wherein the resource identification information includes a data identification, 所述判断是否存储有所述访问请求中资源标识信息对应的数据,包括:The judging whether data corresponding to the resource identification information in the access request is stored includes: 查询预设的存储信息表,所述存储信息表中记录有已存储的数据的数据标识;Querying a preset storage information table, the data identifier of the stored data is recorded in the storage information table; 将所述访问请求中的资源标识信息与所述存储信息表中的数据标识进行匹配;matching the resource identification information in the access request with the data identification in the storage information table; 当匹配成功时,确定已存储有所述数据;When the matching is successful, it is determined that the data has been stored; 当匹配失败时,确定未存储有所述数据。When the matching fails, it is determined that the data is not stored. 8.如权利要求7所述的方法,其特征在于,所述资源标识信息还包括服务器信息Host与统一资源标识符URI,所述存储信息表中还记录有已存储的数据对应的服务器信息Host与统一资源标识符URI,所述方法还包括:8. The method according to claim 7, wherein the resource identification information further includes server information Host and Uniform Resource Identifier URI, and the storage information table also records server information Host corresponding to the stored data With a Uniform Resource Identifier URI, the method further includes: 当确定已存储所述数据时,判断所述资源标识信息中服务器信息Host与统一资源标识符URI与所述存储信息表中所述数据对应的服务器信息Host与统一资源标识符URI是否一致;When it is determined that the data has been stored, judging whether the server information Host and the uniform resource identifier URI in the resource identification information are consistent with the server information Host and the uniform resource identifier URI corresponding to the data in the storage information table; 若否,则在所述存储信息表中建立所述资源标识信息与所述数据之间的映射关系。If not, establish a mapping relationship between the resource identification information and the data in the storage information table. 9.一种基于内容分发网络CDN的数据访问装置,在内容分发网络CDN中具有多个节点,所述装置包括:9. A data access device based on a content distribution network CDN, which has a plurality of nodes in the content distribution network CDN, said device comprising: 访问请求接收模块,用于在当前节点中接收访问请求;An access request receiving module, configured to receive an access request in the current node; 资源标识信息提取模块,用于从所述访问请求中提取资源标识信息;A resource identification information extraction module, configured to extract resource identification information from the access request; 存储判断模块,用于判断是否存储有所述访问请求中的资源标识信息对应的数据;A storage judging module, configured to judge whether data corresponding to the resource identification information in the access request is stored; 第一数据返回模块,用于当已存储所述数据时,返回所述数据。The first data returning module is used for returning the data when the data has been stored. 10.如权利要求9所述的装置,其特征在于,还包括:10. The apparatus of claim 9, further comprising: 数据获取模块,用于当未存储所述数据时,获取所述数据;A data acquisition module, configured to acquire the data when the data is not stored; 第二数据返回模块,用于返回所述数据。The second data return module is used to return the data.
CN201711485184.5A 2017-12-29 2017-12-29 A kind of data access method and device based on content distributing network CDN Pending CN108234639A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711485184.5A CN108234639A (en) 2017-12-29 2017-12-29 A kind of data access method and device based on content distributing network CDN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711485184.5A CN108234639A (en) 2017-12-29 2017-12-29 A kind of data access method and device based on content distributing network CDN

Publications (1)

Publication Number Publication Date
CN108234639A true CN108234639A (en) 2018-06-29

Family

ID=62647369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711485184.5A Pending CN108234639A (en) 2017-12-29 2017-12-29 A kind of data access method and device based on content distributing network CDN

Country Status (1)

Country Link
CN (1) CN108234639A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063142A (en) * 2018-08-06 2018-12-21 网宿科技股份有限公司 Web page resources method for pushing and server
CN109639801A (en) * 2018-12-17 2019-04-16 深圳市网心科技有限公司 Back end distribution and data capture method and system
CN109672756A (en) * 2019-02-14 2019-04-23 网宿科技股份有限公司 A kind of data transmission method and relevant apparatus, server and storage medium
CN110209949A (en) * 2019-06-11 2019-09-06 湖南快乐阳光互动娱乐传媒有限公司 resource pushing method and device
CN110830564A (en) * 2019-10-30 2020-02-21 北京金山云网络技术有限公司 CDN scheduling method, apparatus, system, and computer-readable storage medium
CN111726387A (en) * 2019-03-22 2020-09-29 华为技术有限公司 Resource acquisition method and device
CN112822289A (en) * 2021-01-29 2021-05-18 深圳市大头兄弟科技有限公司 Data uploading and reading method, system, equipment and storage medium
CN113296924A (en) * 2020-04-28 2021-08-24 阿里巴巴集团控股有限公司 Content distribution method, device, system and storage medium
CN113327063A (en) * 2021-06-25 2021-08-31 北京奇艺世纪科技有限公司 Resource detection method and device, electronic equipment and computer readable storage medium
CN113590658A (en) * 2021-07-06 2021-11-02 广州汇思信息科技股份有限公司 Cache data processing method and device, computer equipment and storage medium
CN114385596A (en) * 2022-01-14 2022-04-22 上海幻电信息科技有限公司 Data processing method and device
CN114466018A (en) * 2022-03-22 2022-05-10 北京有竹居网络技术有限公司 Scheduling method, device, storage medium and electronic device for content distribution network
CN116208668A (en) * 2023-05-05 2023-06-02 北京零壹视界科技有限公司 Data caching method, device, equipment and medium based on content distribution network
CN119676002A (en) * 2025-02-21 2025-03-21 广州市千钧网络科技有限公司 Method, source station gateway, product, device and storage medium for preventing cache breakdown
US12375583B2 (en) 2022-03-22 2025-07-29 Beijing Youzhuju Network Technology Co, Ltd. Scheduling method and apparatus, storage medium and electronic device for content delivery network

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102077189A (en) * 2008-06-30 2011-05-25 亚马逊技术有限公司 Request routing using network computing components
CN102282825A (en) * 2010-12-14 2011-12-14 华为技术有限公司 Method and device for streaming media to request address mapping and cache nodes in content delivery network
CN104580177A (en) * 2014-12-26 2015-04-29 广州酷狗计算机科技有限公司 Resource supplying method, device and system
EP2708013B1 (en) * 2011-05-12 2015-07-22 Telefonica S.A. A method for DNS resolution of content requests in a CDN service
CN105589919A (en) * 2015-09-18 2016-05-18 广州市动景计算机科技有限公司 Method and device for processing webpage resource
CN106412636A (en) * 2015-07-29 2017-02-15 中兴通讯股份有限公司 Playing control method and device
CN107015978A (en) * 2016-01-27 2017-08-04 广州市动景计算机科技有限公司 A kind of web page resources processing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102077189A (en) * 2008-06-30 2011-05-25 亚马逊技术有限公司 Request routing using network computing components
CN102282825A (en) * 2010-12-14 2011-12-14 华为技术有限公司 Method and device for streaming media to request address mapping and cache nodes in content delivery network
EP2708013B1 (en) * 2011-05-12 2015-07-22 Telefonica S.A. A method for DNS resolution of content requests in a CDN service
CN104580177A (en) * 2014-12-26 2015-04-29 广州酷狗计算机科技有限公司 Resource supplying method, device and system
CN106412636A (en) * 2015-07-29 2017-02-15 中兴通讯股份有限公司 Playing control method and device
CN105589919A (en) * 2015-09-18 2016-05-18 广州市动景计算机科技有限公司 Method and device for processing webpage resource
CN107015978A (en) * 2016-01-27 2017-08-04 广州市动景计算机科技有限公司 A kind of web page resources processing method and device

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063142A (en) * 2018-08-06 2018-12-21 网宿科技股份有限公司 Web page resources method for pushing and server
CN109639801A (en) * 2018-12-17 2019-04-16 深圳市网心科技有限公司 Back end distribution and data capture method and system
CN109672756A (en) * 2019-02-14 2019-04-23 网宿科技股份有限公司 A kind of data transmission method and relevant apparatus, server and storage medium
CN111726387A (en) * 2019-03-22 2020-09-29 华为技术有限公司 Resource acquisition method and device
CN110209949A (en) * 2019-06-11 2019-09-06 湖南快乐阳光互动娱乐传媒有限公司 resource pushing method and device
CN110830564A (en) * 2019-10-30 2020-02-21 北京金山云网络技术有限公司 CDN scheduling method, apparatus, system, and computer-readable storage medium
CN113296924B (en) * 2020-04-28 2022-07-22 阿里巴巴集团控股有限公司 Content distribution method, device, system and storage medium
CN113296924A (en) * 2020-04-28 2021-08-24 阿里巴巴集团控股有限公司 Content distribution method, device, system and storage medium
CN112822289A (en) * 2021-01-29 2021-05-18 深圳市大头兄弟科技有限公司 Data uploading and reading method, system, equipment and storage medium
CN113327063A (en) * 2021-06-25 2021-08-31 北京奇艺世纪科技有限公司 Resource detection method and device, electronic equipment and computer readable storage medium
CN113327063B (en) * 2021-06-25 2023-08-18 北京奇艺世纪科技有限公司 Resource detection method, device, electronic equipment and computer readable storage medium
CN113590658A (en) * 2021-07-06 2021-11-02 广州汇思信息科技股份有限公司 Cache data processing method and device, computer equipment and storage medium
CN114385596A (en) * 2022-01-14 2022-04-22 上海幻电信息科技有限公司 Data processing method and device
CN114466018A (en) * 2022-03-22 2022-05-10 北京有竹居网络技术有限公司 Scheduling method, device, storage medium and electronic device for content distribution network
US12375583B2 (en) 2022-03-22 2025-07-29 Beijing Youzhuju Network Technology Co, Ltd. Scheduling method and apparatus, storage medium and electronic device for content delivery network
CN116208668A (en) * 2023-05-05 2023-06-02 北京零壹视界科技有限公司 Data caching method, device, equipment and medium based on content distribution network
CN119676002A (en) * 2025-02-21 2025-03-21 广州市千钧网络科技有限公司 Method, source station gateway, product, device and storage medium for preventing cache breakdown

Similar Documents

Publication Publication Date Title
CN108234639A (en) A kind of data access method and device based on content distributing network CDN
US20230059587A1 (en) Content delivery network optimization system
EP2266043B1 (en) Cache optimzation
CN103561121B (en) Method and device for analyzing DNS and browser
US9390200B2 (en) Local caching device, system and method for providing content caching service
JP5404825B2 (en) Content categorization method and system
US20240348677A1 (en) Network Address Resolution
CN104468817A (en) Method and device for achieving resource download through CDN, server and client side
CN108234632A (en) A kind of data distributing method and device of content distributing network CDN
CN108173952A (en) A data access method and device for content distribution network CDN
CN102739811B (en) The method and apparatus of domain name mapping
US20140115120A1 (en) Content Delivery Network CDN Routing Method, Device, and System
CN108234207A (en) A kind of Fault Locating Method and device based on content distributing network CDN
US10200490B2 (en) Content-based redirection
CN108200443A (en) The distribution method and device of a kind of live TV stream
EP3217611A1 (en) Media resource feedback method and device
CN103455439A (en) Local caching device, system and method for providing content caching service
CN108173953A (en) A CDN-based file distribution method and device
CN108234638A (en) A kind of data processing method and device based on content distributing network CDN
CN108494875A (en) A kind of method and apparatus of feedback resources file
US10122630B1 (en) Methods for network traffic presteering and devices thereof
EP2901658B1 (en) Request-agnostic caching for a data resource collection
CN107347100B (en) Transparent proxy forwarding method for content distribution network
CN103416027A (en) Cache optimization method, cache and cache optimization system
CN108111623A (en) A kind of communication means and device based on content distributing network CDN

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180629

RJ01 Rejection of invention patent application after publication