CN118827797A - Scheduling method and related equipment - Google Patents
Scheduling method and related equipment Download PDFInfo
- Publication number
- CN118827797A CN118827797A CN202411296498.0A CN202411296498A CN118827797A CN 118827797 A CN118827797 A CN 118827797A CN 202411296498 A CN202411296498 A CN 202411296498A CN 118827797 A CN118827797 A CN 118827797A
- Authority
- CN
- China
- Prior art keywords
- domain name
- target
- replacement
- scheduling
- index
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 67
- 230000004044 response Effects 0.000 claims description 28
- 238000004590 computer program Methods 0.000 claims description 17
- 238000013507 mapping Methods 0.000 claims description 14
- 230000006870 function Effects 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 14
- 238000012360 testing method Methods 0.000 description 14
- 238000004422 calculation algorithm Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000001133 acceleration Effects 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
- 239000000284 extract Substances 0.000 description 4
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 3
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012508 change request Methods 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000008929 regeneration Effects 0.000 description 1
- 238000011069 regeneration method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5053—Lease time; Renewal aspects
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域Technical Field
本公开涉及计算机和网络技术领域,尤其涉及一种客户端、调度系统、调度方法、调度装置、电子设备、计算机可读存储介质及计算机程序产品。The present disclosure relates to the field of computer and network technology, and in particular to a client, a scheduling system, a scheduling method, a scheduling device, an electronic device, a computer-readable storage medium, and a computer program product.
背景技术Background Art
内容分发网络(Content Delivery Network,CDN),是一种利用分布式网络节点提供内容加速服务的技术。CDN将网站等内容缓存到离用户最近的服务器或业务节点或业务服务器,从而可以提高用户访问速度、降低网络带宽压力以及提高网站可用性。Content Delivery Network (CDN) is a technology that uses distributed network nodes to provide content acceleration services. CDN caches website and other content to the server or business node or business server closest to the user, thereby increasing user access speed, reducing network bandwidth pressure, and improving website availability.
具体的,CDN通过在因特网(Internet)中叠加一层新的网络架构,将内容发布到最接近用户的网络“边缘”。如果没有CDN,所有用户要想看内容提供商的内容,都要去访问内容提供商,容易造成到内容提供商的拥塞,恶化网络性能。为了解决网络拥塞,在因特网上叠加CDN,即内容提供商把其内容拷贝到各个业务节点,这样用户就不用都挤到内容提供商上去访问,而是访问其离相对较近的业务节点,业务节点存储着内容提供商存放的内容的各高速缓存,业务节点从各高速缓存中给用户播放内容。这样,通过在因特网上叠加CDN,解决了网络拥塞问题,使用户可以就近获得内容,提高用户访问的响应速度。Specifically, CDN publishes content to the "edge" of the network closest to the user by superimposing a new network architecture on the Internet. Without CDN, all users who want to watch the content of the content provider must visit the content provider, which is likely to cause congestion at the content provider and deteriorate network performance. In order to solve network congestion, CDN is superimposed on the Internet, that is, the content provider copies its content to each service node, so that users do not have to crowd to the content provider to access, but visit the relatively close service node. The service node stores the various caches of the content stored by the content provider, and the service node plays the content to the user from each cache. In this way, by superimposing CDN on the Internet, the network congestion problem is solved, allowing users to obtain content nearby and improving the response speed of user access.
随着网络业务的发展,CDN所提供的业务已经由单纯的静态 Web(网络)网页发展为视频点播、直播、网络电视(Internet Protocol Television,IPTV)、应用加速等综合业务。融合多业务,要求CDN高效并具备高安全性,同时还要求路由系统能够基于内容、流量、节点状态等多纬度信息完成用户访问调度,这些对CDN技术提出了新挑战。With the development of network services, the services provided by CDN have evolved from simple static Web pages to comprehensive services such as video on demand, live broadcast, Internet Protocol Television (IPTV), and application acceleration. The integration of multiple services requires CDN to be efficient and highly secure, and also requires the routing system to be able to complete user access scheduling based on multi-dimensional information such as content, traffic, and node status, which poses new challenges to CDN technology.
与网页加速不同,新兴的流媒体和下载等业务,具备与网页加速完全不同的特征:单位时间内用户链接量有限、单链接持续的时间较长、访问流量很大。也就是说这些新兴业务需要精确的内容定位和流量调度能力。Unlike web acceleration, emerging streaming media and download services have completely different characteristics from web acceleration: limited user connections per unit time, long duration of a single connection, and large access traffic. In other words, these emerging services require precise content positioning and traffic scheduling capabilities.
发明内容Summary of the invention
本公开实施例提供了一种客户端,包括业务模块、第一域名生成模块和域名系统模块。其中,所述业务模块用于向所述第一域名生成模块发送域名更替请求,所述域名更替请求包括目标统一资源定位符。所述第一域名生成模块用于接收所述域名更替请求,并基于所述目标统一资源定位符中的所述目标资源路径和所述目标源域名,获得与所述目标资源路径唯一对应的目标更替域名;向所述业务模块返回所述目标更替域名。所述业务模块还用于接收所述目标更替域名,生成包括所述目标更替域名的域名解析请求;将所述域名解析请求发送至所述域名系统模块。所述域名系统模块用于接收所述域名解析请求,并向本地域名系统发送所述域名解析请求;接收所述本地域名系统响应所述域名解析请求返回的目标业务地址;向所述业务模块发送所述目标业务地址。所述业务模块还用于接收所述目标业务地址,向所述目标业务地址对应的目标业务节点进行内容访问。The embodiment of the present disclosure provides a client, including a business module, a first domain name generation module and a domain name system module. The business module is used to send a domain name replacement request to the first domain name generation module, and the domain name replacement request includes a target uniform resource locator. The first domain name generation module is used to receive the domain name replacement request, and based on the target resource path and the target source domain name in the target uniform resource locator, obtain a target replacement domain name uniquely corresponding to the target resource path; and return the target replacement domain name to the business module. The business module is also used to receive the target replacement domain name, generate a domain name resolution request including the target replacement domain name; and send the domain name resolution request to the domain name system module. The domain name system module is used to receive the domain name resolution request, and send the domain name resolution request to the local domain name system; receive the target business address returned by the local domain name system in response to the domain name resolution request; and send the target business address to the business module. The business module is also used to receive the target business address and perform content access to the target business node corresponding to the target business address.
本公开实施例提供了一种调度系统,包括调度索引更新模块和第二域名生成模块。其中,所述调度索引更新模块用于获得源索引及其对应的业务地址,所述源索引包括源域名及其对应的统一资源定位符中的资源路径;向所述第二域名生成模块发送更替域名生成请求,所述更替域名生成请求包括所述源索引。所述第二域名生成模块用于接收所述更替域名生成请求,并基于其中的所述资源路径,获得与所述资源路径唯一对应的更替域名;向所述调度索引更新模块返回所述更替域名。所述调度索引更新模块还用于接收所述更替域名,采用所述更替域名作为所述源索引的更替索引。An embodiment of the present disclosure provides a scheduling system, including a scheduling index update module and a second domain name generation module. The scheduling index update module is used to obtain a source index and its corresponding business address, the source index including a source domain name and its corresponding resource path in a uniform resource locator; send a replacement domain name generation request to the second domain name generation module, the replacement domain name generation request including the source index. The second domain name generation module is used to receive the replacement domain name generation request, and based on the resource path therein, obtain a replacement domain name uniquely corresponding to the resource path; return the replacement domain name to the scheduling index update module. The scheduling index update module is also used to receive the replacement domain name, and use the replacement domain name as the replacement index of the source index.
本公开实施例提供了一种调度系统,包括:调度决策模块,用于生成更替索引,并确定所述更替索引对应的业务地址,所述更替索引包括源域名和标识信息,所述标识信息与统一资源定位符中的资源路径一一对应;域名系统解析数据库,用于关联存储所述更替索引及其对应的业务地址;所述域名系统解析数据库,还用于从权威域名系统接收包括目标更替域名的域名解析请求;响应所述域名解析请求,查找与所述目标更替域名匹配的更替索引;将匹配的更替索引对应的业务地址作为目标业务地址,返回至所述权威域名系统。The embodiment of the present disclosure provides a scheduling system, including: a scheduling decision module, used to generate an alternative index and determine the business address corresponding to the alternative index, wherein the alternative index includes a source domain name and identification information, and the identification information corresponds one-to-one to a resource path in a uniform resource locator; a domain name system resolution database, used to associate and store the alternative index and its corresponding business address; the domain name system resolution database is also used to receive a domain name resolution request including a target alternative domain name from an authoritative domain name system; respond to the domain name resolution request, and search for an alternative index that matches the target alternative domain name; and return the business address corresponding to the matched alternative index as the target business address to the authoritative domain name system.
本公开实施例提供了一种调度方法,该方法包括:发送域名解析请求,所述域名解析请求中包括目标更替域名,所述目标更替域名包括目标源域名和目标标识信息,所述目标标识信息与目标统一资源定位符中的目标资源路径之间具有一一映射关系;接收响应所述域名解析请求返回的目标业务地址,所述目标业务地址与所述目标更替域名之间具有对应关系;向所述目标业务地址对应的目标业务节点进行内容访问。An embodiment of the present disclosure provides a scheduling method, which includes: sending a domain name resolution request, the domain name resolution request includes a target replacement domain name, the target replacement domain name includes a target source domain name and target identification information, and there is a one-to-one mapping relationship between the target identification information and the target resource path in the target uniform resource locator; receiving a target business address returned in response to the domain name resolution request, there is a corresponding relationship between the target business address and the target replacement domain name; and performing content access to a target business node corresponding to the target business address.
本公开实施例提供了一种调度方法,该方法包括:接收域名解析请求,所述域名解析请求中包括目标更替域名,所述目标更替域名包括目标源域名和目标标识信息,所述目标标识信息与目标统一资源定位符中的目标资源路径之间具有一一映射关系;获得与所述目标更替域名对应的目标业务地址;响应所述域名解析请求,发送所述目标业务地址。An embodiment of the present disclosure provides a scheduling method, which includes: receiving a domain name resolution request, the domain name resolution request includes a target replacement domain name, the target replacement domain name includes a target source domain name and target identification information, and there is a one-to-one mapping relationship between the target identification information and the target resource path in the target uniform resource locator; obtaining a target business address corresponding to the target replacement domain name; and responding to the domain name resolution request and sending the target business address.
本公开实施例提供了一种调度装置,该调度装置包括:第一发送单元,用于发送域名解析请求,所述域名解析请求中包括目标更替域名,所述目标更替域名包括目标源域名和目标标识信息,所述目标标识信息与目标统一资源定位符中的目标资源路径之间具有一一映射关系;第一接收单元,用于接收响应所述域名解析请求返回的目标业务地址,所述目标业务地址与所述目标更替域名之间具有对应关系;所述第一发送单元,还用于向所述目标业务地址对应的目标业务节点进行内容访问。An embodiment of the present disclosure provides a scheduling device, which includes: a first sending unit, used to send a domain name resolution request, the domain name resolution request includes a target replacement domain name, the target replacement domain name includes a target source domain name and target identification information, and there is a one-to-one mapping relationship between the target identification information and the target resource path in the target uniform resource locator; a first receiving unit, used to receive a target business address returned in response to the domain name resolution request, there is a corresponding relationship between the target business address and the target replacement domain name; the first sending unit is also used to perform content access to a target business node corresponding to the target business address.
本公开实施例提供了一种调度装置,该调度装置包括:第二接收单元,用于接收域名解析请求,所述域名解析请求中包括目标更替域名,所述目标更替域名包括目标源域名和目标标识信息,所述目标标识信息与目标统一资源定位符中的目标资源路径之间具有一一映射关系;第二处理单元,用于获得与所述目标更替域名对应的目标业务地址;第二发送单元,用于响应所述域名解析请求,发送所述目标业务地址。An embodiment of the present disclosure provides a scheduling device, which includes: a second receiving unit, used to receive a domain name resolution request, the domain name resolution request includes a target replacement domain name, the target replacement domain name includes a target source domain name and target identification information, and there is a one-to-one mapping relationship between the target identification information and the target resource path in the target uniform resource locator; a second processing unit, used to obtain a target business address corresponding to the target replacement domain name; a second sending unit, used to respond to the domain name resolution request and send the target business address.
本公开实施例提供了一种电子设备,该电子设备包括:处理器;以及存储器,用于存储所述处理器的可执行指令。其中,所述处理器配置为经由执行所述可执行指令来执行本公开任一实施例中的方法。An embodiment of the present disclosure provides an electronic device, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor, wherein the processor is configured to execute the method in any embodiment of the present disclosure by executing the executable instructions.
本公开实施例提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本公开任一实施例中的方法。An embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method in any embodiment of the present disclosure is implemented.
本公开实施例提供了一种计算机程序产品,包括计算机程序,当该计算机程序被运行时执行本公开任一实施例中的方法。An embodiment of the present disclosure provides a computer program product, including a computer program. When the computer program is executed, the method in any embodiment of the present disclosure is executed.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1示出本公开实施例中一种系统的结构示意图。FIG1 is a schematic diagram showing the structure of a system in an embodiment of the present disclosure.
图2示出本公开实施例中一种本地域名系统递归及转发过程的示意图。FIG. 2 is a schematic diagram showing a local domain name system recursion and forwarding process in an embodiment of the present disclosure.
图3示出本公开实施例中一种域名系统和重定向二次调度到最终业务节点或业务服务器的示意图。FIG3 shows a schematic diagram of a domain name system and redirection of secondary scheduling to a final service node or service server in an embodiment of the present disclosure.
图4示出本公开实施例中又一种系统的结构示意图。FIG. 4 shows a schematic diagram of the structure of yet another system in an embodiment of the present disclosure.
图5示出本公开实施例中一种调度方法的流程图。FIG5 shows a flow chart of a scheduling method in an embodiment of the present disclosure.
图6示出本公开实施例中一种应用于客户端的调度方法的示意图。FIG6 is a schematic diagram showing a scheduling method applied to a client in an embodiment of the present disclosure.
图7示出本公开实施例中另一种调度方法的流程图。FIG. 7 shows a flow chart of another scheduling method in an embodiment of the present disclosure.
图8示出本公开实施例中一种应用于调度系统的调度方法的示意图。FIG8 is a schematic diagram showing a scheduling method applied to a scheduling system in an embodiment of the present disclosure.
图9示出本公开实施例中一种调度装置的结构框图。FIG. 9 shows a structural block diagram of a scheduling device in an embodiment of the present disclosure.
图10示出本公开实施例中另一种调度装置的结构框图。FIG. 10 shows a structural block diagram of another scheduling device in an embodiment of the present disclosure.
图11示出本公开实施例中一种电子设备的结构框图。FIG. 11 shows a structural block diagram of an electronic device in an embodiment of the present disclosure.
具体实施方式DETAILED DESCRIPTION
首先,对本公开实施例中涉及的部分术语和概念进行解释说明。First, some terms and concepts involved in the embodiments of the present disclosure are explained.
域名系统(Domain Name System,DNS):是一种将域名和IP(Internet Protocol,网际互联协议)地址相互映射的联机分布式数据库,便于用户实现对互联网的访问。域名系统是因特网使用的命名系统,用来把便于用户使用的域名(主机名/机器名字)转换成为IP地址。由于IP地址难以记忆,域名系统允许用户使用易于记忆的主机名来访问互联网上的资源。Domain Name System (DNS): is an online distributed database that maps domain names and IP (Internet Protocol) addresses to facilitate users' access to the Internet. The Domain Name System is a naming system used by the Internet to convert user-friendly domain names (host names/machine names) into IP addresses. Since IP addresses are difficult to remember, the Domain Name System allows users to use easy-to-remember host names to access resources on the Internet.
LocalDNS:本地DNS,一般是运营商的DNS,主要作用是代理用户进行迭代解析。例如,当用户输入一个域名时,LocalDNS首先查询本地缓存中是否存在该域名的IP地址。如果存在,则直接返回;如果不存在,则向根域名服务器发起查询请求。根域名服务器将指示LocalDNS查询顶级域名服务器,依次进行迭代查询,直到找到负责所查询域名的权威域名服务器。最后,将查询结果(即该域名对应的IP地址)返回给LocalDNS,LocalDNS将查询结果存入缓存,并将结果返回给用户。LocalDNS: Local DNS, usually the DNS of the operator, is mainly used to perform iterative resolution on behalf of users. For example, when a user enters a domain name, LocalDNS first queries whether the IP address of the domain name exists in the local cache. If it exists, it will be returned directly; if it does not exist, a query request will be initiated to the root domain name server. The root domain name server will instruct LocalDNS to query the top-level domain name server, and perform iterative queries in turn until the authoritative domain name server responsible for the queried domain name is found. Finally, the query result (that is, the IP address corresponding to the domain name) is returned to LocalDNS, which stores the query result in the cache and returns the result to the user.
权威DNS(Authorizative DNS):也叫授权DNS。负责一个“域”的域名服务器,保存该区中的所有主机到域名IP地址的映射。例如:负责XXX.com解析的域名服务器。Authorizative DNS: Also called authoritative DNS. A domain name server responsible for a "domain" that stores the mappings of all hosts in the zone to domain name IP addresses. For example: a domain name server responsible for resolving XXX.com.
EDNS:DNS Extensions,即DNS扩展。EDNS: DNS Extensions, that is, DNS extension.
ECS(EDNS client subnet):DNS协议扩展之一,ECS是EDNS的一个选项。ECS是一种DNS扩展协议。递归DNS(LocalDNS可以是递归DNS的一个实例)通过ECS把用户IP子网段(即客户端的子网信息)传送给权威DNS,权威DNS可根据用户IP,选择离用户最近的IP作为解析结果/查询结果返回。当客户端发起DNS查询时,如果支持ECS,会在查询请求中添加一个OPT(选项)记录,该记录包含客户端的子网信息(如IP地址和子网掩码)。LocalDNS在接收到查询请求后,会检查是否包含ECS信息。如果包含,LocalDNS会将该信息转发给权威DNS。权威DNS如果支持ECS解析,则根据接收到的ECS信息,结合自身的解析策略和缓存数据,返回更精确的解析结果给LocalDNS。LocalDNS将解析结果返回给客户端。ECS (EDNS client subnet): One of the DNS protocol extensions, ECS is an option of EDNS. ECS is a DNS extension protocol. Recursive DNS (LocalDNS can be an instance of recursive DNS) transmits the user IP subnet segment (i.e., the client's subnet information) to the authoritative DNS through ECS. The authoritative DNS can select the IP closest to the user as the resolution result/query result based on the user's IP and return it. When the client initiates a DNS query, if ECS is supported, an OPT (option) record will be added to the query request, which contains the client's subnet information (such as IP address and subnet mask). After receiving the query request, LocalDNS will check whether it contains ECS information. If it does, LocalDNS will forward the information to the authoritative DNS. If the authoritative DNS supports ECS resolution, it will return a more accurate resolution result to LocalDNS based on the received ECS information, combined with its own resolution strategy and cached data. LocalDNS returns the resolution result to the client.
GSLB(Global Service Load Balancing):全局负载均衡,也称全局调度。GSLB 是CDN的重要模块,负责把用户请求调度到距离用户最近的边缘节点、或者按调度策略调度到最合适的节点。全局调度可以采用DNS协议。GSLB (Global Service Load Balancing): Global load balancing, also known as global scheduling. GSLB is an important module of CDN, responsible for scheduling user requests to the edge node closest to the user, or scheduling to the most suitable node according to the scheduling policy. Global scheduling can use the DNS protocol.
URL(Uniform Resource Locator):统一资源定位符,是互联网上用于标识某一处资源的地址,使得互联网上的资源(如网页、图片、视频、文件等)能够被唯一地定位和访问。URL包含协议(协议类型/协议名)、服务器名称(或IP地址)、路径(资源路径)。在一些实施例中,资源路径可以包括文件的文件名,且可以是资源路径中的最后一个参数。在另一些实施例中,资源路径可以没有文件的文件名。可选的,URL还可包括端口号、查询标识信息,片段标识符。其中,服务器名称也可称为主机名。协议类型指定了访问资源所使用的协议,如HTTP(Hypertext Transfer Protocol,超文本传输协议)、HTTPS(Hypertext TransferProtocol Secure,超文本传输安全协议)、FTP(File Transfer Protocol,文件传输协议)等。服务器名称指定了资源所在的服务器的主机名或IP地址。路径指定了服务器上资源的具体位置。它可以是目录路径或文件路径。路径部分可以包含多个目录和文件名,它们之间用斜杠(/)分隔。URL (Uniform Resource Locator): Uniform Resource Locator is an address used to identify a resource on the Internet, so that resources on the Internet (such as web pages, pictures, videos, files, etc.) can be uniquely located and accessed. URL contains protocol (protocol type/protocol name), server name (or IP address), and path (resource path). In some embodiments, the resource path may include the file name of the file and may be the last parameter in the resource path. In other embodiments, the resource path may not have the file name of the file. Optionally, the URL may also include a port number, query identification information, and a fragment identifier. Among them, the server name may also be called a host name. The protocol type specifies the protocol used to access the resource, such as HTTP (Hypertext Transfer Protocol), HTTPS (Hypertext TransferProtocol Secure), FTP (File Transfer Protocol), etc. The server name specifies the host name or IP address of the server where the resource is located. The path specifies the specific location of the resource on the server. It can be a directory path or a file path. The path part can contain multiple directories and file names, which are separated by slashes (/).
在本公开实施例中,URL中的服务器名称(或IP地址)可以是域名或者用于确定与之对应的域名。该域名相比转换之后新生成的更替域名,为了区分,也可称之为源域名或原域名。对应的,该更替域名也可称之为新域名。In the embodiments of the present disclosure, the server name (or IP address) in the URL may be a domain name or a domain name used to determine the domain name corresponding thereto. The domain name may also be referred to as the source domain name or the original domain name for the purpose of distinguishing the domain name from the replacement domain name generated after the conversion. Correspondingly, the replacement domain name may also be referred to as the new domain name.
URL示例:http://test.com:8080/example/index.html。在这个示例中:协议类型是HTTP。主机名是test.com。端口号是8080。路径是/example。文件名是index.html。URL example: http://test.com:8080/example/index.html. In this example: The protocol type is HTTP. The host name is test.com. The port number is 8080. The path is /example. The file name is index.html.
内容调度(也叫URL调度):和DNS域名调度不同,DNS域名调度基于域名调度,同一域名下的所有URL使用相同的调度策略。内容调度是更精细化的调度,基于URL调度,同一域名下的每个URL调度策略不一定相同。Content scheduling (also called URL scheduling): Different from DNS domain name scheduling, DNS domain name scheduling is based on domain name scheduling, and all URLs under the same domain name use the same scheduling strategy. Content scheduling is a more refined scheduling based on URL scheduling, and the scheduling strategy of each URL under the same domain name may not be the same.
调度决策数据:CDN调度系统根据各种调度策略计算出各种调度决策数据,CDN权威DNS的解析响应(例如响应IP)、重定向调度的重定向IP均来自调度决策数据。Scheduling decision data: The CDN scheduling system calculates various scheduling decision data based on various scheduling strategies. The resolution response (such as the response IP) of the CDN authoritative DNS and the redirection IP of the redirection scheduling all come from the scheduling decision data.
本公开实施例提供的方案可以应用于云计算领域和新兴信息技术。下面结合附图,对本公开实施例的具体实施方式进行详细说明。The solution provided by the embodiment of the present disclosure can be applied to the field of cloud computing and emerging information technology. The specific implementation of the embodiment of the present disclosure is described in detail below in conjunction with the accompanying drawings.
图1示出本公开实施例中一种系统的结构示意图。在图1所示的系统中,用户通过终端10上安装的客户端(例如浏览器),并经由网络访问服务器20提供的服务。Fig. 1 is a schematic diagram showing the structure of a system in an embodiment of the present disclosure. In the system shown in Fig. 1 , a user accesses services provided by a server 20 via a network through a client (eg, a browser) installed on a terminal 10 .
终端10也可以称为终端设备、用户设备、移动台、移动终端等。终端可以广泛应用于各种场景,例如,设备到设备(device-to-device,D2D)、车物(vehicle to everything,V2X)通信、机器类通信(machine-type communication,MTC)、物联网(internet ofthings,IOT)、虚拟现实、增强现实、工业控制、自动驾驶、远程医疗、智能电网、智能家具、智能办公、智能穿戴、智能交通、智慧城市等。终端可以是手机、平板电脑、带无线收发功能的电脑、可穿戴设备、车辆、无人机、直升机、飞机、轮船、机器人、机械臂、智能家居设备等。本公开的实施例对终端所采用的具体技术和具体设备形态不做限定。The terminal 10 may also be referred to as a terminal device, a user device, a mobile station, a mobile terminal, etc. The terminal can be widely used in various scenarios, for example, device-to-device (D2D), vehicle to everything (V2X) communication, machine-type communication (MTC), Internet of Things (IOT), virtual reality, augmented reality, industrial control, autonomous driving, telemedicine, smart grid, smart furniture, smart office, smart wear, smart transportation, smart city, etc. The terminal may be a mobile phone, a tablet computer, a computer with wireless transceiver function, a wearable device, a vehicle, a drone, a helicopter, an airplane, a ship, a robot, a robotic arm, a smart home device, etc. The embodiments of the present disclosure do not limit the specific technology and specific device form adopted by the terminal.
本领域技术人员可以知晓,图1中的终端和服务器的数量仅仅是示意性的,根据实际需要,可以具有任意数目的终端、服务器。本公开实施例对此不作限定。Those skilled in the art will appreciate that the number of terminals and servers in FIG1 is merely illustrative, and any number of terminals and servers may be provided according to actual needs, which is not limited in the embodiments of the present disclosure.
在上述系统架构下,本公开实施例中提供了一种调度方法,该方法可以由任意具备信息处理能力的电子设备执行。在一些实施例中,本公开实施例中提供的调度方法可以由上述系统架构的终端执行;在另一些实施例中,本公开实施例中提供的调度方法可以由上述系统架构中的服务器来实现。在又一些实施例中,本公开实施例中提供的调度方法可以由上述系统架构中的终端和服务器通过交互的方式来实现。Under the above system architecture, a scheduling method is provided in the embodiments of the present disclosure, and the method can be executed by any electronic device with information processing capabilities. In some embodiments, the scheduling method provided in the embodiments of the present disclosure can be executed by a terminal of the above system architecture; in other embodiments, the scheduling method provided in the embodiments of the present disclosure can be implemented by a server in the above system architecture. In some other embodiments, the scheduling method provided in the embodiments of the present disclosure can be implemented by the terminal and the server in the above system architecture through interaction.
CDN调度包括基于DNS的域名调度(也称为DNS域名调度)和应用层重定向调度(如HTTP 302技术)。其中,HTTP 302是HTTP协议中的一个状态码,代表“临时重定向”(Temporary Redirect)。CDN scheduling includes DNS-based domain name scheduling (also known as DNS domain name scheduling) and application layer redirection scheduling (such as HTTP 302 technology). Among them, HTTP 302 is a status code in the HTTP protocol, which stands for "temporary redirect".
过去,网页加速是CDN主要业务,基于DNS的路由技术被广泛采用在该类CDN网络。基于DNS方式地CDN网络包括GSLB层,其中有DNS-GSLB,即DNS方式的GSLB,对下面的各业务节点或服务器进行调度,当接收到客户端的请求时,为该请求向客户端分配一个就近的 业务节点或服务器。In the past, web acceleration was the main business of CDN, and DNS-based routing technology was widely used in this type of CDN network. DNS-based CDN networks include a GSLB layer, including DNS-GSLB, that is, DNS-based GSLB, which schedules the following business nodes or servers. When receiving a client request, it allocates a nearby business node or server to the client for the request.
DNS调度(即DNS域名调度)只能提供基于域名的调度,对一般的业务是可以满足要求的。但有些客户或业务,要求针对不同内容提供差异化服务,需要针对每个内容提供不同调度方式/调度策略。由于DNS只能获取到域名,对URL路径不能获取到,所以DNS调度不能做到基于URL的内容调度,需要增加应用层的二次重定向调度。DNS scheduling (i.e. DNS domain name scheduling) can only provide scheduling based on domain names, which can meet the requirements of general businesses. However, some customers or businesses require differentiated services for different contents, and need to provide different scheduling methods/scheduling strategies for each content. Since DNS can only obtain domain names but not URL paths, DNS scheduling cannot achieve content scheduling based on URLs, and it is necessary to add secondary redirection scheduling at the application layer.
应用层重定向与DNS-GSLB的区别是,DNS-GSLB仅解析域名,因而不具备精确的定位能力,而应用层重定向依据的是整个URL,因而具有精确的定位能力,可以做到更准确的调度分析,例如可以适合于流媒体业务。The difference between application layer redirection and DNS-GSLB is that DNS-GSLB only resolves domain names and therefore does not have precise positioning capabilities, while application layer redirection is based on the entire URL and therefore has precise positioning capabilities, allowing for more accurate scheduling analysis, such as being suitable for streaming media services.
图2示出本公开实施例中一种本地域名系统递归及转发过程的示意图。如图2所示,本公开实施例提供的内容调度过程包括以下步骤。Fig. 2 is a schematic diagram of a local domain name system recursion and forwarding process in an embodiment of the present disclosure. As shown in Fig. 2, the content scheduling process provided by the embodiment of the present disclosure includes the following steps.
在S21中,用户/客户访问互联网内容,向LocalDNS发起域名解析请求,以请求域名解析。该域名解析请求中携带待解析的域名。In S21, a user/client accesses Internet content and initiates a domain name resolution request to LocalDNS to request domain name resolution. The domain name resolution request carries the domain name to be resolved.
在S22中,LocalDNS经过DNS递归迭代,向CDN全局调度系统(即GSLB)的权威DNS发起域名解析请求。In S22, LocalDNS initiates a domain name resolution request to the authoritative DNS of the CDN global scheduling system (i.e., GSLB) after DNS recursive iteration.
然后,权威DNS和调度系统实现解析数据(包括各域名与对应的IP地址之间的映射关系)同步,将同步后的解析数据存储到解析数据库中。权威DNS查询该解析数据库,获得用于响应该域名解析请求的响应IP或域名解析IP(即与待解析的域名对应的IP地址)。Then, the authoritative DNS and the dispatch system synchronize the resolution data (including the mapping relationship between each domain name and the corresponding IP address) and store the synchronized resolution data in the resolution database. The authoritative DNS queries the resolution database to obtain the response IP or domain name resolution IP (i.e., the IP address corresponding to the domain name to be resolved) for responding to the domain name resolution request.
在S24中,权威DNS将该响应IP返回至LocalDNS。In S24, the authoritative DNS returns the response IP to LocalDNS.
在S25中,LocalDNS发送响应IP给用户。In S25, LocalDNS sends the response IP to the user.
在S26中,用户根据域名解析获得的响应IP,向对应的边缘缓存服务(例如业务节点或服务器,这里假设为边缘缓存服务1)发起内容请求或内容访问请求,该内容访问请求携带所请求的URL。In S26, the user initiates a content request or a content access request to the corresponding edge cache service (eg, a business node or server, here assumed to be edge cache service 1) according to the response IP obtained by the domain name resolution. The content access request carries the requested URL.
在S27中,边缘应用层调度模块根据所请求的URL,查询最适合的边缘节点(例如业务节点或服务器,这里假设为边缘缓存服务2)。若查询到的最合适的边缘节点不是本节点(即不是S26中确定的边缘缓存服务1),向用户返回重定向响应。该重定向响应中包括边缘缓存服务2的IP地址。In S27, the edge application layer scheduling module queries the most suitable edge node (such as a business node or server, here it is assumed to be edge cache service 2) according to the requested URL. If the most suitable edge node queried is not the current node (that is, it is not the edge cache service 1 determined in S26), a redirect response is returned to the user. The redirect response includes the IP address of edge cache service 2.
在S28中,用户收到重定向响应之后,向目标边缘服务器(例如边缘缓存服务2)发起内容请求,开始内容访问。In S28, after receiving the redirection response, the user initiates a content request to the target edge server (eg, edge cache service 2) to start content access.
在图3实施例中,该系统包括终端APP、LocalDNS 32、权威DNS 33和调度系统34。终端APP(application,应用)是指终端上安装的APP或客户端31。In the embodiment of Fig. 3, the system includes a terminal APP, a LocalDNS 32, an authoritative DNS 33 and a scheduling system 34. The terminal APP (application) refers to an APP or a client 31 installed on the terminal.
如图3所示,客户端31中包括业务模块311和DNS模块313。权威DNS 33包括域名解析模块331和解析数据库(也可称之为DNS解析数据库)332。调度系统34中包括调度决策模块341。可以理解的是,本公开实施例中的解析数据库可以位于权威DNS中,也可以位于调度系统中,或者独立于权威DNS或调度系统,本公开对此不做限定。As shown in FIG3 , the client 31 includes a service module 311 and a DNS module 313. The authoritative DNS 33 includes a domain name resolution module 331 and a resolution database (also referred to as a DNS resolution database) 332. The scheduling system 34 includes a scheduling decision module 341. It is understood that the resolution database in the embodiment of the present disclosure may be located in the authoritative DNS, in the scheduling system, or independent of the authoritative DNS or the scheduling system, and the present disclosure does not limit this.
该调度决策模块341可以用于生成DNS解析数据344(即上述解析数据,包含在调度决策数据中),并将生成的DNS解析数据同步至解析数据库332中。解析数据库332关联存储解析数据中的域名及其对应的IP地址。The scheduling decision module 341 can be used to generate DNS resolution data 344 (ie, the resolution data mentioned above, included in the scheduling decision data), and synchronize the generated DNS resolution data to the resolution database 332. The resolution database 332 associates and stores the domain name in the resolution data and its corresponding IP address.
业务模块311向DNS模块313发送域名解析请求,该域名解析请求中包括待解析的域名。DNS模块313将该域名解析请求发送至LocalDNS 32。LocalDNS 32将该域名解析请求发送至域名解析模块331。域名解析模块331根据域名解析请求中的域名,查询解析数据库332中的解析数据,获得相应的服务IP作为响应IP。再依次通过LocalDNS 32和DNS模块313将服务IP返回至业务模块311。业务模块311根据该服务IP向业务节点/服务器1发起业务访问/内容访问。The business module 311 sends a domain name resolution request to the DNS module 313, and the domain name resolution request includes the domain name to be resolved. The DNS module 313 sends the domain name resolution request to the LocalDNS 32. The LocalDNS 32 sends the domain name resolution request to the domain name resolution module 331. The domain name resolution module 331 queries the resolution data in the resolution database 332 according to the domain name in the domain name resolution request, and obtains the corresponding service IP as the response IP. Then the service IP is returned to the business module 311 through the LocalDNS 32 and the DNS module 313 in turn. The business module 311 initiates business access/content access to the business node/server 1 according to the service IP.
图3实施例中,调度决策模块341还用于同步URL调度策略至各个业务节点/服务器,即在各个业务节点/服务器中设置了边缘应用层调度模块。由此使得业务节点/服务器1可以重定向该域名对应的URL所对应的IP地址,并将重定向的IP地址返回至业务模块311。业务模块311接收到重定向的IP地址后,向对应的业务节点/服务器,这里假设为业务节点/服务器2发起业务访问。In the embodiment of FIG. 3 , the scheduling decision module 341 is also used to synchronize the URL scheduling strategy to each service node/server, that is, an edge application layer scheduling module is set in each service node/server. As a result, the service node/server 1 can redirect the IP address corresponding to the URL corresponding to the domain name, and return the redirected IP address to the service module 311. After receiving the redirected IP address, the service module 311 initiates service access to the corresponding service node/server, which is assumed to be service node/server 2.
综合上述图2和图3可知,应用层重定向需要经过域名系统和应用层重定向二次调度,才能到最终业务节点或业务服务器。From the above FIG. 2 and FIG. 3 , it can be seen that the application layer redirection needs to be dispatched twice through the domain name system and the application layer redirection before it can reach the final service node or service server.
图3实施例提供的基于URL的内容调度,是通过应用层重定向实现的。由于DNS使用的是UDP(User Datagram Protocol,用户数据报协议)无连接传输,而应用层重定向是基于TCP(Transmission Control Protocol,传输控制协议)协议(如:HTTP、RTSP(Real TimeStreaming Protocol,实时流传输协议)等)传输,需要在用户和服务(例如上述业务节点/服务器)之间建立连接。TCP三次握手耗时较长,通信时间远高于UDP无连接通信。因此,DNS调度加应用层调度的两次调度方式,延时大,这对于对时延敏感的业务,采用应用层重定向的二次调度实现内容调度,会降低用户业务体验。同时,该方式实现复杂,需要在边缘部署应用层调度组件,例如上述边缘应用层调度模块。另外,在招标测试(多厂商招标)中,因应用层二次调度会增加首包、视频首帧时延,从而影响中标。The URL-based content scheduling provided by the embodiment of Figure 3 is achieved through application layer redirection. Since DNS uses UDP (User Datagram Protocol) connectionless transmission, and application layer redirection is based on TCP (Transmission Control Protocol) protocol (such as HTTP, RTSP (Real Time Streaming Protocol, real-time streaming protocol), etc.), it is necessary to establish a connection between the user and the service (such as the above-mentioned business node/server). The TCP three-way handshake takes a long time, and the communication time is much higher than the UDP connectionless communication. Therefore, the two-time scheduling method of DNS scheduling plus application layer scheduling has a large delay. For services that are sensitive to delay, the use of secondary scheduling of application layer redirection to achieve content scheduling will reduce the user service experience. At the same time, this method is complex to implement, and it is necessary to deploy application layer scheduling components at the edge, such as the above-mentioned edge application layer scheduling module. In addition, in the bidding test (multi-vendor bidding), the second scheduling of the application layer will increase the delay of the first packet and the first frame of the video, thereby affecting the winning bid.
图4示出本公开实施例中又一种系统的结构示意图。如图4所示,本公开实施例提供的系统包括客户端41和调度系统44。在用户侧APP(即客户端41)增加域名生成模块(为了区分,也可称之为第一域名生成模块)412,在系统侧调度系统44中增加域名生成模块(为了区分,也可称之为第二域名生成模块)443和调度索引更新模块442两个模块。FIG4 shows a schematic diagram of the structure of another system in an embodiment of the present disclosure. As shown in FIG4, the system provided in an embodiment of the present disclosure includes a client 41 and a scheduling system 44. A domain name generation module (for distinction, it can also be referred to as a first domain name generation module) 412 is added to the user-side APP (i.e., the client 41), and a domain name generation module (for distinction, it can also be referred to as a second domain name generation module) 443 and a scheduling index update module 442 are added to the system-side scheduling system 44.
参考图4,本公开实施例提供了一种客户端41。客户端41包括业务模块411、第一域名生成模块412和域名系统模块(即DNS模块)413。本公开实施例中,DNS模块413使用的是UDP无连接传输,当需要在用户和服务之间建立连接,无需经过三次握手,从而可以减少通信耗时。Referring to FIG4 , the embodiment of the present disclosure provides a client 41. The client 41 includes a service module 411, a first domain name generation module 412, and a domain name system module (i.e., DNS module) 413. In the embodiment of the present disclosure, the DNS module 413 uses UDP connectionless transmission. When a connection needs to be established between a user and a service, there is no need to go through a three-way handshake, thereby reducing communication time.
业务模块411用于向第一域名生成模块412发送域名更替请求。域名更替请求中包括目标统一资源定位符。The service module 411 is used to send a domain name replacement request to the first domain name generation module 412. The domain name replacement request includes a target uniform resource locator.
本公开实施例中,目标统一资源定位符中包括目标资源路径和目标源域名。目标统一资源定位符是指用户当前待请求的URL,其可以是任意URL。例如用户可以向客户端41输入其所请求的URL,客户端41中的业务模块411接收到用户所输入的URL。可以理解的是,目标URL中包括目标源域名可以是该目标URL中直接包括该目标源域名,也可以是通过该目标URL可以获得该目标源域名。In the disclosed embodiment, the target uniform resource locator includes a target resource path and a target source domain name. The target uniform resource locator refers to the URL that the user is currently requesting, which can be any URL. For example, the user can input the URL requested by the client 41, and the business module 411 in the client 41 receives the URL input by the user. It is understandable that the target source domain name included in the target URL can be directly included in the target URL, or the target source domain name can be obtained through the target URL.
第一域名生成模块412用于接收业务模块411发送的域名更替请求,并基于该目标统一资源定位符中的目标资源路径和目标源域名,获得与目标资源路径唯一对应的目标更替域名。第一域名生成模块412用于向业务模块411返回目标更替域名。The first domain name generation module 412 is used to receive the domain name replacement request sent by the business module 411, and obtain a target replacement domain name uniquely corresponding to the target resource path based on the target resource path and the target source domain name in the target uniform resource locator. The first domain name generation module 412 is used to return the target replacement domain name to the business module 411.
在示例性实施例中,在接收到该域名更替请求之后,第一域名生成模块412用于提取目标统一资源定位符中的目标资源路径和目标源域名;对目标资源路径进行转换,获得与目标资源路径唯一对应的目标标识信息;组合目标标识信息和目标源域名,获得目标更替域名。In an exemplary embodiment, after receiving the domain name change request, the first domain name generation module 412 is used to extract the target resource path and the target source domain name in the target uniform resource locator; convert the target resource path to obtain target identification information that uniquely corresponds to the target resource path; and combine the target identification information and the target source domain name to obtain the target replacement domain name.
在一些实施例中,业务模块411可以将目标URL中的目标资源路径发送至第一域名生成模块412,第一域名生成模块412将目标资源路径对应的目标标识信息返回至业务模块411,以组合目标源域名生成目标更替域名。在另一些实施例中,业务模块411可以将目标URL发送至第一域名生成模块412,第一域名生成模块412提取其中的目标资源路径和目标源域名,以生成与目标资源路径对应的目标标识信息,并组合目标源域名和目标标识信息生成目标更替域名,并将目标更替域名返回至业务模块411。In some embodiments, the business module 411 may send the target resource path in the target URL to the first domain name generation module 412, and the first domain name generation module 412 returns the target identification information corresponding to the target resource path to the business module 411 to combine the target source domain name to generate the target replacement domain name. In other embodiments, the business module 411 may send the target URL to the first domain name generation module 412, and the first domain name generation module 412 extracts the target resource path and the target source domain name therein to generate the target identification information corresponding to the target resource path, and combines the target source domain name and the target identification information to generate the target replacement domain name, and returns the target replacement domain name to the business module 411.
本公开实施例中,目标资源路径与目标标识信息之间具有一一对应关系,目标更替域名是由该具有唯一性对应关系的目标标识信息生成的,该目标资源路径指示了目标URL所对应的资源所在的位置信息,由此使得目标URL和目标更替域名之间具有唯一的对应关系,即实现了一个目标URL对应唯一的一个目标更替域名。因此,当使用该目标更替域名来进行域名解析时,可以实现针对同一源域名下的不同URL提供不同的调度策略,即实现内容调度。In the disclosed embodiment, there is a one-to-one correspondence between the target resource path and the target identification information, and the target replacement domain name is generated by the target identification information with a unique correspondence. The target resource path indicates the location information of the resource corresponding to the target URL, thereby making the target URL and the target replacement domain name have a unique correspondence, that is, a target URL corresponds to a unique target replacement domain name. Therefore, when the target replacement domain name is used for domain name resolution, different scheduling strategies can be provided for different URLs under the same source domain name, that is, content scheduling can be achieved.
本公开实施例中,标识信息是指对URL中的资源路径进行转换后,获得的与该资源路径一一对应的信息。该标识信息的表现形式和组成结构本公开不做限定,例如可以由数字、字母、符号等中的至少一项组成。下面以标识信息为字符串举例说明,但本公开并不限定于此。目标标识信息是指与目标资源路径对应的标识信息。In the embodiments of the present disclosure, identification information refers to information corresponding to the resource path after converting the resource path in the URL. The present disclosure does not limit the form and composition structure of the identification information, for example, it can be composed of at least one of numbers, letters, symbols, etc. The following example uses the identification information as a string, but the present disclosure is not limited to this. The target identification information refers to the identification information corresponding to the target resource path.
本公开实施例中,更替域名是指对源域名进行转换之后生成的新域名。源域名是指进行转换之前的域名。因此,在下面的实施例中,有时候也将更替域名称之为新域名,将源域名称之原域名或旧域名。目标更替域名是指与当前待请求的URL对应的新域名。In the disclosed embodiment, the replacement domain name refers to a new domain name generated after converting the source domain name. The source domain name refers to the domain name before the conversion. Therefore, in the following embodiments, the replacement domain name is sometimes referred to as a new domain name, and the original domain name or old domain name of the source domain name is used. The target replacement domain name refers to the new domain name corresponding to the URL currently to be requested.
业务模块411还用于接收目标更替域名,生成包括目标更替域名的域名解析请求。业务模块411还用于将包括目标更替域名的域名解析请求发送至DNS模块413。The service module 411 is further configured to receive the target replacement domain name, generate a domain name resolution request including the target replacement domain name, and send the domain name resolution request including the target replacement domain name to the DNS module 413 .
DNS模块413用于接收业务模块411发送的包括目标更替域名的域名解析请求,并向本地域名系统(即LocalDNS 42)发送包括目标更替域名的域名解析请求。LocalDNS 42将接收到的包括目标更替域名的域名解析请求发送至权威DNS 43,权威DNS 43响应该域名解析请求,获得与该目标更替域名对应的目标业务地址,然后将该目标业务地址作为服务IP,返回至LocalDNS 42。LocalDNS 42再将接收到的服务IP返回至DNS模块413。DNS模块413用于接收LocalDNS 42响应域名解析请求返回的目标业务地址;向业务模块411发送目标业务地址。The DNS module 413 is used to receive a domain name resolution request including a target replacement domain name sent by the business module 411, and send a domain name resolution request including a target replacement domain name to the local domain name system (i.e., LocalDNS 42). LocalDNS 42 sends the received domain name resolution request including a target replacement domain name to the authoritative DNS 43. The authoritative DNS 43 responds to the domain name resolution request, obtains a target business address corresponding to the target replacement domain name, and then returns the target business address as a service IP to LocalDNS 42. LocalDNS 42 then returns the received service IP to the DNS module 413. The DNS module 413 is used to receive the target business address returned by LocalDNS 42 in response to the domain name resolution request; and send the target business address to the business module 411.
业务模块411还用于接收DNS模块413返回的目标业务地址,向目标业务地址对应的目标业务节点(这里假设目标业务地址对应的业务节点/服务器45)进行内容访问或业务访问。需要说明的是,本公开实施例中,业务模块411接收到DNS模块413返回的目标业务地址之后,直接基于该目标业务地址向该目标业务地址对应的目标业务节点发起内容访问,即不需要再进行应用层的二次重定向即可实现内容调度。在一些实施例中,业务模块411向该目标业务节点发送内容访问请求,以进行内容访问。在另一些实施例中,业务模块411直接向目标业务节点进行内容访问,不需要发送内容访问请求。The business module 411 is also used to receive the target business address returned by the DNS module 413, and perform content access or business access to the target business node corresponding to the target business address (here it is assumed that the business node/server 45 corresponding to the target business address) . It should be noted that in the embodiment of the present disclosure, after the business module 411 receives the target business address returned by the DNS module 413, it directly initiates content access to the target business node corresponding to the target business address based on the target business address, that is, content scheduling can be achieved without the need for secondary redirection of the application layer. In some embodiments, the business module 411 sends a content access request to the target business node to perform content access. In other embodiments, the business module 411 directly performs content access to the target business node without sending a content access request.
在示例性实施例中,第一域名生成模块412还用于:采用预定长度的散列函数对所述目标资源路径进行处理,获得所述预定长度的目标字符串,以生成所述目标标识信息;组合所述目标标识信息和所述目标源域名,获得所述目标更替域名。In an exemplary embodiment, the first domain name generation module 412 is also used to: process the target resource path using a hash function of a predetermined length to obtain a target string of the predetermined length to generate the target identification information; and combine the target identification information and the target source domain name to obtain the target replacement domain name.
本公开实施例中,该预定长度的散列函数可以根据实际需求选择,例如预定长度为256,所选择的散列函数为SHA256(Secure Hash Algorithm 256,一种散列函数)。In the embodiment of the present disclosure, the hash function of the predetermined length can be selected according to actual needs. For example, when the predetermined length is 256, the selected hash function is SHA256 (Secure Hash Algorithm 256, a hash function).
SHA256是一种安全散列算法,用于将任意长度的数据转换为固定长度/预定长度(256位,即32字节)的散列值(哈希值),这些散列值或哈希值是字符串。SHA256具有很强的抗碰撞性,即找到两个不同的输入但产生相同散列值的情况极其困难。这种特性确保了哈希值的唯一性,防止了哈希值的伪造和篡改。SHA256是一种确定性的哈希函数,即相同的输入总是产生相同的输出。这种确定性确保了哈希值的一致性和可重复性。SHA256 is a secure hash algorithm used to convert data of arbitrary length into hash values (hash values) of fixed/predetermined length (256 bits, i.e. 32 bytes), which are strings. SHA256 has strong collision resistance, i.e. it is extremely difficult to find two different inputs that produce the same hash value. This property ensures the uniqueness of the hash value and prevents the forgery and tampering of the hash value. SHA256 is a deterministic hash function, i.e. the same input always produces the same output. This determinism ensures the consistency and repeatability of the hash value.
可以理解的是,除了SHA256算法外,采用其它不易产生碰撞的hash(哈希)算法也在本公开保护范围内。例如:SHA224、SHA338、SHA512等。下面均以SHA256举例说明,但本公开并不限定于此。It is understandable that, in addition to the SHA256 algorithm, other hash algorithms that are less likely to cause collisions are also within the scope of protection of the present disclosure, such as SHA224, SHA338, SHA512, etc. SHA256 is used as an example below, but the present disclosure is not limited thereto.
在一些实施例中,可以直接将生成的预定长度的目标字符串作为目标标识信息,以下均以这种方式举例说明,但本公开并不限定于此。在其它实施例中,还可以对生成的目标字符串进行转换,以获得该目标标识信息,例如在目标字符串之前填充预设位数的常数或字符,以使其长度满足预设要求等。即本公开中只要能够实现对URL中的资源路径进行转换,获得唯一的、确定的标识信息即可。In some embodiments, the generated target string of predetermined length can be directly used as the target identification information. The following examples are all described in this way, but the present disclosure is not limited to this. In other embodiments, the generated target string can also be converted to obtain the target identification information, for example, a constant or character with a preset number of digits is filled before the target string to make its length meet the preset requirements. That is, in the present disclosure, as long as the resource path in the URL can be converted to obtain unique and definite identification information, it will be sufficient.
示例性的,第一域名生成模块412包括如下功能:Exemplarily, the first domain name generating module 412 includes the following functions:
1)提取所请求的URL中的资源路径(即目标URL中的目标资源路径):例如,删除该URL中的协议(协议名/协议类型)、host(主机名)、除了资源路径以外的其它参数等,只保留资源路径(如:/study/index.html)。1) Extract the resource path in the requested URL (i.e., the target resource path in the target URL): for example, delete the protocol (protocol name/protocol type), host (host name), and other parameters except the resource path in the URL, and only keep the resource path (such as: /study/index.html).
2)SHA256计算:对提取的资源路径进行SHA256计算,得到32字节的16进制数的标识信息。假设用path表示资源路径,则可表示所获得的标识信息为HASH_SHA256(path)。例如:HASH_SHA256('/study/index.html')=242bf7b4dae07c8c9e298f3172c82bd14742794668a5c849d1841a0889872713。2) SHA256 calculation: Perform SHA256 calculation on the extracted resource path to obtain 32-byte hexadecimal identification information. Assuming that path represents the resource path, the obtained identification information can be expressed as HASH_SHA256(path). For example: HASH_SHA256('/study/index.html')=242bf7b4dae07c8c9e298f3172c82bd14742794668a5c849d1841a0889872713.
3)拼接域名:把步骤2)中计算得到的32字节的标识信息(这里是指目标标识信息)添加在原域名(即目标源域名)前面,生成新的域名(即目标更替域名)。如:242bf7b4dae07c8c9e298f3172c82bd1.4742794668a5c849d1841a0889872713.mp3.tst.cn)。3) Concatenate domain names: Add the 32-byte identification information (here refers to the target identification information) calculated in step 2) to the front of the original domain name (i.e. the target source domain name) to generate a new domain name (i.e. the target replacement domain name). For example: 242bf7b4dae07c8c9e298f3172c82bd1.4742794668a5c849d1841a0889872713.mp3.tst.cn).
继续参考图4,本公开实施例还提供了一种调度系统44。该调度系统44包括调度索引更新模块442和第二域名生成模块443。4 , the embodiment of the present disclosure further provides a scheduling system 44 . The scheduling system 44 includes a scheduling index updating module 442 and a second domain name generating module 443 .
调度索引更新模块442用于获得源索引及其对应的业务地址,所述源索引包括源域名及其对应的统一资源定位符中的资源路径;向第二域名生成模块443发送更替域名生成请求,所述更替域名生成请求包括所述源索引。The scheduling index update module 442 is used to obtain the source index and its corresponding business address, wherein the source index includes the source domain name and its corresponding resource path in the uniform resource locator; and send a replacement domain name generation request to the second domain name generation module 443, wherein the replacement domain name generation request includes the source index.
在示例性实施例中,当存在至少部分URL需要实现内容调度时,在调度系统44中,可以配置该至少部分URL的索引(为了区分,这里称之为源索引或旧索引)为源域名和对应的URL中的资源路径的联合索引,即不只是采用源域名作为索引,以用于实现内容调度。针对这至少部分URL,根据所希望实现的内容调度,为其配置对应的业务地址,即同一域名(这里是指源域名)下的不同URL可以配置可能不同的业务地址(即业务节点/服务器的IP地址)。In an exemplary embodiment, when there are at least some URLs that need to implement content scheduling, in the scheduling system 44, the index of at least some URLs (referred to as source index or old index here for distinction) can be configured as a joint index of the source domain name and the resource path in the corresponding URL, that is, not only the source domain name is used as the index to implement content scheduling. For at least some URLs, according to the content scheduling that is desired to be implemented, the corresponding service address is configured for it, that is, different URLs under the same domain name (here refers to the source domain name) can be configured with possibly different service addresses (i.e., the IP address of the service node/server).
第二域名生成模块443用于接收调度索引更新模块442发送的所述更替域名生成请求,并基于其中的所述资源路径和所述源域名,获得与所述资源路径唯一对应的更替域名;向调度索引更新模块442返回所述更替域名(即新域名)。The second domain name generation module 443 is used to receive the replacement domain name generation request sent by the scheduling index update module 442, and based on the resource path and the source domain name therein, obtain a replacement domain name uniquely corresponding to the resource path; and return the replacement domain name (i.e., the new domain name) to the scheduling index update module 442.
在示例性实施例中,第二域名生成模块443用于对所述资源路径进行转换,获得与所述资源路径唯一对应的标识信息;组合所述标识信息和对应的所述源域名,获得更替域名。In an exemplary embodiment, the second domain name generation module 443 is used to convert the resource path to obtain identification information uniquely corresponding to the resource path; and combine the identification information and the corresponding source domain name to obtain a replacement domain name.
在一些实施例中,调度索引更新模块442可以将URL中的资源路径发送至第二域名生成模块443,第二域名生成模块443将资源路径对应的标识信息返回至调度索引更新模块442,以组合源域名生成更替域名。在另一些实施例中,调度索引更新模块442可以将URL发送至第二域名生成模块443,第二域名生成模块443提取其中的资源路径和源域名,以生成与资源路径对应的标识信息,并组合源域名和标识信息生成更替域名,并将更替域名返回至调度索引更新模块442。In some embodiments, the scheduling index update module 442 may send the resource path in the URL to the second domain name generation module 443, and the second domain name generation module 443 returns the identification information corresponding to the resource path to the scheduling index update module 442 to combine the source domain name to generate a replacement domain name. In other embodiments, the scheduling index update module 442 may send the URL to the second domain name generation module 443, and the second domain name generation module 443 extracts the resource path and the source domain name therein to generate identification information corresponding to the resource path, and combines the source domain name and the identification information to generate a replacement domain name, and returns the replacement domain name to the scheduling index update module 442.
调度索引更新模块442还用于接收第二域名生成模块443发送的所述更替域名,采用所述更替域名作为所述源索引的更替索引。The scheduling index updating module 442 is further configured to receive the replacement domain name sent by the second domain name generating module 443, and use the replacement domain name as the replacement index of the source index.
示例性的,本公开实施例提供的调度索引更新模块442包括如下功能:Exemplarily, the scheduling index updating module 442 provided in the embodiment of the present disclosure includes the following functions:
1)查找所有以域名(源域名)+URL资源路径(即URL中的资源路径)为索引(这里是指源索引或旧索引)的调度策略。1) Find all scheduling policies that use the domain name (source domain name) + URL resource path (that is, the resource path in the URL) as the index (here refers to the source index or old index).
2)把索引替换为新的域名(例如以SHA256开头/前缀的域名,即更替域名)。2) Replace the index with a new domain name (for example, a domain name starting with/prefixed with SHA256, i.e. a replacement domain name).
在示例性实施例中,本公开实施例提供的调度系统44还包括调度决策模块441。调度决策模块441用于在调度策略变更时,生成所述源索引,并确定所述源索引所对应的业务地址;向调度索引更新模块442发送所述源索引及其对应的业务地址。In an exemplary embodiment, the scheduling system 44 provided by the embodiment of the present disclosure further includes a scheduling decision module 441. The scheduling decision module 441 is used to generate the source index and determine the service address corresponding to the source index when the scheduling strategy changes; and send the source index and its corresponding service address to the scheduling index update module 442.
在示例性实施例中,本公开实施例提供的调度系统44还包括域名系统解析数据库(即解析数据库432)。调度索引更新模块442还用于将所述更替索引及其对应的业务地址,发送至解析数据库432。解析数据库432用于接收所述更替索引及其对应的业务地址,并关联存储所述更替索引及其对应的业务地址。In an exemplary embodiment, the scheduling system 44 provided by the embodiment of the present disclosure further includes a domain name system resolution database (i.e., resolution database 432). The scheduling index update module 442 is also used to send the replacement index and its corresponding business address to the resolution database 432. The resolution database 432 is used to receive the replacement index and its corresponding business address, and store the replacement index and its corresponding business address in association.
在示例性实施例中,解析数据库432还用于从权威DNS 43接收包括目标更替域名的域名解析请求;响应所述域名解析请求,查找与所述目标更替域名匹配的更替索引;将匹配的更替索引对应的业务地址作为目标业务地址,返回至权威DNS 43。这里返回至权威DNS43的目标业务地址是已经基于URL调度的业务节点的IP地址,基于该目标业务地址可以完成内容调度,以便终端或客户端可以基于该目标业务地址进行内容访问,不需要二次重定向。In an exemplary embodiment, the resolution database 432 is further used to receive a domain name resolution request including a target replacement domain name from the authoritative DNS 43; respond to the domain name resolution request, find a replacement index matching the target replacement domain name; and return the service address corresponding to the matching replacement index as the target service address to the authoritative DNS 43. The target service address returned to the authoritative DNS 43 here is the IP address of the service node that has been scheduled based on the URL, and content scheduling can be completed based on the target service address, so that the terminal or client can access the content based on the target service address without secondary redirection.
即调度索引更新模块442可以将生成的更替索引(或新索引)用来替代或更新对应的源索引,将更替索引及其对应的业务地址作为DNS解析数据444,同步至解析数据库432中。这样,当权威DNS 43接收到包含目标更替域名的域名解析请求时,可以利用权威DNS 43中的域名解析模块431,从解析数据库432中查找到与该目标更替域名对应的更替索引,从而找到对应的业务地址作为目标业务地址。这里目标业务地址是已经基于URL调度的业务节点的IP地址,基于该目标业务地址可以完成内容调度,即这个IP地址既是域名调度,也是内容调度的IP地址,以便终端或客户端可以基于该目标业务地址进行内容访问,不需要二次重定向。That is, the scheduling index update module 442 can use the generated replacement index (or new index) to replace or update the corresponding source index, and synchronize the replacement index and its corresponding business address as DNS resolution data 444 to the resolution database 432. In this way, when the authoritative DNS 43 receives a domain name resolution request containing a target replacement domain name, the domain name resolution module 431 in the authoritative DNS 43 can be used to find the replacement index corresponding to the target replacement domain name from the resolution database 432, thereby finding the corresponding business address as the target business address. Here, the target business address is the IP address of the business node that has been scheduled based on the URL, and content scheduling can be completed based on the target business address, that is, this IP address is both a domain name scheduling and an IP address for content scheduling, so that the terminal or client can access the content based on the target business address without secondary redirection.
本公开实施例提供的系统(包括上述客户端和调度系统),通过DNS一次性实现了基于URL的调度,解决通过DNS域名调度和应用层重定向两次调度才能实现基于URL的调度,减少了两次调度的时延。因此,本公开实施例提供的方法是一种通过DNS一次性实现基于URL调度的方法。The system (including the above-mentioned client and scheduling system) provided by the embodiment of the present disclosure implements URL-based scheduling through DNS at one time, solves the problem that URL-based scheduling can only be implemented through two schedulings of DNS domain name scheduling and application layer redirection, and reduces the delay of the two schedulings. Therefore, the method provided by the embodiment of the present disclosure is a method for implementing URL-based scheduling through DNS at one time.
进一步的,本公开实施例还提供了一种调度系统,该调度系统包括调度决策模块和域名系统解析数据库。调度决策模块用于生成更替索引,并确定所述更替索引对应的业务地址,所述更替索引包括源域名和标识信息,所述标识信息与统一资源定位符中的资源路径一一对应。域名系统解析数据库用于关联存储所述更替索引及其对应的业务地址。域名系统解析数据库还用于从权威域名系统接收包括目标更替域名的域名解析请求;响应所述域名解析请求,查找与所述目标更替域名匹配的更替索引;将匹配的更替索引对应的业务地址作为目标业务地址,返回至所述权威域名系统。这里返回至权威域名系统的目标业务地址是已经基于URL调度的业务节点的IP地址,基于该目标业务地址可以完成内容调度,以便终端或客户端可以基于该目标业务地址进行内容访问,不需要二次重定向。Furthermore, the disclosed embodiment also provides a scheduling system, which includes a scheduling decision module and a domain name system resolution database. The scheduling decision module is used to generate a replacement index and determine the business address corresponding to the replacement index, wherein the replacement index includes a source domain name and identification information, and the identification information corresponds one-to-one to the resource path in the uniform resource locator. The domain name system resolution database is used to associate and store the replacement index and its corresponding business address. The domain name system resolution database is also used to receive a domain name resolution request including a target replacement domain name from an authoritative domain name system; respond to the domain name resolution request, find a replacement index that matches the target replacement domain name; and return the business address corresponding to the matching replacement index as the target business address to the authoritative domain name system. The target business address returned to the authoritative domain name system here is the IP address of the business node that has been scheduled based on the URL, and content scheduling can be completed based on the target business address, so that the terminal or client can access the content based on the target business address without the need for secondary redirection.
即本公开实施例还提供了一种调度系统,其可以不包括上述图4中的调度索引更新模块和第二域名生成模块。在该调度系统中,调度决策模块在域名系统解析数据库中存储的直接即为更替索引和对应的业务地址,由此可以省略上述新域名的重新生成以及索引更新过程。That is, the embodiment of the present disclosure also provides a scheduling system, which may not include the scheduling index update module and the second domain name generation module in Figure 4. In the scheduling system, the scheduling decision module directly stores the replacement index and the corresponding business address in the domain name system resolution database, thereby omitting the above-mentioned new domain name regeneration and index update process.
需要说明的是,本公开实施例中,调度系统存储的更替索引所对应的业务地址,存储的就是域名调度和内容调度的IP地址。It should be noted that, in the embodiment of the present disclosure, the business address corresponding to the replacement index stored in the scheduling system is the IP address of the domain name scheduling and content scheduling.
图5示出本公开实施例中一种调度方法的流程图。图5实施例提供的方法可以由任意电子设备执行,例如由终端执行或由客户端执行。如图5所示,本公开实施例提供的方法可以包括以下步骤。FIG5 shows a flow chart of a scheduling method in an embodiment of the present disclosure. The method provided in the embodiment of FIG5 can be executed by any electronic device, for example, by a terminal or by a client. As shown in FIG5, the method provided in the embodiment of the present disclosure may include the following steps.
在S510中,发送域名解析请求,所述域名解析请求中包括目标更替域名,所述目标更替域名包括目标源域名和目标标识信息,所述目标标识信息与目标统一资源定位符中的目标资源路径之间具有一一映射关系。In S510, a domain name resolution request is sent, wherein the domain name resolution request includes a target replacement domain name, wherein the target replacement domain name includes a target source domain name and target identification information, and there is a one-to-one mapping relationship between the target identification information and the target resource path in the target uniform resource locator.
在示例性实施例中,所述目标统一资源定位符中包括所述目标源域名。In an exemplary embodiment, the target uniform resource locator includes the target source domain name.
在示例性实施例中,本公开实施例提供的方法还包括:生成所述域名解析请求。In an exemplary embodiment, the method provided by the embodiment of the present disclosure further includes: generating the domain name resolution request.
在示例性实施例中,生成所述域名解析请求,包括:获取所述目标统一资源定位符;提取所述目标统一资源定位符中的所述目标资源路径和所述目标源域名;对所述目标资源路径进行转换,获得与所述目标资源路径唯一对应的所述目标标识信息;组合所述目标标识信息和所述目标源域名,获得所述目标更替域名;生成包括所述目标更替域名的所述域名解析请求。In an exemplary embodiment, generating the domain name resolution request includes: obtaining the target uniform resource locator; extracting the target resource path and the target source domain name in the target uniform resource locator; converting the target resource path to obtain the target identification information uniquely corresponding to the target resource path; combining the target identification information and the target source domain name to obtain the target replacement domain name; generating the domain name resolution request including the target replacement domain name.
在示例性实施例中,对所述目标资源路径进行转换,获得与所述目标资源路径唯一对应的所述目标标识信息,包括:采用预定长度的散列函数对所述目标资源路径进行处理,获得所述预定长度的目标字符串,以生成所述目标标识信息。In an exemplary embodiment, converting the target resource path to obtain the target identification information uniquely corresponding to the target resource path includes: processing the target resource path using a hash function of a predetermined length to obtain a target string of the predetermined length to generate the target identification information.
在示例性实施例中,组合所述目标标识信息和所述目标源域名,获得所述目标更替域名,包括:若所述目标标识信息的长度超过域名字段长度阈值,则拆分所述目标标识信息获得多个目标子标识信息,且每个目标子标识信息的长度小于或等于所述域名字段长度阈值;组合所述目标子标识信息和所述目标源域名,获得所述目标更替域名。In an exemplary embodiment, the target identification information and the target source domain name are combined to obtain the target replacement domain name, including: if the length of the target identification information exceeds the domain name field length threshold, splitting the target identification information to obtain multiple target sub-identification information, and the length of each target sub-identification information is less than or equal to the domain name field length threshold; combining the target sub-identification information and the target source domain name to obtain the target replacement domain name.
示例性的,当采用预定长度的散列函数产生的hash值超过域名单个字段的最大允许长度(即域名字段长度阈值)时,则可以将所产生的hash值拆分为多个段以分别附加在原域名(例如vod.test.cn)前面,如:xxxx.xxxx.vod.test.cn。这里的前后两个“xxxx”分别表示拆分后的两个段,即两个目标子标识信息。For example, when the hash value generated by the hash function of a predetermined length exceeds the maximum allowable length of a single domain name field (i.e., the domain name field length threshold), the generated hash value can be split into multiple segments to be appended to the front of the original domain name (e.g., vod.test.cn), such as: xxxx.xxxx.vod.test.cn. The two "xxxx"s here represent the two segments after the split, i.e., two target sub-identification information.
例如,域名每个字段最多63字节,若计算后为64字节,拆分为两段(各32字节),附加在原域名前。可以理解的是,其它拆分方式也在本公开保护范围内。For example, each field of a domain name is at most 63 bytes. If it is calculated to be 64 bytes, it is split into two segments (32 bytes each) and appended before the original domain name. It is understandable that other splitting methods are also within the scope of protection of this disclosure.
需要说明的是,第一域名生成模块和第二域名生成模块对URL的处理是对应的,例如若第一域名生成模块采用SHA256,则第二域名生成模块也采用SHA256。再例如,若第一域名生成模块对SHA256生成的字符串进行拆分,那么第二域名生成模块也采用同样的拆分方式。即同一个URL分别经过第一域名生成模块和第二域名生成模块处理之后,其输出的新域名是相同的。It should be noted that the processing of the URL by the first domain name generation module and the second domain name generation module is corresponding. For example, if the first domain name generation module uses SHA256, the second domain name generation module also uses SHA256. For another example, if the first domain name generation module splits the string generated by SHA256, the second domain name generation module also uses the same splitting method. That is, after the same URL is processed by the first domain name generation module and the second domain name generation module respectively, the new domain names output by them are the same.
在示例性实施例中,组合所述目标标识信息和所述目标源域名,获得所述目标更替域名,包括:将所述目标标识信息添加至所述目标源域名之前,生成所述目标更替域名。但本公开并不限定于此,例如还可以将目标标识信息添加至目标源域名之后,或者将目标标识信息中的多个目标子标识信息,一部分添加至目标源域名之前,另一部分添加至目标源域名之后。In an exemplary embodiment, combining the target identification information and the target source domain name to obtain the target replacement domain name includes: adding the target identification information before the target source domain name to generate the target replacement domain name. However, the present disclosure is not limited to this, for example, the target identification information may also be added after the target source domain name, or a portion of the multiple target sub-identification information in the target identification information may be added before the target source domain name and another portion may be added after the target source domain name.
在S520中,接收响应所述域名解析请求返回的目标业务地址,所述目标业务地址与所述目标更替域名之间具有对应关系。In S520, a target business address returned in response to the domain name resolution request is received, and there is a corresponding relationship between the target business address and the target replacement domain name.
在S530中,向所述目标业务地址对应的目标业务节点进行内容访问。即不再需要进行应用层的二次重定向,即可直接通过一次DNS调度实现基于URL的内容调度。In S530, content access is performed to the target service node corresponding to the target service address, that is, secondary redirection of the application layer is no longer required, and content scheduling based on URL can be directly achieved through one DNS scheduling.
图5实施例的其它内容可参考上述其它实施例,在此不再赘述。For other contents of the embodiment of FIG. 5 , reference may be made to the other embodiments described above, and will not be described in detail here.
图6对本公开实施例提供的方法进行举例说明。但本公开并不限定于此。如图6所示,本公开实施例提供的方法包括以下步骤。FIG6 illustrates an example of the method provided in the embodiment of the present disclosure. However, the present disclosure is not limited thereto. As shown in FIG6 , the method provided in the embodiment of the present disclosure includes the following steps.
S61.当用户需要访问新的URL内容时,客户端的业务模块获取该新URL,即目标URL。S61. When the user needs to access new URL content, the service module of the client obtains the new URL, ie, the target URL.
S62.客户端的业务模块向客户端的第一域名生成模块请求新域名。S62. The service module of the client requests the first domain name generation module of the client for a new domain name.
例如向第一域名生成模块发送域名更替请求,该域名更替请求携带该新URL或新URL参数)。For example, a domain name replacement request is sent to the first domain name generation module, and the domain name replacement request carries the new URL or new URL parameters).
S63.第一域名生成模块计算,生成新域名。S63. The first domain name generation module calculates and generates a new domain name.
例如第一域名生成模块把从业务模块接收到的URL里的资源路径参数(或资源路径),经SHA256计算后的32字节的目标标识信息和URL域名(即目标源域名)拼接成新域名。For example, the first domain name generation module concatenates the resource path parameter (or resource path) in the URL received from the business module, the 32-byte target identification information calculated by SHA256, and the URL domain name (ie, the target source domain name) into a new domain name.
S64. 第一域名生成模块发送响应新域名。S64. The first domain name generation module sends a response new domain name.
即第一域名生成模块把新域名发回业务模块,即将新域名作为域名更替请求的响应。That is, the first domain name generation module sends the new domain name back to the business module, that is, the new domain name is used as a response to the domain name replacement request.
S65.业务模块向客户端的DNS模块发送包含该新域名的域名解析请求(也可称为DNS域名解析请求)。S65. The business module sends a domain name resolution request (also referred to as a DNS domain name resolution request) containing the new domain name to the DNS module of the client.
S66.DNS模块向LocalDNS发送域名解析请求。S66. The DNS module sends a domain name resolution request to LocalDNS.
S67.LocalDNS接收到DNS模块发送的域名解析请求之后,将该包含新域名的域名解析请求发送到权威DNS。S67. After receiving the domain name resolution request sent by the DNS module, LocalDNS sends the domain name resolution request containing the new domain name to the authoritative DNS.
S68.权威DNS发送响应IP地址。S68. The authoritative DNS sends a response IP address.
例如,权威DNS查询本地的解析数据库,得到业务节点的IP地址,即目标业务节点的目标业务地址,以作为响应该域名解析请求的IP地址,并把该IP地址发回LocalDNS。For example, the authoritative DNS queries the local resolution database to obtain the IP address of the service node, that is, the target service address of the target service node, as the IP address in response to the domain name resolution request, and sends the IP address back to the LocalDNS.
S69.经由LocalDNS把IP地址发回DNS模块。S69. Send the IP address back to the DNS module via LocalDNS.
S610.DNS模块把业务节点IP(即响应IP地址)发回业务模块。S610. The DNS module sends the service node IP (ie, the response IP address) back to the service module.
S611.业务模块向该业务节点IP对应的业务节点(即目标业务节点)发起请求(例如内容访问请求或业务访问请求),开始内容服务过程。S611. The service module initiates a request (eg, a content access request or a service access request) to the service node (ie, the target service node) corresponding to the service node IP, and starts the content service process.
图7示出本公开实施例中另一种调度方法的流程图。图7实施例提供的方法可以由任意电子设备执行,例如由权威DNS执行或调度系统执行。如图7所示,本公开实施例提供的方法可以包括以下步骤。FIG7 shows a flow chart of another scheduling method in an embodiment of the present disclosure. The method provided in the embodiment of FIG7 can be executed by any electronic device, for example, by an authoritative DNS or a scheduling system. As shown in FIG7 , the method provided in an embodiment of the present disclosure may include the following steps.
在S710中,接收域名解析请求,所述域名解析请求中包括目标更替域名,所述目标更替域名包括目标源域名和目标标识信息,所述目标标识信息与目标统一资源定位符中的目标资源路径之间具有一一映射关系。In S710, a domain name resolution request is received, wherein the domain name resolution request includes a target replacement domain name, wherein the target replacement domain name includes a target source domain name and target identification information, and there is a one-to-one mapping relationship between the target identification information and the target resource path in the target uniform resource locator.
在示例性实施例中,本公开实施例提供的方法还包括:获取源索引及对应的业务地址,所述源索引包括源域名及其对应的统一资源定位符的资源路径;根据所述资源路径生成与之唯一对应的标识信息;组合所述源域名和对应的标识信息获得更替域名;以所述更替域名为更替索引,关联存储所述更替索引与对应的业务地址。In an exemplary embodiment, the method provided by the embodiment of the present disclosure also includes: obtaining a source index and a corresponding business address, wherein the source index includes a source domain name and a resource path of a uniform resource locator corresponding to the source domain name; generating identification information uniquely corresponding to the resource path; combining the source domain name and the corresponding identification information to obtain a replacement domain name; using the replacement domain name as a replacement index, and associating and storing the replacement index with the corresponding business address.
在S720中,获得与所述目标更替域名对应的目标业务地址。In S720, a target service address corresponding to the target replacement domain name is obtained.
在示例性实施例中,获得与所述目标更替域名对应的目标业务地址,包括:从更替索引中找到与所述目标更替域名匹配的更替域名;将匹配的更替域名对应的业务地址作为所述目标业务地址。In an exemplary embodiment, obtaining a target business address corresponding to the target replacement domain name includes: finding an replacement domain name matching the target replacement domain name from an replacement index; and using the business address corresponding to the matching replacement domain name as the target business address.
在S730中,响应所述域名解析请求,发送所述目标业务地址。以使得后续可以直接基于该目标业务地址实现基于URL的内容调度,不需要再经过应用层的二次重定向。In S730, the target service address is sent in response to the domain name resolution request, so that the URL-based content scheduling can be implemented directly based on the target service address in the future without the need for secondary redirection at the application layer.
图7实施例的其它内容可参考上述其它实施例,在此不再赘述。For other contents of the embodiment of FIG. 7 , reference may be made to the other embodiments described above and will not be repeated here.
下面通过图8对本公开实施例提供的方法举例说明,但本公开并不限定于此。如图8所示,本公开实施例提供的方法可以包括以下步骤。The method provided by the embodiment of the present disclosure is illustrated below by way of example in FIG8 , but the present disclosure is not limited thereto. As shown in FIG8 , the method provided by the embodiment of the present disclosure may include the following steps.
S81.调度系统的调度决策模块,在调度策略变更时,重新计算出调度决策数据(以域名+URL资源路径为索引)。S81. The scheduling decision module of the scheduling system recalculates the scheduling decision data (with the domain name + URL resource path as the index) when the scheduling strategy changes.
这里的调度策略变更是指原来的调度策略是基于DNS的调度,当前希望至少部分URL能实现内容调度,针对这至少部分URL变更其索引为域名加URL中的资源路径。The scheduling strategy change here means that the original scheduling strategy is based on DNS scheduling. Currently, it is hoped that at least some URLs can achieve content scheduling. For at least some URLs, their index is changed to the domain name plus the resource path in the URL.
S82.调度决策模块通知调度系统的调度索引更新模块。S82. The scheduling decision module notifies the scheduling index update module of the scheduling system.
例如,调度决策模块向调度索引更新模块发送调度索引更新通知,以告知其进行了调度策略变更。For example, the scheduling decision module sends a scheduling index update notification to the scheduling index update module to inform it that the scheduling policy has been changed.
S83.调度索引更新模块响应接收到调度索引更新通知,向调度决策模块发送请求,以请求拉取调度策略变更后的调度决策数据。S83. In response to receiving the scheduling index update notification, the scheduling index update module sends a request to the scheduling decision module to request to pull the scheduling decision data after the scheduling policy is changed.
S84.调度决策模块响应从调度索引更新模块接收到的请求,向调度索引更新模块返回调度策略变更后的调度决策数据。S84. The scheduling decision module responds to the request received from the scheduling index updating module and returns the scheduling decision data after the scheduling strategy is changed to the scheduling index updating module.
需要说明的是,步骤S84是可选的。在其它实施例中,调度决策模块可以在向调度索引更新模块发送调度索引更新通知时,携带调度策略变更后的调度决策数据。调度策略变更后的调度决策数据包括上述域名+URL资源路径形成的源索引。It should be noted that step S84 is optional. In other embodiments, the scheduling decision module may carry the scheduling decision data after the scheduling strategy is changed when sending the scheduling index update notification to the scheduling index update module. The scheduling decision data after the scheduling strategy is changed includes the source index formed by the domain name + URL resource path.
S85.调度索引更新模块从调度决策模块获取调度策略变更后的调度决策数据,向调度系统中的域名生成模块(即第二域名生成模块请求)发送请求(例如更替域名生成请求),以请求新域名。该请求中携带上述源索引。S85. The scheduling index update module obtains the scheduling decision data after the scheduling strategy is changed from the scheduling decision module, and sends a request (such as a replacement domain name generation request) to the domain name generation module (i.e., the second domain name generation module request) in the scheduling system to request a new domain name. The request carries the above source index.
S86.调度系统中的域名生成模块响应从调度索引更新模块接收到的请求,根据该请求中的源索引生成新域名。S86. The domain name generation module in the scheduling system responds to the request received from the scheduling index update module and generates a new domain name according to the source index in the request.
例如,第二域名生成模块计算源索引中的URL资源路径经过SHA256转换后的标识信息,与源索引中的域名拼接成新域名。For example, the second domain name generation module calculates the identification information of the URL resource path in the source index after SHA256 conversion, and concatenates it with the domain name in the source index into a new domain name.
S87.调度系统中的域名生成模块返回新域名到调度索引更新模块。S87. The domain name generation module in the scheduling system returns the new domain name to the scheduling index update module.
S88. 调度索引更新模块更新决策数据。S88. The scheduling index update module updates the decision data.
例如,调度索引更新模块更新从调度决策模块接收到的调度决策数据的索引,即将URL域名(源域名)+URL资源路径的旧索引替换为新域名,即将新域名作为新索引或更替索引。For example, the scheduling index update module updates the index of the scheduling decision data received from the scheduling decision module, that is, replaces the old index of URL domain name (source domain name) + URL resource path with the new domain name, that is, uses the new domain name as the new index or replacement index.
S89.调度索引更新模块存储新索引的调度决策数据(即新域名解析数据)到调度系统的DNS解析数据库。S89. The scheduling index update module stores the scheduling decision data of the new index (ie, the new domain name resolution data) into the DNS resolution database of the scheduling system.
S810.调度系统的DNS解析数据库同步数据给权威DNS。S810. The DNS resolution database of the scheduling system synchronizes data to the authoritative DNS.
例如,客户端为所请求的URL生成一个唯一的新域名。具体的,将该URL中资源路径参数通过SHA256算法计算得到32字节的目标标识信息,添加在该URL对应的源域名前面以形成该新域名。调度系统采用同样算法计算每个URL转换后的32字节的标识信息,并根据调度策略生成各个用户区域的URL的业务服务IP(即新URL所对应的业务地址),再下发到权威数据库(即解析数据库),以实现特殊内容到特殊业务节点的访问,而不单纯采用就近的调度策略。其中,一个用户区域可能包括多个地址段。权威DNS提取域名前缀32字节的标识信息(即目标标识信息),根据请求IP、源域名和域名前缀查询用户所在区域的解析数据库,返回用户访问的业务IP(即目标业务地址)。For example, the client generates a unique new domain name for the requested URL. Specifically, the resource path parameter in the URL is calculated using the SHA256 algorithm to obtain a 32-byte target identification information, which is added to the front of the source domain name corresponding to the URL to form the new domain name. The scheduling system uses the same algorithm to calculate the 32-byte identification information after each URL conversion, and generates the business service IP (i.e., the business address corresponding to the new URL) of the URL of each user area according to the scheduling strategy, and then sends it to the authoritative database (i.e., the resolution database) to achieve access to special content to special business nodes, rather than simply adopting the nearest scheduling strategy. Among them, a user area may include multiple address segments. The authoritative DNS extracts the 32-byte identification information (i.e., the target identification information) of the domain name prefix, queries the resolution database of the user's area based on the request IP, source domain name, and domain name prefix, and returns the business IP (i.e., the target business address) accessed by the user.
可以理解的是,本公开实施例提供的方案中,对不需要实现URL内容调度的域名无影响,还保持以前的处理方式,例如仍然采用DNS调度。It is understandable that the solution provided by the embodiment of the present disclosure has no impact on domain names that do not need to implement URL content scheduling, and the previous processing method is maintained, such as still using DNS scheduling.
本公开实施例中提供的方案可以应用于CDN基于URL的内容调度。例如应用于视频的冷热调度,热影片推送到所有边缘节点,冷内容只在少数边缘节点或在集中的中央节点给用户提供服务。CDN根据URL参数(例如源域名和资源路径)调度到不同的边缘节点,以此实现CDN内容调度。例如,可以应用于IPTV CDN内容调度,IPTV视频基于URL参数调度到不同边缘节点。The solution provided in the embodiments of the present disclosure can be applied to CDN content scheduling based on URLs. For example, it can be applied to the hot and cold scheduling of videos, where hot videos are pushed to all edge nodes, and cold content is only provided to users in a few edge nodes or in centralized central nodes. CDN schedules to different edge nodes based on URL parameters (such as source domain name and resource path), thereby realizing CDN content scheduling. For example, it can be applied to IPTV CDN content scheduling, where IPTV videos are scheduled to different edge nodes based on URL parameters.
下面以视频点播场景为例,不同码率、热度不同的影片由不同业务节点提供服务。假设域名(这里是指源域名):vod.test.cn。调度策略:根据码率、访问冷热度调度不同业务节点。例如,超高清(如分辨率为8K)对时延要求严格,调度到下沉边缘节点;超冷的片源省中心缓存一份即可,全省到省中心访问;较热的影片在本地市节点缓存,用户访问不出地市。Taking the video on demand scenario as an example, different business nodes provide services for movies with different bit rates and popularity. Assume that the domain name (here refers to the source domain name): vod.test.cn. Scheduling strategy: Schedule different business nodes according to bit rate and access popularity. For example, ultra-high definition (such as 8K resolution) has strict latency requirements and is scheduled to sink edge nodes; ultra-cold movie sources can be cached in one copy in the provincial center, and the whole province can access them from the provincial center; hot movies are cached in local city nodes, and users cannot access them outside the city.
假设该源域名下有四个影片信息如下:Assume that there are four videos under the source domain name and the information is as follows:
a)影片1的URL:vod.test.cn/gq/23467890823.mpeg,其为高清、访问热度高。调度策略:调度到地市节点。a) URL of movie 1: vod.test.cn/gq/23467890823.mpeg, which is high-definition and has high access popularity. Scheduling strategy: dispatch to the prefecture-level city node.
b)影片2的URL:vod.test.cn/gq/weh34816583.avi,其为高清、访问热度低。调度策略:调度到省中心节点。b) URL of movie 2: vod.test.cn/gq/weh34816583.avi, which is high-definition and has low access popularity. Scheduling strategy: dispatch to the provincial center node.
c)影片3的URL:vod.test.cn/4k/d7126efdekdf.avi,其分辨率为4K、访问热度高。调度策略:调度到地市节点。c) URL of movie 3: vod.test.cn/4k/d7126efdekdf.avi, with a resolution of 4K and high access popularity. Scheduling strategy: dispatch to the prefecture-level city node.
d)影片4的URL:vod.test.cn/8k/d7126efdekdf.avs,其分辨率为8K、访问热度低。调度策略:调度到下沉到边缘的节点。d) The URL of movie 4 is: vod.test.cn/8k/d7126efdekdf.avs, which has a resolution of 8K and low access popularity. Scheduling strategy: Scheduling to nodes that sink to the edge.
其调度过程如下:The scheduling process is as follows:
1)按本公开实施例提供的方法,客户端生成新域名。上面4个URL分别生成新域名如下:1) According to the method provided in the embodiment of the present disclosure, the client generates a new domain name. The above four URLs generate new domain names as follows:
281c4448313353624099b6d4f6ae787c.f02c0a8d4e42467cd0663c2563ebc25f.vod.test.cn;281c4448313353624099b6d4f6ae787c.f02c0a8d4e42467cd0663c2563ebc25f.vod.test.cn;
0a0e180d32604876040645320174b1e9.bc18e352f3c4ec888eb9ec278e601553.vod.test.cn;0a0e180d32604876040645320174b1e9.bc18e352f3c4ec888eb9ec278e601553.vod.test.cn;
88e34f47b63030f4ac71f6d80703c7cd.0d868d2477c486ea382c4bc44b91b0e0.vod.test.cn;88e34f47b63030f4ac71f6d80703c7cd.0d868d2477c486ea382c4bc44b91b0e0.vod.test.cn;
d39d6307cf1ddf3bf75fee1e083cf264.2f771565b10b0eb77b1b45ad42b27ec4.vod.test.cn。d39d6307cf1ddf3bf75fee1e083cf264.2f771565b10b0eb77b1b45ad42b27ec4.vod.test.cn.
2)调度系统采用同样的算法给每个URL生成新域名,并按新域名生成调度策略,然后同步给权威DNS。2) The scheduling system uses the same algorithm to generate a new domain name for each URL, generates a scheduling strategy based on the new domain name, and then synchronizes it to the authoritative DNS.
3)客户端发送所请求的新域名到CDN的权威DNS,权威DNS按新域名查询解析数据库,获得所请求的新域名的解析IP(即目标业务地址)并返回客户端。3) The client sends the requested new domain name to the CDN's authoritative DNS. The authoritative DNS queries the resolution database according to the new domain name, obtains the resolution IP (i.e., the target business address) of the requested new domain name, and returns it to the client.
本公开实施例中,可以按照不同的URI(Uniform Resource Identifier,统一资源标识符)参数或URL参数,通过DNS协议一次性调度到合适节点。本公开实施例在用户侧APP增加第一域名生成模块,在系统侧调度系统中增加第二域名生成模块和调度索引更新模块。域名生成模块(包括第一域名生成模块和第二域名生成模块)例如使用SHA256算法转换URL中的路径为32字节长的标识信息,添加在域名(原域名)前形成新域名;调度索引更新模块更新基于内容的调度策略中域名和URL资源路径参数的联合索引为第二域名生成模块生成的新域名为索引(即新索引);客户端的DNS模块请求新域名的解析,权威DNS根据新域名查询调度策略数据库(即解析数据库)返回客户合适的IP。本公开实施例提供了一种通过DNS实现基于URL调度的方法。In the embodiment of the present disclosure, the DNS protocol can be used to schedule to the appropriate node at one time according to different URI (Uniform Resource Identifier) parameters or URL parameters. The embodiment of the present disclosure adds a first domain name generation module to the user-side APP, and adds a second domain name generation module and a scheduling index update module to the system-side scheduling system. The domain name generation module (including the first domain name generation module and the second domain name generation module) uses the SHA256 algorithm to convert the path in the URL into 32-byte identification information, and adds it in front of the domain name (original domain name) to form a new domain name; the scheduling index update module updates the joint index of the domain name and URL resource path parameters in the content-based scheduling strategy to the new domain name generated by the second domain name generation module as the index (i.e., the new index); the DNS module of the client requests the resolution of the new domain name, and the authoritative DNS queries the scheduling strategy database (i.e., the resolution database) based on the new domain name and returns the appropriate IP for the customer. The embodiment of the present disclosure provides a method for implementing URL-based scheduling through DNS.
本公开实施例提供的方案,一方面,其实现简单:通过应用层的重定向调度(HTTP/RTSP等协议)实现URL内容调度,需要DNS和应用层重定向两次调度才能完成。而本公开实施例中,客户端通过DNS协议一次性完成URL内容调度,应用层服务不用参与调度过程中。另一方面,调度时延小:基于URL内容调度一般要通过应用层的重定向调度(HTTP/RTSP等重定向),像HTTP/RTSP都要建立TCP连接,时延较大。而本公开实施例中,客户通过DNS协议一次性就获得基于URL内容调度的服务节点IP(即目标业务地址),DNS基于UDP、不需要建立连接,时延非常小。对时延敏感的业务,用户体验好。同时,本公开实施例提出的DNS实现URL内容调度,不占用DNS字段,不影响DNS使用。例如,不需要占用了DNS协议的ECS部分,若LocalDNS需要透传客户端IP的时候,或者LocalDNS关闭ECS协议,本公开实施例提供的方案可正常使用。本公开实施例提供的方案对DNS协议无任何修改,不受LocalDNS影响。此外,本公开实施例通过DNS协议一次性实现URL调度,不仅仅是CDN的冷热调度,能实现CDN任意的基于URL的内容调度。The solution provided by the embodiment of the present disclosure is simple to implement on the one hand: URL content scheduling is implemented through redirection scheduling of the application layer (HTTP/RTSP and other protocols), which requires two schedulings of DNS and application layer redirection to complete. In the embodiment of the present disclosure, the client completes URL content scheduling through the DNS protocol at one time, and the application layer service does not need to participate in the scheduling process. On the other hand, the scheduling delay is small: URL content scheduling generally requires redirection scheduling of the application layer (HTTP/RTSP and other redirection), such as HTTP/RTSP, which requires a TCP connection to be established, and the delay is large. In the embodiment of the present disclosure, the customer obtains the service node IP (i.e., the target service address) based on URL content scheduling through the DNS protocol at one time. DNS is based on UDP and does not need to establish a connection, so the delay is very small. For delay-sensitive services, the user experience is good. At the same time, the DNS proposed in the embodiment of the present disclosure implements URL content scheduling, does not occupy the DNS field, and does not affect the use of DNS. For example, it is not necessary to occupy the ECS part of the DNS protocol. If LocalDNS needs to transparently transmit the client IP, or LocalDNS closes the ECS protocol, the solution provided by the embodiment of the present disclosure can be used normally. The solution provided by the embodiment of the present disclosure does not modify the DNS protocol and is not affected by LocalDNS. In addition, the embodiment of the present disclosure implements URL scheduling at one time through the DNS protocol, which is not only the hot and cold scheduling of CDN, but can also implement any URL-based content scheduling of CDN.
图9示出本公开实施例中一种调度装置的结构框图。图9实施例提供的调度装置900可设置于终端或客户端内。如图9所示,本公开实施例提供的调度装置900包括第一发送单元910和第一接收单元920。FIG9 shows a block diagram of a scheduling device in an embodiment of the present disclosure. The scheduling device 900 provided in the embodiment of FIG9 can be set in a terminal or a client. As shown in FIG9 , the scheduling device 900 provided in the embodiment of the present disclosure includes a first sending unit 910 and a first receiving unit 920 .
第一发送单元910用于发送域名解析请求,所述域名解析请求中包括目标更替域名,所述目标更替域名包括目标源域名和目标标识信息,所述目标标识信息与目标统一资源定位符中的目标资源路径之间具有一一映射关系。The first sending unit 910 is used to send a domain name resolution request, wherein the domain name resolution request includes a target replacement domain name, and the target replacement domain name includes a target source domain name and target identification information. There is a one-to-one mapping relationship between the target identification information and the target resource path in the target uniform resource locator.
第一接收单元920用于接收响应所述域名解析请求返回的目标业务地址,所述目标业务地址与所述目标更替域名之间具有对应关系。The first receiving unit 920 is used to receive a target business address returned in response to the domain name resolution request, and there is a corresponding relationship between the target business address and the target replacement domain name.
第一发送单元910还用于向所述目标业务地址对应的目标业务节点进行内容访问。The first sending unit 910 is further configured to perform content access to a target service node corresponding to the target service address.
图9实施例的其它内容可参考上述其它实施例,在此不再赘述。For other contents of the embodiment of FIG. 9 , reference may be made to the other embodiments described above and will not be repeated here.
图10示出本公开实施例中另一种调度装置的结构框图。图10实施例提供的调度装置1000可设置于调度系统或权威DNS内。如图10所示,本公开实施例提供的调度装置1000包括第二接收单元1010、第二处理单元1020和第二发送单元1030。FIG10 shows a block diagram of another scheduling device in an embodiment of the present disclosure. The scheduling device 1000 provided in the embodiment of FIG10 can be set in a scheduling system or an authoritative DNS. As shown in FIG10 , the scheduling device 1000 provided in the embodiment of the present disclosure includes a second receiving unit 1010, a second processing unit 1020 and a second sending unit 1030.
第二接收单元1010用于接收域名解析请求,所述域名解析请求中包括目标更替域名,所述目标更替域名包括目标源域名和目标标识信息,所述目标标识信息与目标统一资源定位符中的目标资源路径之间具有一一映射关系。The second receiving unit 1010 is used to receive a domain name resolution request, wherein the domain name resolution request includes a target replacement domain name, and the target replacement domain name includes a target source domain name and target identification information, and there is a one-to-one mapping relationship between the target identification information and the target resource path in the target uniform resource locator.
第二处理单元1020用于获得与所述目标更替域名对应的目标业务地址。The second processing unit 1020 is configured to obtain a target service address corresponding to the target replacement domain name.
第二发送单元1030用于响应所述域名解析请求,发送所述目标业务地址。The second sending unit 1030 is used to respond to the domain name resolution request and send the target service address.
图10实施例的其它内容可参考上述其它实施例,在此不再赘述。For other contents of the embodiment of FIG. 10 , reference may be made to the other embodiments described above and will not be described in detail here.
进一步的,本公开实施例还提供了一种电子设备,包括:处理器;以及存储器,用于存储所述处理器的可执行指令。其中,所述处理器配置为经由执行所述可执行指令来执行本公开任一实施例中所述的方法。Furthermore, an embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor, wherein the processor is configured to execute the method described in any embodiment of the present disclosure by executing the executable instructions.
进一步的,本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本公开任一实施例中所述的方法。Furthermore, an embodiment of the present disclosure also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.
进一步的,本公开实施例还提供了一种计算机程序产品,其包括计算机程序,当该计算机程序被运行时执行本公开任一实施例中所述的方法。Furthermore, an embodiment of the present disclosure also provides a computer program product, which includes a computer program. When the computer program is executed, the method described in any embodiment of the present disclosure is executed.
需要说明的是,上述模块/单元作为装置的一部分可以在诸如一组计算机可执行指令的计算机系统中执行。It should be noted that the above modules/units as part of the device can be executed in a computer system such as a set of computer executable instructions.
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
下面参照图11来描述根据本公开的这种实施方式的电子设备1100。图11显示的电子设备1100仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。The electronic device 1100 according to this embodiment of the present disclosure is described below with reference to Fig. 11. The electronic device 1100 shown in Fig. 11 is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present disclosure.
如图11所示,电子设备1100以通用计算设备的形式表现。电子设备1100的组件可以包括但不限于:至少一个处理单元1110、至少一个存储单元1120、连接不同系统组件(包括存储单元1120和处理单元1110)的总线1130。As shown in Fig. 11, the electronic device 1100 is in the form of a general computing device. The components of the electronic device 1100 may include but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and a bus 1130 connecting different system components (including the storage unit 1120 and the processing unit 1110).
其中,存储单元1120存储有程序代码,所述程序代码可以被所述处理单元1110执行,使得所述处理单元1110执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。The storage unit 1120 stores program codes, which can be executed by the processing unit 1110, so that the processing unit 1110 executes the steps described in the above “Exemplary Method” section of this specification according to various exemplary embodiments of the present disclosure.
存储单元1120可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)11201和/或高速缓存存储单元11202,还可以进一步包括只读存储单元(ROM)11203。The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 11201 and/or a cache storage unit 11202 , and may further include a read-only storage unit (ROM) 11203 .
存储单元1120还可以包括具有一组(至少一个)程序模块11205的程序/实用工具11204,这样的程序模块11205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The storage unit 1120 may also include a program/utility 11204 having a set (at least one) of program modules 11205, such program modules 11205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
总线1130可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。Bus 1130 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
电子设备1100也可以与一个或多个外部设备1140(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备1100交互的设备通信,和/或与使得该电子设备1100能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口1150进行。并且,电子设备1100还可以通过网络适配器1160与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器1160通过总线1130与电子设备1100的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备1100使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The electronic device 1100 may also communicate with one or more external devices 1140 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and/or communicate with any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input/output (I/O) interface 1150. In addition, the electronic device 1100 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and/or public networks, such as the Internet) through a network adapter 1160. As shown, the network adapter 1160 communicates with other modules of the electronic device 1100 through a bus 1130. It should be understood that, although not shown in the figure, other hardware and/or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
本公开中的计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
在本公开中,计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
可选地,计算机可读存储介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
在具体实施时,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。In specific implementations, program codes for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" or similar programming languages. The program codes may be executed entirely on the user computing device, partially on the user computing device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化。Other embodiments of the disclosure will be readily apparent to those skilled in the art after consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure.
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411296498.0A CN118827797B (en) | 2024-09-14 | 2024-09-14 | Scheduling method and related equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411296498.0A CN118827797B (en) | 2024-09-14 | 2024-09-14 | Scheduling method and related equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118827797A true CN118827797A (en) | 2024-10-22 |
CN118827797B CN118827797B (en) | 2024-12-27 |
Family
ID=93077019
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202411296498.0A Active CN118827797B (en) | 2024-09-14 | 2024-09-14 | Scheduling method and related equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118827797B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108173976A (en) * | 2016-12-07 | 2018-06-15 | 腾讯科技(深圳)有限公司 | Domain name analytic method and device |
CN109218457A (en) * | 2017-07-06 | 2019-01-15 | 腾讯科技(深圳)有限公司 | network data processing method, device and system |
CN109446445A (en) * | 2018-10-23 | 2019-03-08 | 乐蜜有限公司 | A kind of resource acquiring method and device |
CN112702425A (en) * | 2020-12-22 | 2021-04-23 | 杭州易安联科技有限公司 | WEB application access agent method, device and system based on domain name extensive resolution |
CN116248632A (en) * | 2022-12-30 | 2023-06-09 | 天翼云科技有限公司 | A file acquisition method, device, system and equipment, medium and product |
US20240106793A1 (en) * | 2022-09-26 | 2024-03-28 | Beijing Youzhuju Network Technology Co., Ltd. | Traffic scheduling method, apparatus and system, terminal device and readable storage medium |
CN117938808A (en) * | 2024-03-21 | 2024-04-26 | 北京火山引擎科技有限公司 | Domain name resolution method, system, device, equipment and medium for edge computing |
WO2024160193A1 (en) * | 2023-02-03 | 2024-08-08 | 北京有竹居网络技术有限公司 | Cdn network request scheduling method and apparatus, electronic device, and storage medium |
-
2024
- 2024-09-14 CN CN202411296498.0A patent/CN118827797B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108173976A (en) * | 2016-12-07 | 2018-06-15 | 腾讯科技(深圳)有限公司 | Domain name analytic method and device |
CN109218457A (en) * | 2017-07-06 | 2019-01-15 | 腾讯科技(深圳)有限公司 | network data processing method, device and system |
CN109446445A (en) * | 2018-10-23 | 2019-03-08 | 乐蜜有限公司 | A kind of resource acquiring method and device |
CN112702425A (en) * | 2020-12-22 | 2021-04-23 | 杭州易安联科技有限公司 | WEB application access agent method, device and system based on domain name extensive resolution |
US20240106793A1 (en) * | 2022-09-26 | 2024-03-28 | Beijing Youzhuju Network Technology Co., Ltd. | Traffic scheduling method, apparatus and system, terminal device and readable storage medium |
CN116248632A (en) * | 2022-12-30 | 2023-06-09 | 天翼云科技有限公司 | A file acquisition method, device, system and equipment, medium and product |
WO2024160193A1 (en) * | 2023-02-03 | 2024-08-08 | 北京有竹居网络技术有限公司 | Cdn network request scheduling method and apparatus, electronic device, and storage medium |
CN117938808A (en) * | 2024-03-21 | 2024-04-26 | 北京火山引擎科技有限公司 | Domain name resolution method, system, device, equipment and medium for edge computing |
Also Published As
Publication number | Publication date |
---|---|
CN118827797B (en) | 2024-12-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11758013B2 (en) | Methods and systems for caching data communications over computer networks | |
US9608957B2 (en) | Request routing using network computing components | |
US10601769B2 (en) | Mapping between classical URLs and ICN networks | |
US9628554B2 (en) | Dynamic content delivery | |
US8156243B2 (en) | Request routing | |
US20100115613A1 (en) | Cacheable Mesh Browsers | |
CN102984223B (en) | A kind of message method, the network equipment and system | |
WO2021104458A1 (en) | Domain name query method and related device | |
JP2017500679A (en) | Media resource feedback method, apparatus, program, and recording medium | |
CN110392069B (en) | CDN service scheduling processing method and CDN server | |
CN118827797B (en) | Scheduling method and related equipment | |
US20200402115A1 (en) | Serving an Online Advertisement Asynchronously | |
WO2016074148A1 (en) | Method and system for domain name load balancing | |
CN103166928A (en) | A method, system and DNS authoritative server for providing information service |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |