Content resource acquisition method and device based on content distribution network, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-10
- Publication Date
- 2026-08-11
AI Technical Summary
而访问上层节点会带来带宽成本的升高,影响内容分发网络的服务成本
[0009]本申请实施例还提供一种存储有计算机程序的计算机可读存储介质,当计算机程序被处理器执行时,致使处理器能够实现基于内容分发网络的内容资源获取方法中的步骤。
Smart Images

Figure CN116389773B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, device and storage medium for acquiring content resources based on a content delivery network. Background Technology
[0002] A Content Delivery Network (CDN) distributes content resources from the origin server to edge nodes in various locations. By relying on these edge nodes, users can access the content resources they need from the nearest location, reducing network congestion and improving the response speed and hit rate of user access.
[0003] In practical applications, when edge nodes do not cache the content resources requested by users, they access the upper-layer nodes to obtain these resources. Sometimes, the upper-layer nodes even need to send requests back to the origin server to retrieve the requested content resources. Accessing upper-layer nodes increases bandwidth costs and impacts the service costs of the content delivery network. Summary of the Invention
[0004] This application provides a method, device, and storage medium for acquiring content resources based on a content delivery network, which can effectively control the bandwidth cost of the content delivery network and effectively reduce the service cost of the content delivery network.
[0005] This application provides a method for acquiring content resources based on a content delivery network. In response to an access policy acquisition request sent by a first edge node when a resource requesting end requests to acquire target content resources, the method determines the access popularity level of the target content resources; generates an access policy based on the access popularity level of the target content resources, the access policy indicating whether to acquire the target content resources through the first edge node or a second edge node; and returns the access policy to the first edge node so that the first edge node acquires the target content resources and returns them to the resource requesting end, or the first edge node notifies the resource requesting end to acquire the target content resources through the second edge node.
[0006] This application also provides a method for acquiring content resources based on a content delivery network. In response to a first access request sent by a resource requester to acquire target content resources, an access policy acquisition request is sent; an access policy returned in response to the access policy acquisition request is received, wherein the access policy is used to indicate that the target content resources are acquired through a first edge node or a second edge node; the target content resources are acquired according to the access policy and returned to the resource requester, or the resource requester is notified to acquire the target content resources through a second edge node.
[0007] This application also provides a method for acquiring content resources based on a content delivery network, comprising: sending a first access request to a first single-line edge node, the first access request being used to request the acquisition of target content resources; receiving the target content resources returned by the first single-line edge node; or receiving the IP address of a second single-line edge node returned by the first single-line edge node; sending a second access request to the second single-line edge node based on the IP address of the second single-line edge node, the second access request being used to request the acquisition of target content resources; receiving the target content resources returned by the second single-line edge node; or receiving the IP address of a first multi-line edge node returned by the first single-line edge node; sending a third access request to the first multi-line edge node based on the IP address of the first multi-line edge node, the third access request being used to request the acquisition of target content resources; and receiving the target content resources returned by the first multi-line edge node.
[0008] This application also provides an electronic device, including: a memory and a processor; the memory for storing a computer program; and the processor coupled to the memory for executing the computer program to perform steps in a content resource acquisition method based on a content delivery network.
[0009] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in a content resource acquisition method based on a content delivery network.
[0010] In this embodiment, when a resource requester requests content resources from any edge node, the edge node does not directly retrieve the content resources and return them to the requester. Instead, based on the access popularity level of the content resources, appropriate edge nodes are scheduled to retrieve the content resources and return them to the requester. This increases the probability of edge nodes successfully retrieving content resources, significantly increases the access hit rate of edge nodes, reduces the frequency of accessing upper-layer nodes, effectively controls the bandwidth cost of the content delivery network, and effectively reduces the service cost of the content delivery network. Furthermore, the resource requester does not need to distinguish which edge nodes retrieved the content resources, reducing the modification cost of the resource requester. Attached Figure Description
[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0012] Figure 1 An exemplary application scenario diagram provided for an embodiment of this application;
[0013] Figure 2A flowchart illustrating a content resource acquisition method based on a content delivery network, provided in an embodiment of this application;
[0014] Figure 3 A flowchart illustrating another content resource acquisition method based on a content delivery network provided in this application embodiment;
[0015] Figure 4 Signaling interaction diagram of a content resource acquisition method based on a content delivery network provided in an embodiment of this application;
[0016] Figure 5 A flowchart illustrating another content resource acquisition method based on a content delivery network provided in this application embodiment;
[0017] Figure 6 A flowchart illustrating another content resource acquisition method based on a content delivery network provided in this application embodiment;
[0018] Figure 7 A flowchart illustrating another content resource acquisition method based on a content delivery network provided in this application embodiment;
[0019] Figure 8 This is a schematic diagram of the structure of a content resource access device provided in an embodiment of this application;
[0020] Figure 9 A schematic diagram of another content resource access device provided in an embodiment of this application;
[0021] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] In the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the access relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates that the preceding and following associated objects have an "or" relationship. Furthermore, in the embodiments of this application, "first," "second," "third," etc., are only used to distinguish the content of different objects and have no other special meaning.
[0024] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0025] In practical applications, when edge nodes do not cache the content resources requested by users, they access the upper-layer nodes to obtain these resources. Sometimes, the upper-layer nodes even need to send requests back to the origin server to retrieve the requested content resources. Accessing upper-layer nodes increases bandwidth costs and impacts the service costs of the content delivery network.
[0026] Therefore, this application provides a method, device, and storage medium for acquiring content resources based on a content delivery network (CDN). In this embodiment, when a resource requester requests content resources from any edge node, the edge node does not directly acquire the content resources and return them to the requester. Instead, appropriate edge nodes are scheduled to acquire the content resources and return them to the requester based on their access frequency. This increases the probability of edge nodes successfully acquiring content resources, significantly increases the hit rate of edge node access, reduces the frequency of accessing upper-layer nodes, effectively controls the bandwidth cost of the CDN, and effectively reduces the service cost of the CDN. Furthermore, the requester does not need to distinguish which edge nodes should acquire the content resources, reducing the modification cost of the requester.
[0027] Figure 1 This is an exemplary application scenario diagram provided for an embodiment of this application. See also... Figure 1A content delivery network (CDN) comprises at least one single-line edge node, at least one multi-line edge node, and at least one upper-layer node. A single-line edge node can access a single operator's network, while a multi-line edge node can access multiple operator networks. In other words, the distinction between single-line and multi-line edge nodes is based on the number of operator networks they connect to. Single-line or multi-line edge nodes can access upper-layer nodes, and upper-layer nodes can access the origin server. Essentially, upper-layer nodes are nodes positioned between the edge nodes and the origin server within the CDN. Single-line, multi-line, and upper-layer nodes cache various content resources, including but not limited to: video data, audio data, text data, image data, application installation packages, or compressed data packages.
[0028] In practical applications, the resource requesting end requests the Domain Name System (DNS) to perform domain name resolution and obtain the IP (Internet Protocol) address of the single-line edge node to be accessed. Based on the IP address resolved by the DNS, the resource requesting end sends an access request to the corresponding single-line edge node to obtain the content resource. For example, the resource requesting end sends an access request for content resource 'a' to single-line edge node 1 based on the IP address of single-line edge node 1; the resource requesting end sends an access request for content resource 'b' to single-line edge node 2 based on the IP address of single-line edge node 2; and the resource requesting end sends an access request for content resource 'c' to single-line edge node 3 based on the IP address of single-line edge node 3. When any single-line edge node receives an access request for content resource from the resource requesting end, the single-line edge node queries the scheduling center system for the access policy of the required content resource. The scheduling center system determines the access popularity level of each content resource based on the statistical results of the access frequency of each content resource; and sets a corresponding access policy for each content resource based on its access popularity level.
[0029] For example, the access popularity levels are ranked from highest to lowest as follows: first access popularity level, second access popularity level, and third access popularity level. The access policy for content resources belonging to the first access popularity level indicates that the single-line edge node receiving the access request from the resource requester can acquire the content resource locally. The access policy for content resources belonging to the second access popularity level can be redirected to a designated single-line edge node, so that the designated single-line edge node can respond to the resent access request from the resource requester and acquire the content resource locally at the designated single-line edge node. The access policy for content resources belonging to the third access popularity level can be redirected to a designated multi-line edge node, so that the designated multi-line edge node can respond to the resent access request from the resource requester and acquire the content resource locally at the designated multi-line edge node.
[0030] For example, content resource c belongs to the highest access popularity level, meaning it has the highest access popularity. When the resource requesting end sends an access request to single-line edge node 3 to obtain content resource c, the access path for content resource c is: single-line edge node 3 - upper-layer node 1 - origin server. First, single-line edge node 3 tries to obtain content resource c locally. This process may or may not succeed. If single-line edge node 3 stores content resource c locally, it can successfully obtain it and returns it to the resource requesting end. If single-line edge node 3 does not store content resource c locally, it fails to obtain it locally and sends an access request to upper-layer node 1 via the public network. Upper-layer node 1 then obtains content resource c. If upper-layer node 1 successfully obtains content resource c locally, it returns it to the resource requesting end through single-line edge node 3. If the upper-layer node 1 fails to retrieve content resource c locally, it sends a request for content resource c back to the origin server. The content resource c returned by the origin server is then sent to the resource requesting end via upper-layer node 1 and single-line edge node 3.
[0031] Content resource 'a' belongs to the second-highest access popularity level, meaning its access popularity is the second highest. When the resource requesting end sends an access request to single-line edge node 1 to obtain content resource 'a', the access link for content resource 'a' is: single-line edge node 1 - single-line edge node 3 - upper-layer node 2 - origin server. First, when the resource requesting end sends the access request to single-line edge node 1, single-line edge node 1 returns the IP address of single-line edge node 3 to the resource requesting end, so that the resource requesting end can initiate an access request to single-line edge node 3 to obtain content resource 'a' based on the IP address of single-line edge node 3. If single-line edge node 3 successfully obtains content resource 'a' locally, single-line edge node 3 returns content resource 'a' to the resource requesting end. If single-line edge node 3 fails to obtain content resource 'a' locally, then single-line edge node 3 sends an access request to upper-layer node 2 via the public network (i.e., the external network). If upper-layer node 2 successfully obtains content resource 'a' locally, upper-layer node 2 returns content resource 'a' to the resource requesting end through single-line edge node 3. If upper-layer node 2 fails to retrieve content resource 'a' locally, it requests a response from the origin server for content resource 'a'. The content resource 'a' returned by the origin server is then sent to the resource-requesting end via upper-layer node 2 and single-line edge node 3. It is worth noting that... Figure 1Taking a single-line edge node 3 accessing an upper-layer node via the public network as an example, in practical applications, if there is an upper-layer node on the same internal network as the single-line edge node 3, the single-line edge node 3 sends an access request to that upper-layer node to obtain content resources via the internal network. Compared to accessing upper-layer nodes via the external network, accessing upper-layer nodes via the internal network significantly reduces the bandwidth cost of the content delivery network.
[0032] Content resource 'b' belongs to the third access popularity level, meaning it has the lowest access popularity. When the resource requesting end sends an access request to single-line edge node 2 to obtain content resource 'b', the access path for content resource 'b' is: single-line edge node 2 - multi-line edge node 1 - upper-layer node 1 - origin server. First, when the resource requesting end sends the access request to single-line edge node 2, single-line edge node 2 returns the IP address of multi-line edge node 1 to the resource requesting end, so that the resource requesting end can initiate an access request to multi-line edge node 1 to obtain content resource 'b' based on the IP address of multi-line edge node 1. Multi-line edge node 1 obtains content resource 'b' locally. The acquisition of content resource 'b' by multi-line edge node 1 may be successful or unsuccessful. If multi-line edge node 1 has content resource 'b' stored locally, and successfully obtains content resource 'b' locally, multi-line edge node 1 returns content resource 'b' to the resource requesting end. If multi-line edge node 1 does not store content resource b locally, it will fail to retrieve content resource b locally. In this case, multi-line edge node 1 sends an access request for content resource b to upper-layer node 1 via the intranet (i.e., local area network). If upper-layer node 1 successfully retrieves content resource b locally, it returns content resource b to the resource requesting end through multi-line edge node 1. If upper-layer node 1 fails to retrieve content resource b locally, it requests a request for content resource b from the origin server. The content resource b returned by the origin server is then sent to the resource requesting end via upper-layer node 1 and multi-line edge node 1. It is worth noting that... Figure 1 Taking the example of multi-line edge node 1 accessing an upper-layer node via the intranet, in practical applications, if there is no upper-layer node on the same intranet as multi-line edge node 1, to ensure the reliability of intranet resource acquisition, multi-line edge node 1 also sends access requests for content resources to the upper-layer node via the external network. Accessing upper-layer nodes via the intranet, compared to accessing them via the external network, significantly reduces the bandwidth cost of the content delivery network.
[0033] In this embodiment, each node in the resource demand side, scheduling center system, and content delivery network can be a terminal device or a server. The terminal device or server can be hardware or software. When the terminal device is hardware, it can be, for example, a mobile phone, tablet computer, desktop computer, wearable smart device, smart home device, etc. When the terminal device is software, it can be installed on the aforementioned hardware devices. In this case, the terminal device can be, for example, multiple software modules or a single software module; this embodiment is not limited. The server can also be hardware or software. When the server is hardware, it can be a single server or a distributed server cluster composed of multiple servers. When the server is software, it can be multiple software modules or a single software module; this embodiment is not limited.
[0034] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0035] Figure 2 A flowchart illustrating a content resource acquisition method based on a content delivery network, provided as an embodiment of this application. See also... Figure 2 The method may include the following steps:
[0036] 201. In response to the access policy retrieval request sent by the first edge node when requesting to obtain the target content resource on the resource demand side, determine the access popularity level of the target content resource.
[0037] 202. Generate an access policy based on the access popularity level of the target content resource. The access policy is used to indicate whether the target content resource is obtained through the first edge node or the second edge node.
[0038] 203. Return the access policy to the first edge node so that the first edge node can obtain the target content resource and return it to the resource requester, or the first edge node can notify the resource requester to obtain the target content resource through the second edge node.
[0039] In this embodiment, the content delivery network includes one or more edge nodes. All edge nodes in the content delivery network can be single-line edge nodes or multi-line edge nodes, or some edge nodes in the content delivery network can be single-line edge nodes and some edge nodes can be multi-line edge nodes. There is no limitation on this.
[0040] In this embodiment, the resource requester can request content resources from any edge node in the content delivery network. For ease of distinction and understanding, the edge node requested by the resource requester is referred to as the first edge node, and the content resource requested by the resource requester is referred to as the target content resource. For example, the resource requester extracts the domain name from the URL (Uniform Resource Locator) of the content resource to be accessed, resolves the extracted domain name using the Domain Name System (DNS), and obtains the IP address of the first edge node. The resource requester then sends a first access request to the first edge node to obtain the target content resource based on the first edge node's IP address, thereby requesting the target content resource from the first edge node.
[0041] When a resource requesting end requests a target content resource from a first edge node, the first edge node does not directly retrieve the target content resource locally and return it to the resource requesting end. Instead, it first retrieves the access policy for the target content resource, retrieves the target content resource according to the access policy, and returns it to the resource requesting end. Specifically, when a resource requesting end requests a target content resource, the first edge node can send an access policy retrieval request to the entity responsible for generating the access policy, in order to obtain the access policy for the target content resource from that entity. For ease of understanding and distinction, the entity responsible for generating the access policy is referred to as the scheduling center system. The scheduling center system responds to the access policy retrieval request sent by the first edge node when requesting a target content resource from the resource requesting end, determining the access popularity level of the target content resource.
[0042] In this embodiment, the scheduling center system can determine the access popularity level of a target content resource in real time based on the number of times it is accessed. Optionally, to efficiently determine the access popularity level of a target content resource, the scheduling center system can determine the correspondence between content resources and access popularity levels in real time or in advance. For ease of understanding and distinction, the correspondence between content resources and access popularity levels is referred to as the first correspondence. Therefore, when determining the access popularity level of a target content resource, the scheduling center system queries the first correspondence to obtain the access popularity level of the target content resource.
[0043] In practical applications, for any content resource distributed from the origin server to various nodes in the content delivery network, each additional access increases the corresponding access count by one. The scheduling center system can determine the access count of each content resource in real time, periodically, or periodically, and determine the access popularity level of each content resource based on its access count. A primary correspondence is established between content resources and access popularity levels based on these access popularity levels. For example, the access popularity levels are arranged in descending order as first access popularity level, second access popularity level, and third access popularity level. The access count corresponding to the first access popularity level is greater than the first access count; the access count corresponding to the second access popularity level is greater than the second access count but less than or equal to the first access count; the access count corresponding to the third access popularity level is less than or equal to the second access count; wherein, the first access count is greater than the second access count.
[0044] In this embodiment, the scheduling center system generates an access policy based on the access popularity level of the target content resource. The access policy instructs whether the target content resource is accessed through a first edge node or a second edge node. The second edge node is an edge node different from the first edge node. The content resources are ordered from highest to lowest access popularity, in the order of first edge node and second edge node. That is, the first edge node accesses content resources with higher access popularity, and the second edge node accesses content resources with lower access popularity.
[0045] Specifically, if the access popularity level is high, it means that the target content resource is accessed frequently (i.e., the access popularity is high). Most edge nodes in the content delivery network have a high probability of having obtained the target content resource in the historical time period. Any edge node that receives a request from a resource requesting end to obtain the target content resource has a high probability of successfully obtaining the target content resource locally. In this case, the first edge node can be scheduled to obtain the target content resource with a high access popularity level. The access policy generated by the scheduling center system is used to instruct the first edge node to obtain the target content resource.
[0046] If the access popularity level is high, it indicates that the target content resource is accessed relatively infrequently (i.e., with low access popularity). This means that most edge nodes in the content delivery network have a low probability of having acquired the target content resource within a historical timeframe. Furthermore, the probability of any edge node receiving a request from a resource requester successfully acquiring the target content resource locally is low. In this case, a suitable second edge node can be scheduled to acquire the target content resource with a lower access popularity level. The access policy generated by the scheduling center system is used to instruct the acquisition of the target content resource through the second edge node.
[0047] In this embodiment, the scheduling center system returns access policies to the first edge node. Different access policies result in different access paths for the target content resources. Specifically, if the access policy indicates that the target content resource is obtained through the first edge node, the access path is: first edge node - upper-layer node - origin server. If the first edge node successfully obtains the target content resource locally, it returns the target content resource to the resource requesting end. If the first edge node fails to obtain the target content resource locally, it requests the upper-layer node to obtain the target content resource through the public network or intranet. If the upper-layer node successfully obtains the target content resource locally, the target content resource passes through the upper-layer node and the first edge node sequentially until it is delivered to the resource requesting end. If the upper-layer node fails to obtain the target content resource locally, it requests the origin server to obtain the target content resource provided by the origin server. The target content resource provided by the origin server passes through the origin server, upper-layer node, and first edge node sequentially until it is delivered to the resource requesting end. It is worth noting that prioritizing obtaining the target content resource locally through the first edge node can reduce the frequency of accessing the upper-layer node and reduce bandwidth costs. Even if the first edge node fails to obtain the target content resource locally, it can still request the target content resource from the upper-layer node or even the origin server, thus improving the reliability of content resource acquisition.
[0048] If the access policy instructs that the target content resource be obtained through a second edge node, the first edge node sends the IP address of the second edge node to the resource requester. The resource requester then requests the target content resource from the second edge node based on the IP address of the second edge node. Optionally, to accurately instruct the resource requester to obtain the content resource from a new edge node, the first edge node sends a notification to the resource requester informing them that the resource requester is obtaining the target content resource through the second edge node. This notification includes the IP address of the second edge node. The resource requester then requests the target content resource from the second edge node based on the IP address of the second edge node in the notification.
[0049] For scenarios where target content resources are obtained through a second edge node, the access path is: second edge node - upper-layer node - origin server. If the second edge node successfully obtains the target content resource locally, it returns the resource to the requesting end. If the second edge node fails to obtain the target content resource locally, it requests the upper-layer node to obtain the resource via the public or internal network. If the upper-layer node successfully obtains the target content resource locally, the resource passes through the upper-layer node and the second edge node sequentially until it is delivered to the requesting end. If the upper-layer node fails to obtain the target content resource locally, it requests the origin server to obtain the target content resource provided by the origin server. The resource provided by the origin server passes through the origin server, the upper-layer node, and the second edge node sequentially until it is delivered to the requesting end. It is worth noting that prioritizing obtaining the target content resource locally through the second edge node reduces the frequency of accessing the upper-layer node, lowering bandwidth costs. Even if the second edge node fails to obtain the target content resource locally, it can still request it from the upper-layer node or even the origin server, improving the reliability of content resource acquisition.
[0050] It is worth noting that when an edge node requests a target content resource from an upper-layer node, if there is an upper-layer node on the same intranet (i.e., local area network) as the source node, the edge node requests the target content resource from the upper-layer node through the intranet. Compared to edge nodes accessing upper-layer nodes through the public network, accessing upper-layer nodes through the intranet significantly reduces the bandwidth cost of the content delivery network.
[0051] The technical solution provided in this application embodiment does not directly retrieve and return content resources from any edge node when the resource requesting end requests them. Instead, it schedules appropriate edge nodes to retrieve and return content resources based on their access popularity levels. This increases the probability of edge nodes successfully retrieving content resources, significantly increases their access hit rate, reduces the frequency of accessing upper-layer nodes, effectively controls the bandwidth cost of the content delivery network, and effectively reduces the service cost of the content delivery network. Furthermore, it eliminates the need for the resource requesting end to distinguish which edge nodes retrieved the content resources, reducing the modification costs for the resource requesting end.
[0052] Optionally, to more effectively control the bandwidth cost of the content delivery network (CDN) and reduce its service cost, the resource requesting party first requests content resources from a single-line edge node. The scheduling center system then determines a suitable single-line or multi-line edge node based on the access popularity level of the content resources, and acquires the content resources through the determined single-line or multi-line edge node. For cases where the CDN includes both single-line and multi-line edge nodes, this application embodiment also provides a method for acquiring content resources based on the CDN.
[0053] Figure 3 A flowchart illustrating another method for acquiring content resources based on a content delivery network, provided as an embodiment of this application. See also... Figure 3 The method may include the following steps:
[0054] 301. In response to the access policy retrieval request sent by the first single-line edge node when requesting to obtain the target content resource on the resource demand side, determine the access popularity level of the target content resource.
[0055] 302. Generate an access strategy based on the access popularity level of the target content resource. The access strategy is used to indicate how to obtain the target content resource through the target edge node. The target edge node is any one of the first single-line edge node, the second single-line edge node, or the first multi-line edge node.
[0056] 303. Return the access strategy to the first single-line edge node so that the first single-line edge node can obtain the target content resource and return it to the resource requester, or the first single-line edge node can notify the resource requester to obtain the target content resource through the second single-line edge node or the first multi-line edge node.
[0057] In this embodiment, the resource requester can request content resources from any single-line edge node in the content delivery network. For ease of distinction and understanding, the single-line edge node requested by the resource requester is referred to as the first single-line edge node, and the content resource requested by the resource requester is referred to as the target content resource. For example, the resource requester extracts the domain name from the URL (Uniform Resource Locator) of the content resource to be accessed, resolves the extracted domain name using the Domain Name System (DNS), and obtains the IP address of the first single-line edge node. The resource requester sends a first access request to the first single-line edge node to obtain the target content resource based on the IP address of the first single-line edge node, thereby requesting the target content resource from the first single-line edge node.
[0058] When a resource requesting end requests a target content resource from the first single-line edge node, the first single-line edge node does not directly retrieve the target content resource locally and return it to the resource requesting end. Instead, it first retrieves the access policy for the target content resource, retrieves the target content resource according to the access policy, and returns it to the resource requesting end. Specifically, when the resource requesting end requests a target content resource, the first single-line edge node can send an access policy retrieval request to the entity responsible for generating the access policy, in order to obtain the access policy for the target content resource from that entity. For ease of understanding and distinction, the entity responsible for generating the access policy is referred to as the scheduling center system. The scheduling center system responds to the access policy retrieval request sent by the first single-line edge node when requesting a target content resource from the resource requesting end, determining the access popularity level of the target content resource.
[0059] In this embodiment, the scheduling center system can determine the access popularity level of a target content resource in real time based on the number of times it is accessed. Optionally, to efficiently determine the access popularity level of a target content resource, the scheduling center system can determine the correspondence between content resources and access popularity levels in real time or in advance. For ease of understanding and distinction, the correspondence between content resources and access popularity levels is referred to as the first correspondence. Therefore, when determining the access popularity level of a target content resource, the scheduling center system queries the first correspondence to obtain the access popularity level of the target content resource.
[0060] In practical applications, for any content resource distributed from the origin server to various nodes in the content delivery network, each additional access increases the corresponding access count by one. The scheduling center system can determine the access count of each content resource in real time, periodically, or periodically, and determine the access popularity level of each content resource based on its access count. A primary correspondence is established between content resources and access popularity levels based on these access popularity levels. For example, the access popularity levels are arranged in descending order as first access popularity level, second access popularity level, and third access popularity level. The access count corresponding to the first access popularity level is greater than the first access count; the access count corresponding to the second access popularity level is greater than the second access count but less than or equal to the first access count; the access count corresponding to the third access popularity level is less than or equal to the second access count; wherein, the first access count is greater than the second access count.
[0061] In this embodiment, the access popularity level of the target content resource can be any one of the first access popularity level, the second access popularity level, and the third access popularity level. Different access popularity levels correspond to different access strategies.
[0062] In this embodiment, the target edge node is one of a first single-line edge node, a second single-line edge node, or a first multi-line edge node. Different target edge nodes allow different access popularity levels of content resources. The content resources are ordered from highest to lowest access popularity level as follows: first single-line edge node, second single-line edge node, and first multi-line edge node. That is, the first single-line edge node can access the most popular content resources, the second single-line edge node can access the second most popular content resources, and the first multi-line edge node can access the least popular content resources.
[0063] In this embodiment, appropriate edge nodes are prioritized to acquire the target content resource based on its access popularity level. If the target content resource has the highest access popularity level, the single-line edge node (i.e., the first single-line edge node) that receives the access request from the resource requesting end acquires the target content resource. If the target content resource has the second highest access popularity level, the single-line edge node (i.e., the second single-line edge node) that is pre-configured to acquire the content resource with the second highest access popularity level acquires the target content resource. If the target content resource has the lowest access popularity level, the multi-line edge node (i.e., the first multi-line edge node) that is pre-configured to acquire the content resource with the lowest access popularity level acquires the target content resource.
[0064] In this embodiment, if the access popularity level of the target content resource is the first access popularity level, a first access strategy is generated. The first access strategy is used to indicate that the target content resource is obtained through the first single-line edge node.
[0065] Specifically, when the target content resource belongs to the highest access popularity level, its high access popularity indicates that it has been frequently accessed by most single-line edge nodes in the content delivery network (CDN) during the historical period. The probability that the first single-line edge node successfully acquires the target content resource locally is high, and it can directly acquire the target content resource locally. If the first single-line edge node successfully acquires the target content resource locally, it returns the target content resource to the resource requesting end. If the first single-line edge node fails to acquire the target content resource locally, it can send an access request to an upper-layer node in the CDN via the public or internal network. If the corresponding upper-layer node successfully acquires the target content resource locally, it will sequentially pass the target content resource to the first single-line edge node and then to the resource requesting end until the resource requesting end receives the returned target content resource. If the corresponding upper-layer node fails to acquire the target content resource locally, it will request the origin server to retrieve the target content resource provided by the origin server. The target content resource provided by the origin server is sequentially transmitted to the corresponding upper-layer node, the first single-line edge node, and the resource requesting end, until the resource requesting end receives the returned target content resource. If the origin server does not provide the target content resource, an access failure message is generated, and the origin server sequentially transmits the access failure message to the corresponding upper-layer node, the first single-line edge node, and the resource requesting end, until the resource requesting end receives the returned access failure message.
[0066] In this embodiment, if the access popularity level of the target content resource is the second access popularity level, a second access strategy is generated. The second access strategy is used to indicate that the target content resource is obtained through the second single-line edge node.
[0067] Specifically, when the target content resource belongs to the second access popularity level, its high access popularity indicates that the access frequency is generally low. Therefore, the probability of a pre-configured single-line edge node that prioritizes accessing content resources with low access frequency successfully accessing the target content resource is relatively high. In this case, the target content resource can be obtained through the second single-line edge node. The second single-line edge node is obtained by querying a pre-determined correspondence between the representation hash result and the single-line edge node. For ease of understanding and distinction, this correspondence is referred to as the second correspondence. The second correspondence indicates the single-line edge node corresponding to the hash result obtained by hashing the URI (Uniform Resource Identifier) of the content resource; that is, the corresponding content resource is preferentially obtained through the corresponding single-line edge node. Further optional, in order to accurately determine the access strategy, as an example, the URIs of each content resource provided by the origin site are hashed to obtain the hash results corresponding to each content resource; each content resource is assigned a corresponding single-line edge node; and a second correspondence between the hash results and the single-line edge nodes is established based on the hash results and single-line edge nodes corresponding to each content resource.
[0068] In this embodiment, the scheduling center system first obtains the URI of the target content resource. Based on the URI of the target content resource and a second correspondence, it can determine the second single-line edge node that can access the target content resource. A second access policy is generated based on the IP (Internet Protocol) address of the second single-line edge node. To accurately determine the access policy, as an optional implementation, generating the second access policy to instruct access to the target content resource through the second single-line edge node includes: querying a pre-established second correspondence based on the target hash result corresponding to the target content resource's URI to determine the second single-line edge node corresponding to the target hash result; obtaining the IP address of the second single-line edge node; and generating a second access policy including the IP address of the second single-line edge node. The second access policy instructs the resource requester to request access to the target content resource from the second single-line edge node based on its IP address.
[0069] In practical applications, the second single-line edge node may successfully acquire the target content resource locally, or it may fail to acquire it locally. In some optional embodiments, to ensure the reliability of content resource access, the second access policy further instructs the second single-line edge node to request the target content resource from the first upper-layer node via the public network or intranet if it fails to acquire the target content resource locally. It is worth noting that when the second single-line edge node requests the target content resource from the first upper-layer node, if there is a first upper-layer node located on the same intranet (i.e., local area network) as the source node, the second single-line edge node requests the target content resource from the first upper-layer node via the intranet. Compared to accessing the first upper-layer node via the public network, accessing the first upper-layer node via the intranet significantly reduces the bandwidth cost of the content delivery network.
[0070] In this embodiment, the first upper-layer node is one of multiple upper-layer nodes. If the second single-line edge node fails to acquire the target content resource locally, it sends an access request to the first upper-layer node to acquire the target content resource. The first upper-layer node responds to the access request and acquires the target content resource locally. If the first upper-layer node successfully acquires the target content resource locally, it sequentially transmits the target content resource to the second single-line edge node and the resource requesting end until the resource requesting end receives the returned target content resource. If the first upper-layer node fails to acquire the target content resource locally, it sends a request back to the origin server. If the origin server has the target content resource, it sequentially transmits the target content resource to the first upper-layer node, the second single-line edge node, and the resource requesting end until the resource requesting end receives the returned target content resource. If the origin server does not have the target content resource, it generates an access failure message, which it sequentially transmits to the first upper-layer node, the second single-line edge node, and the resource requesting end until the resource requesting end receives the returned access failure message.
[0071] In this embodiment, if the access popularity level of the target content resource is the third access popularity level, a third access strategy is generated. The third access strategy is used to indicate that the target content resource is obtained through the first multi-line edge node.
[0072] Specifically, when the target content resource belongs to the third access popularity level, its access popularity is relatively low. Therefore, the multi-line edge node, which is pre-configured to acquire content resources with lower access frequency, has a higher probability of successfully acquiring the target content resource. In this case, the first multi-line edge node can acquire the target content resource. The first multi-line edge node is obtained by querying a pre-determined correspondence between the representation hash result and the multi-line edge node. For ease of understanding and distinction, the correspondence between the representation hash result and the multi-line edge node is called the third correspondence. The third correspondence is used to indicate the multi-line edge node corresponding to the hash result obtained by hashing the URI of the content resource; that is, the corresponding content resource is preferentially accessed through the corresponding multi-line edge node. Further optionally, to accurately determine the access strategy, as an example, the URIs of each content resource provided by the origin server are hashed separately to obtain the hash result corresponding to each content resource; each content resource is assigned its corresponding multi-line edge node; and a third correspondence is established between the hash result and the multi-line edge node based on the hash result and the multi-line edge node corresponding to each content resource.
[0073] In this embodiment, the scheduling center system first obtains the URI of the target content resource. Based on the URI of the target content resource and the third correspondence, it can determine the first multi-line edge node from which the target content resource can be obtained. A third access policy is then generated based on the IP address of the first multi-line edge node. To accurately determine the access policy, as an optional implementation, based on the target hash result corresponding to the URI of the target content resource, a pre-established third correspondence is queried to determine the first multi-line edge node corresponding to the target hash result. The third correspondence is used to characterize the correspondence between the hash result and the multi-line edge node. The IP address of the first multi-line edge node is then obtained. A third access policy including the IP address of the first multi-line edge node is generated. The third access policy instructs the resource requester to request the target content resource from the first multi-line edge node based on its IP address.
[0074] In practical applications, the first multi-line edge node may successfully acquire the target content resource locally, or it may fail to acquire it locally. In some optional embodiments, to ensure the reliability of content resource access, the third access strategy further instructs the first multi-line edge node to request the target content resource from the second upper-layer node via the intranet if it fails to acquire it locally. It is worth noting that setting up multiple upper-layer nodes within the intranet of the multi-line edge node significantly reduces the bandwidth cost of the content delivery network compared to accessing upper-layer nodes via the public network.
[0075] Specifically, the second upper-layer node is one of multiple upper-layer nodes. If the first multi-line edge node fails to acquire the target content resource locally, it requests the target content resource from the second upper-layer node via the internal network. Notably, the second upper-layer node and the first multi-line edge node are on the same local area network, significantly reducing the bandwidth cost of accessing the upper-layer node via the public network. If the second upper-layer node successfully acquires the target content resource locally, it forwards the target content resource sequentially to the first multi-line edge node and the resource requesting end, until the resource requesting end receives the returned target content resource. If the second upper-layer node fails to acquire the target content resource locally, it sends a request back to the origin server. If the origin server has the target content resource, it forwards it sequentially to the second upper-layer node, the first multi-line edge node, and the resource requesting end, until the resource requesting end receives the returned target content resource. If the origin server does not have the target content resource, it generates an access failure message, which it forwards sequentially to the second upper-layer node, the first multi-line edge node, and the resource requesting end, until the resource requesting end receives the returned access failure message.
[0076] In this embodiment, the scheduling center system returns access policies to the first edge node. Different access policies result in different access links for the target content resources. Under the first access policy, the access link is: first single-line edge node - upper-layer node - source station. Under the second access policy, the access link is: first single-line edge node - second single-line edge node - first upper-layer node - source station. Under the third access policy, the access link is: first single-line edge node - first multi-line edge node - second upper-layer node - source station. For an explanation of obtaining content resources according to the access link, please refer to the foregoing content.
[0077] The technical solution provided in this application embodiment does not directly retrieve and return content resources from any single-line edge node when the resource requesting end requests them. Instead, it schedules appropriate single-line or multi-line edge nodes to retrieve and return content resources to the resource requesting end based on the access popularity level of the content resources. This increases the probability of edge nodes successfully retrieving content resources, significantly increases the access hit rate of edge nodes, reduces the frequency of accessing upper-layer nodes, effectively controls the bandwidth cost of the content delivery network, and effectively reduces the service cost of the content delivery network. Furthermore, the resource requesting end does not need to distinguish which edge nodes retrieved the content resources, reducing the modification cost of the resource requesting end.
[0078] To better understand the technical solutions provided in the embodiments of this application, the following uses a content delivery network including single-line edge nodes and multi-line edge nodes as an example to introduce the signaling interaction process of the content resource acquisition method based on the content delivery network.
[0079] Figure 4 This is a signaling interaction diagram of a content resource acquisition method based on a content delivery network provided in an embodiment of this application.
[0080] See Figure 4 The method may include the following steps:
[0081] 401. The resource requesting end sends a first access request to the first single-line edge node to obtain the target content resource.
[0082] 402. The first single-line edge node responds to the first access request by sending an access policy retrieval request to the scheduling center system.
[0083] 403. The dispatch center system responds to the access policy retrieval request and determines the access popularity level of the target content resource.
[0084] 404. The dispatch center system generates an access policy based on the access popularity level of the target content resource. The access policy is used to indicate how to obtain the target content resource through the target edge node.
[0085] 405. The dispatch center system sends the access policy to the first single-line edge node.
[0086] 406. If a first access policy is received, and the first access policy indicates that the target content resource is obtained through the first single-line edge node, then the first single-line edge node obtains the target content resource.
[0087] 407. The first single-line edge node sends the target content resource to the resource requester.
[0088] Specifically, if the first single-line edge node successfully acquires the target content resource locally, it returns the target content resource to the resource requesting end. If the first single-line edge node fails to acquire the target content resource locally, it can send an access request to an upper-layer node in the content delivery network via the public or intranet. If the corresponding upper-layer node successfully acquires the target content resource locally, it will sequentially transmit the target content resource to the first single-line edge node and then to the resource requesting end, until the resource requesting end receives the returned target content resource. If the corresponding upper-layer node fails to acquire the target content resource locally, it will request the origin server to retrieve the target content resource provided by the origin server. The target content resource provided by the origin server will sequentially transmit to the corresponding upper-layer node, the first single-line edge node, and the resource requesting end, until the resource requesting end receives the returned target content resource. If the origin server does not provide the target content resource, it will generate an access failure message, which will then sequentially transmit to the corresponding upper-layer node, the first single-line edge node, and the resource requesting end, until the resource requesting end receives the returned access failure message.
[0089] 408. If a second access policy is received, and the second access policy indicates that the target content resource is obtained through the second single-line edge node, then the first single-line edge node sends the IP address of the second single-line edge node to the resource requesting end.
[0090] 409. The resource requesting end sends a second access request to the second single-line edge node to obtain the target content resource based on the IP address of the second single-line edge node.
[0091] 410. The second single-line edge node responds to the second access request and obtains the target content resource.
[0092] 411. The second single-line edge node sends the target content resources to the resource requesting end.
[0093] Specifically, if the second single-line edge node successfully acquires the target content resource locally, it returns the target content resource to the resource requesting end. If the second single-line edge node fails to acquire the target content resource locally, it sends an access request to the first upper-layer node to acquire the target content resource. The first upper-layer node responds to the access request and acquires the target content resource locally. If the first upper-layer node successfully acquires the target content resource locally, it transmits the target content resource sequentially to the second single-line edge node and the resource requesting end until the resource requesting end receives the returned target content resource. If the first upper-layer node fails to acquire the target content resource locally, it sends a request back to the origin server. If the origin server has the target content resource, it transmits the target content resource sequentially to the first upper-layer node, the second single-line edge node, and the resource requesting end until the resource requesting end receives the returned target content resource. If the origin server does not have the target content resource, it generates an access failure message, which is then transmitted sequentially to the first upper-layer node, the second single-line edge node, and the resource requesting end until the resource requesting end receives the returned access failure message.
[0094] 412. If a third access policy is received, and the third access policy indicates that the target content resource is obtained through the first multi-line edge node, then the first single-line edge node sends the IP address of the first multi-line edge node to the resource requesting end.
[0095] 413. The resource requesting end sends a third access request to the first multi-line edge node to obtain the target content resource based on the IP address of the first multi-line edge node.
[0096] 414. The first multi-line edge node responds to the third access request and obtains the target content resource.
[0097] 415. The first multi-line edge node sends the target content resources to the resource demander.
[0098] Specifically, if the first multi-line edge node successfully acquires the target content resource locally, it returns the target content resource to the resource requesting end. If the first multi-line edge node fails to acquire the target content resource locally, it requests the target content resource from the second upper-layer node via the intranet. If the second upper-layer node successfully acquires the target content resource locally, it transmits the target content resource sequentially to the first multi-line edge node and the resource requesting end until the resource requesting end receives the returned target content resource. If the second upper-layer node fails to acquire the target content resource locally, it sends a request back to the origin server. If the origin server has the target content resource, it transmits the target content resource sequentially to the second upper-layer node, the first multi-line edge node, and the resource requesting end until the resource requesting end receives the returned target content resource. If the origin server does not have the target content resource, it generates an access failure message, which it transmits sequentially to the second upper-layer node, the first multi-line edge node, and the resource requesting end until the resource requesting end receives the returned access failure message.
[0099] The technical solution provided in this application embodiment does not directly retrieve and return content resources from any single-line edge node when the resource requesting end requests them. Instead, it schedules appropriate single-line or multi-line edge nodes to retrieve and return content resources to the resource requesting end based on the access popularity level of the content resources. This increases the probability of edge nodes successfully retrieving content resources, significantly increases the access hit rate of edge nodes, reduces the frequency of accessing upper-layer nodes, effectively controls the bandwidth cost of the content delivery network, and effectively reduces the service cost of the content delivery network. Furthermore, the resource requesting end distinguishes which edge nodes retrieve the content resources, reducing the modification cost of the resource requesting end.
[0100] Figure 5 A flowchart illustrating another content resource acquisition method based on a content delivery network (CDN) provided in this application embodiment. This method is executed by a CDN-based content resource access device, which may consist of software and / or hardware, and can be configured in any first edge node among a plurality of edge nodes included in the CDN. See also... Figure 5 The method may include the following steps:
[0101] 501. In response to the first access request sent by the resource requester to obtain the target content resource, send an access policy retrieval request.
[0102] 502. Receive response access policy The access policy returned by the request is used to indicate whether the target content resource is obtained through the first edge node or the second edge node.
[0103] 503. Obtain the target content resource according to the access policy and return it to the resource requester, or notify the resource requester to obtain the target content resource through the second edge node.
[0104] Further optionally, the first edge node includes a first single-line edge node, or the second edge node includes a second single-line edge node or a first multi-line edge node, the first single-line edge node and the second single-line edge node are allowed to access one operator network, and the first multi-line edge node is allowed to access multiple operator networks;
[0105] Accordingly, the target content resource is obtained according to the access policy and returned to the resource requester, or the resource requester is notified to obtain the target content resource through the second edge node, including:
[0106] If a first access strategy instructing the user to obtain the target content resource through a first single-line edge node is received, the user obtains the target content resource and returns it to the resource requesting end. Alternatively, if a second access strategy instructing the user to obtain the target content resource through a second single-line edge node is received, the user sends the IP address of the second single-line edge node to the resource requesting end, so that the resource requesting end can request the target content resource from the second single-line edge node based on the IP address of the second single-line edge node. Alternatively, if a third access strategy instructing the user to obtain the target content resource through a first multi-line edge node is received, the user sends the IP address of the first multi-line edge node to the resource requesting end, so that the resource requesting end can request the target content resource from the first multi-line edge node based on the IP address of the first multi-line edge node.
[0107] The specific implementation methods and technical effects of each step in the method provided in this application embodiment can be found in the specific implementation methods and technical effects of each step in the foregoing embodiments, and will not be repeated here.
[0108] Figure 6 A flowchart illustrating another content resource acquisition method based on a content delivery network (CDN) provided in this application embodiment. This method is executed by a CDN-based content resource access device, which may consist of software and / or hardware, and can be configured on the resource requesting end. See also... Figure 6 The method may include the following steps:
[0109] 601. Send a first access request to the first single-line edge node. The first access request is used to request the acquisition of the target content resource.
[0110] 602. Receive the target content resource returned by the first single-line edge node; or,
[0111] 603. Receive the IP address of the second single-line edge node returned by the first single-line edge node;
[0112] 604. Send a second access request to the second single-line edge node based on the IP address of the second single-line edge node. The second access request is used to request the acquisition of the target content resource.
[0113] 605. Receive the target content resource returned by the second single-line edge node; or,
[0114] 606. Receive the IP address of the first multi-line edge node returned by the first single-line edge node;
[0115] 607. Send a third access request to the first multi-line edge node based on the IP address of the first multi-line edge node. The third access request is used to request the acquisition of the target content resource.
[0116] 608. Receive the target content resources returned by the first multi-line edge node.
[0117] The specific implementation methods and technical effects of each step in the method provided in this application embodiment can be found in the specific implementation methods and technical effects of each step in the foregoing embodiments, and will not be repeated here.
[0118] Figure 7 This is a schematic diagram illustrating the structure of a content resource access device provided in an embodiment of this application. The device may consist of software and / or hardware. See also... Figure 7 The device may include:
[0119] The determination module 71 is used to determine the access popularity level of the target content resource in response to the access policy acquisition request sent by the first edge node when it requests to obtain the target content resource at the resource demand end.
[0120] The generation module 72 is used to generate an access strategy based on the access popularity level of the target content resource. The access strategy is used to indicate whether the target content resource is obtained through the first edge node or the second edge node.
[0121] The sending module 73 is used to return the access policy to the first edge node so that the first edge node can obtain the target content resource and return it to the resource requesting end, or the first edge node can notify the resource requesting end to obtain the target content resource through the second edge node.
[0122] Further optionally, the first edge node includes a first single-line edge node or the second edge node includes a second single-line edge node or a first multi-line edge node, the first single-line edge node and the second single-line edge node are allowed to access one operator network, and the first multi-line edge node is allowed to access multiple operator networks;
[0123] Accordingly, when generating an access strategy based on the access popularity level of the target content resource, the generation module 72 specifically generates the following: if the access popularity level of the target content resource is the first access popularity level, a first access strategy is generated, which instructs the target content resource to be obtained through the first single-line edge node; if the access popularity level of the target content resource is the second access popularity level, a second access strategy is generated, which instructs the target content resource to be obtained through the second single-line edge node; if the access popularity level of the target content resource is the third access popularity level, a third access strategy is generated, which instructs the target content resource to be obtained through the first multi-line edge node; wherein, the access popularity levels are ranked from high to low as the first access popularity level, the second access popularity level, and the third access popularity level.
[0124] Optionally, when generating the second access strategy, the generation module 72 is specifically used to: query a pre-established second correspondence based on the target hash result corresponding to the Uniform Resource Identifier (URI) of the target content resource to determine the second single-line edge node corresponding to the target hash result, wherein the second correspondence is used to characterize the correspondence between the hash result and the single-line edge node; obtain the IP address of the second single-line edge node; and generate a second access strategy including the IP address of the second single-line edge node, wherein the second access strategy is used to instruct the resource requesting end to request the target content resource from the second single-line edge node based on the IP address of the second single-line edge node.
[0125] Further optionally, the second access strategy also instructs the second single-line edge node to request the target content resource from the first upper-layer node if the second single-line edge node fails to obtain the target content resource locally.
[0126] Further optionally, the above apparatus further includes: an establishment module, configured to: perform hash operations on the URIs of each content resource provided by the source site to obtain the hash results corresponding to each content resource; allocate corresponding single-line edge nodes to each content resource; and establish a second correspondence between the hash results and the single-line edge nodes based on the hash results and single-line edge nodes corresponding to each content resource.
[0127] Optionally, when generating the third access strategy, the generation module 72 is specifically used to: query a pre-established third correspondence relationship based on the target hash result corresponding to the URI of the target content resource to determine the first multi-line edge node corresponding to the target hash result, the third correspondence relationship being used to characterize the correspondence between the hash result and the multi-line edge node; obtain the IP address of the first multi-line edge node; and generate a third access strategy including the IP address of the first multi-line edge node, the third access strategy being used to instruct the resource requesting end to request the target content resource from the first multi-line edge node based on the IP address of the first multi-line edge node.
[0128] Further optional, the third access policy also instructs the first multi-line edge node to request the target content resource from the second upper-layer node through the intranet if the first multi-line edge node fails to obtain the target content resource locally.
[0129] Optionally, the module is also used to: perform hash operations on the URIs of each content resource provided by the source site to obtain the hash results corresponding to each content resource; and allocate corresponding multi-line edge nodes to each content resource.
[0130] Based on the hash results and multi-line edge nodes corresponding to each content resource, a third correspondence is established between the hash results and the multi-line edge nodes.
[0131] Optionally, when determining the access popularity level of the target content resource, module 71 is specifically used to: determine the access popularity level of each of the multiple content resources based on the number of times each of the multiple content resources is accessed; establish a first correspondence between the content resources and the access popularity level based on the access popularity level of each of the multiple content resources; query the first correspondence to obtain the access popularity level of the target content resource.
[0132] Figure 7 The device shown can perform Figure 2 or Figure 3 The implementation principle and technical effects of the methods in the illustrated embodiments will not be elaborated further. Regarding the methods in the above embodiments... Figure 7 The specific ways in which each module and unit of the apparatus performs its operations have been described in detail in the embodiments of the relevant methods, and will not be elaborated here.
[0133] Figure 8 This is a schematic diagram illustrating the structure of another content resource access device provided in an embodiment of this application. The device may consist of software and / or hardware, and can be configured in a first single-line edge node in a content delivery network. See also... Figure 8 The device may include:
[0134] The sending module 81 is used to respond to the first access request sent by the resource requesting end to obtain the target content resource and send an access policy acquisition request.
[0135] The receiving module 82 is used to receive the access policy returned in response to the access policy acquisition request. The access policy is used to indicate whether the target content resource is acquired through the first edge node or the second edge node.
[0136] Processing module 83 is used to obtain the target content resource according to the access policy and return it to the resource requester, or to notify the resource requester to obtain the target content resource through the second edge node.
[0137] Further optionally, the first edge node includes a first single-line edge node, or the second edge node includes a second single-line edge node or a first multi-line edge node, wherein the first single-line edge node and the second single-line edge node are allowed to access one operator network, and the first multi-line edge node is allowed to access multiple operator networks.
[0138] Accordingly, when processing module 83 obtains the target content resource according to the access policy and returns it to the resource requesting end, or notifies the resource requesting end to obtain the target content resource through the second edge node, it is specifically used for:
[0139] If a first access strategy instructing the user to obtain the target content resource through a first single-line edge node is received, the user obtains the target content resource and returns it to the resource requesting end. Alternatively, if a second access strategy instructing the user to obtain the target content resource through a second single-line edge node is received, the user sends the IP address of the second single-line edge node to the resource requesting end, so that the resource requesting end can request the target content resource from the second single-line edge node based on the IP address of the second single-line edge node. Alternatively, if a third access strategy instructing the user to obtain the target content resource through a first multi-line edge node is received, the user sends the IP address of the first multi-line edge node to the resource requesting end, so that the resource requesting end can request the target content resource from the first multi-line edge node based on the IP address of the first multi-line edge node.
[0140] Figure 8 The device shown can perform Figure 5 The implementation principle and technical effects of the methods in the illustrated embodiments will not be elaborated further. Regarding the methods in the above embodiments... Figure 5 The specific ways in which each module and unit of the apparatus performs its operations have been described in detail in the embodiments of the relevant methods, and will not be elaborated here.
[0141] Figure 9 This is a schematic diagram illustrating the structure of another content resource access device provided in an embodiment of this application. The device may consist of software and / or hardware, and can be configured in a resource-demanding device. See also... Figure 9The device may include:
[0142] Sending module 91 is used to send a first access request to the first single-line edge node. The first access request is used to request to obtain the target content resource.
[0143] Receiving module 92 is used to receive the target content resource returned by the first single-line edge node; or,
[0144] The receiving module 92 is also used to receive the IP address of the second single-line edge node returned by the first single-line edge node;
[0145] The sending module 91 is also used to send a second access request to the second single-line edge node according to the IP address of the second single-line edge node. The second access request is used to request to obtain the target content resource.
[0146] The receiving module 92 is also used to receive the target content resources returned by the second single-line edge node; or,
[0147] The receiving module 92 is also used to receive the IP address of the first multi-line edge node returned by the first single-line edge node;
[0148] The sending module 91 is also used to send a third access request to the first multi-line edge node based on the IP address of the first multi-line edge node. The third access request is used to request the acquisition of the target content resource.
[0149] The receiving module 92 is also used to receive the target content resources returned by the first multi-line edge node.
[0150] Figure 9 The device shown can perform Figure 6 The implementation principle and technical effects of the methods in the illustrated embodiments will not be elaborated further. Regarding the methods in the above embodiments... Figure 9 The specific ways in which each module and unit of the apparatus performs its operations have been described in detail in the embodiments of the relevant methods, and will not be elaborated here.
[0151] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 301 to 304 can be device A; or the execution subject of steps 301 and 302 can be device A, and the execution subject of step 303 can be device B; and so on.
[0152] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 301, 302, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0153] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 10 As shown, the electronic device includes: a memory 101 and a processor 102;
[0154] Memory 101 is used to store computer programs and can be configured to store various other data to support operation on the computing platform. Examples of this data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc.
[0155] The memory 101 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random-access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0156] Processor 102, coupled to memory 101, is used to execute computer programs in memory 101 for performing steps in a content resource acquisition method based on a content delivery network.
[0157] Furthermore, such as Figure 10 As shown, the electronic device also includes other components such as a communication component 103, a display 104, a power supply component 105, and an audio component 106. Figure 10The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 10 The components shown. Additionally... Figure 10 The components within the dashed box are optional, not mandatory, and their specific requirements depend on the product form of the electronic device. The electronic device in this embodiment can be a desktop computer, laptop computer, smartphone, or IoT (Internet of Things) device, or a server-side device such as a conventional server, cloud server, or server array. If the electronic device in this embodiment is a desktop computer, laptop computer, or smartphone, it may include... Figure 10 The components within the dashed box; if the electronic device in this embodiment is implemented as a conventional server, cloud server, or server array, etc., it may be omitted. Figure 10 The component within the dashed box.
[0158] For a detailed description of the implementation process of each action by the processor, please refer to the relevant descriptions in the foregoing method embodiments or device embodiments, which will not be repeated here.
[0159] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be performed by an electronic device in the above method embodiments.
[0160] Accordingly, this application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, enables the processor to perform the steps that can be executed by an electronic device in the above method embodiments.
[0161] The aforementioned communication components are configured to facilitate wired or wireless communication between the device containing the communication components and other devices. The device containing the communication components can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication components receive broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication components also include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.
[0162] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0163] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0164] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0165] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0166] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0167] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0168] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0169] In a typical configuration, a computing device includes one or more processors (central processing unit, CPU), input / output interfaces, network interfaces, and memory.
[0170] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0171] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random-access memory (SRAM), dynamic random-access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device. As defined in this article, computer-readable media do not include transient media, such as modulated data signals and carrier waves.
[0172] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0173] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for acquiring content resources based on a content delivery network, characterized in that, The content delivery network includes at least one edge node, and the method includes: In response to the access policy retrieval request sent by the first edge node when it requests to obtain the target content resource on the resource demand side, the access popularity level of the target content resource is determined. Based on the access popularity level of the target content resource, an access strategy is generated. The access strategy is used to indicate whether the target content resource is obtained through the first edge node or the second edge node. The second edge node is different from the first edge node and is sorted from high to low according to the access popularity level of the allowed content resources, namely the first edge node and the second edge node. The access policy is returned to the first edge node so that the first edge node can obtain the target content resource and return it to the resource requester; or, the first edge node notifies the resource requester to obtain the target content resource through the second edge node.
2. The method according to claim 1, characterized in that, The first edge node includes a first single-line edge node or the second edge node includes a second single-line edge node or a first multi-line edge node. The first single-line edge node and the second single-line edge node are allowed to access one operator network, and the first multi-line edge node is allowed to access multiple operator networks. Accordingly, based on the access popularity level of the target content resource, an access strategy is generated, including: If the access popularity level of the target content resource is the first access popularity level, then a first access strategy is generated. The first access strategy is used to indicate that the target content resource is obtained through the first single-line edge node. If the access popularity level of the target content resource is the second access popularity level, then a second access strategy is generated. The second access strategy is used to indicate that the target content resource is obtained through the second single-line edge node. If the access popularity level of the target content resource is the third access popularity level, then a third access strategy is generated, which is used to indicate that the target content resource is obtained through the first multi-line edge node. The access popularity levels are ranked from highest to lowest as follows: the first access popularity level, the second access popularity level, and the third access popularity level.
3. The method according to claim 2, characterized in that, The generation of a second access policy includes: Based on the target hash result corresponding to the Uniform Resource Identifier (URI) of the target content resource, a pre-established second correspondence is queried to determine the second single-line edge node corresponding to the target hash result. The second correspondence is used to characterize the correspondence between the hash result and the single-line edge node. Obtain the IP address of the second single-line edge node; A second access policy is generated, which includes the IP address of the second single-line edge node. The second access policy is used to instruct the resource requesting end to request the target content resource from the second single-line edge node based on the IP address of the second single-line edge node.
4. The method according to claim 3, characterized in that, The second access policy also instructs that if the second single-line edge node fails to obtain the target content resource from its local storage, the second single-line edge node shall request the target content resource from the first upper-layer node.
5. The method according to claim 3, characterized in that, Before querying the pre-established second correspondence, the following is also included: The URIs of each content resource provided by the origin server are hashed separately to obtain the hash results corresponding to each content resource. Assign each content resource its own corresponding single-line edge node; Based on the hash results and single-line edge nodes corresponding to each content resource, a second correspondence is established between the hash results and the single-line edge nodes.
6. The method according to claim 2, characterized in that, Generating the third access policy includes: Based on the target hash result corresponding to the URI of the target content resource, a pre-established third correspondence is queried to determine the first multi-line edge node corresponding to the target hash result. The third correspondence is used to characterize the correspondence between the hash result and the multi-line edge node. Obtain the IP address of the first multi-line edge node; A third access policy is generated, which includes the IP address of the first multi-line edge node. The third access policy is used to instruct the resource requesting end to request the target content resource from the first multi-line edge node based on the IP address of the first multi-line edge node.
7. The method according to claim 6, characterized in that, The third access policy also indicates that if the first multi-line edge node fails to obtain the target content resource locally, the first multi-line edge node shall request the target content resource from the second upper-layer node through the intranet.
8. The method according to claim 6, characterized in that, Before querying the pre-established third-party correspondence, the following is also included: The URIs of each content resource provided by the origin server are hashed separately to obtain the hash results corresponding to each content resource. Assign corresponding multi-line edge nodes to each content resource; Based on the hash results and multi-line edge nodes corresponding to each content resource, a third correspondence is established between the hash results and the multi-line edge nodes.
9. The method according to claim 6, characterized in that, Determining the access popularity level of the target content resource includes: The access popularity level of each content resource is determined based on the number of times each resource is accessed. Establish a primary correspondence between content resources and their respective access popularity levels based on the access popularity levels of multiple content resources; Query the first correspondence to obtain the access popularity level of the target content resource.
10. A method for acquiring content resources based on a content delivery network, characterized in that, The content delivery network includes at least one edge node; Applied to the first edge node, the method includes: In response to the first access request sent by the resource requester to obtain the target content resource, an access policy retrieval request is sent. The system receives an access policy returned in response to the access policy request. The access policy is used to indicate whether the target content resource is obtained through the first edge node or the second edge node. The second edge node is different from the first edge node and is sorted from high to low according to the access popularity level of the allowed content resources, namely the first edge node and the second edge node. The target content resource is obtained according to the access policy and returned to the resource requester, or the resource requester is notified to obtain the target content resource through the second edge node.
11. The method according to claim 10, characterized in that, The first edge node includes a first single-line edge node, or the second edge node includes a second single-line edge node or a first multi-line edge node. The first single-line edge node and the second single-line edge node are allowed to access one operator network, and the first multi-line edge node is allowed to access multiple operator networks. Accordingly, the target content resource is obtained according to the access policy and returned to the resource requester, or the resource requester is notified to obtain the target content resource through the second edge node, including: If a first access strategy instructing the user to obtain the target content resource through the first single-line edge node is received, then the target content resource is obtained and returned to the resource requesting end; or... If a second access policy instructing the user to obtain the target content resource through a second single-line edge node is received, the IP address of the second single-line edge node is sent to the resource requesting end, so that the resource requesting end requests the target content resource from the second single-line edge node based on the IP address of the second single-line edge node; or... If a third access strategy instructing the user to obtain the target content resource through the first multi-line edge node is received, the IP address of the first multi-line edge node is sent to the resource requesting end, so that the resource requesting end requests the target content resource from the first multi-line edge node based on the IP address of the first multi-line edge node.
12. A method for acquiring content resources based on a content delivery network, characterized in that, The content delivery network includes at least one edge node, and the method is applied to the resource demand side. The method includes: Send a first access request to the first single-line edge node, the first access request being used to request the acquisition of the target content resource; The system receives the target content resource returned by the first single-line edge node; wherein, in response to the first access request sent by the resource requesting end, the first single-line edge node sends an access policy acquisition request to the scheduling center system; the scheduling center system, in response to the access policy acquisition request, determines the access popularity level of the target content resource; generates an access policy based on the access popularity level of the target content resource, the access policy being used to instruct the acquisition of the target content resource through the first single-line edge node; the scheduling center system sends the access policy to the first single-line edge node; if a first access policy is received, and the first access policy instructs the acquisition of the target content resource through the first single-line edge node, then the first single-line edge node acquires the target content resource and sends it to the resource requesting end; or, Receive the IP address of the second single-line edge node returned by the first single-line edge node; wherein, if the first single-line edge node receives the second access policy sent by the scheduling center system, and the second access policy indicates that the target content resource is obtained through the second single-line edge node, then the first single-line edge node sends the IP address of the second single-line edge node to the resource requesting end. A second access request is sent to the second single-line edge node based on the IP address of the second single-line edge node. The second access request is used to request the acquisition of the target content resource. The second single-line edge node responds to the second access request, acquires the target content resource, and sends the target content resource to the resource requesting end. Receive the target content resource returned by the second single-line edge node; or, The system receives the IP address of the first multi-line edge node returned by the first single-line edge node; wherein, if the first single-line edge node receives a third access policy sent by the scheduling center system, and the third access policy indicates that the target content resource is obtained through the first multi-line edge node, then the first single-line edge node sends the IP address of the first multi-line edge node to the resource requesting end. A third access request is sent to the first multi-line edge node based on the IP address of the first multi-line edge node. The third access request is used to request the acquisition of the target content resource. The first multi-line edge node responds to the third access request, acquires the target content resource, and sends the target content resource to the resource requesting end. Receive the target content resource returned by the first multi-line edge node; Specifically, when the scheduling center system generates an access policy based on the access popularity level of the target content resource, it generates the following: if the access popularity level of the target content resource is a first access popularity level, a first access policy is generated; if the access popularity level of the target content resource is a second access popularity level, a second access policy is generated; if the access popularity level of the target content resource is a third access popularity level, a third access policy is generated; wherein the access popularity levels are arranged in descending order as the first access popularity level, the second access popularity level, and the third access popularity level.
13. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer programs; The processor is coupled to the memory for executing the computer program to perform the steps of the method according to any one of claims 1-12.
14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of the method according to any one of claims 1-12.
Citation Information
Patent Citations
CDN scheduling method and system, computing device and storage medium
CN114598701A