Source returning method and device based on video-on-demand resources, storage medium and electronic equipment
By determining the target edge node and relay node in the content distribution network and sending scheduling data containing the return source path to the terminal device, the time increase and failure risk caused by querying 302 services during the return of the edge node is solved, and the more Efficient on-demand resource access.
Patent Information
- Application Number
- CN202410994672.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-12-03
AI Technical Summary
In on-demand video service, the query 302 service when the edge node returns to the source results in an increase in return time and an increase in failure risk, and a method is needed to reduce return time and reduce failure risk.
Through the content distribution network, the terminal device is received, the target edge node and relay node are determined based on resource storage information and node health information, and the terminal device is sent to the terminal device, including the target edge node address and the target return path, so that the edge node can be used to make the edge node Directly return to the source without additional querying of the return source path.
Reduces the return time, reduces the risk of return failure, and improves the access efficiency of on-demand resources.
Smart Images

Figure CN119071588A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of computer technology, and more specifically to a method, device, computer program product, non-transitory computer-readable storage medium, and electronic device for returning to a source based on on-demand resources. Background Art
[0002] This section is intended to introduce some aspects of the art, which may be related to various aspects of the present disclosure described below and / or claimed. It is believed that this section helps to provide background information to facilitate a better understanding of various aspects of the present disclosure. Therefore, it should be understood that these statements should be understood from this perspective, rather than as an admission of the prior art.
[0003] CDN (Content Delivery Network) strategically builds and deploys widely distributed edge servers, supplemented by relevant load balancing and central platform scheduling strategies, enabling visiting users to access available edge servers nearby and obtain the required content, thereby improving cache hit rate and response speed.
[0004] In the on-demand video service, the on-demand video files are recorded in advance, the files are relatively large, and the content does not change. When a user requests to play a video that does not exist in an edge node, the edge node will obtain the video file from the upper-level node (such as a relay node). This process is called back-to-source. A video file is usually stored in a specific relay node. When back-to-source, the edge node usually needs to query the 302 service to obtain the address of the above relay node and then back-to-source. In the above method, the step of querying the 302 service adds an http request to the back-to-source process, which will increase the back-to-source time and the risk of failure.
[0005] Therefore, it is necessary to propose a new technical solution to alleviate or solve at least one of the above technical problems. Summary of the invention
[0006] The purpose of the present disclosure is to provide a method, device, computer program product, non-transitory computer-readable storage medium and electronic device for returning to the source based on on-demand resources, so as to reduce the return to the source time and reduce the risk of return to the source failure.
[0007] According to a first aspect of the present disclosure, a method for returning to the source based on on-demand resources is provided, which is implemented based on a content distribution network, wherein the content distribution network includes multiple edge nodes and multiple relay nodes, and the method includes: receiving a scheduling request for a target resource sent by a terminal device, wherein the target resource is a on-demand resource; determining a target edge node for providing the target resource to the terminal device and a target relay node for providing the target resource to the target edge node based on resource storage information and node health information of the content distribution network; and sending scheduling data to the terminal device, wherein the scheduling data includes a target edge node address and a target return-to-source path, wherein the target edge node address points to the target edge node, and the target return-to-source path points to the target relay node.
[0008] According to a second aspect of the present disclosure, a back-to-source method based on on-demand resources is provided, which is implemented based on a content distribution network, wherein the content distribution network includes multiple edge nodes and multiple relay nodes, and the method includes: sending a scheduling request for a target resource to a scheduling server, wherein the target resource is a on-demand resource; receiving scheduling data corresponding to the scheduling request sent by the scheduling server, the scheduling data including a target edge node address and a target back-to-source path, the target edge node address points to a target edge node for providing the target resource to an execution subject of the method, and the target back-to-source path points to a target relay node for providing the target resource to the target edge node; according to the target edge node address, sending a resource access request for the target resource to the target edge node, wherein the resource access request carries the target back-to-source path.
[0009] According to a third aspect of the present disclosure, a method for returning to the source based on on-demand resources is provided, which is implemented based on a content distribution network, wherein the content distribution network includes multiple edge nodes and multiple relay nodes, and the method includes: receiving a resource access request for a target resource sent by a terminal device, wherein the target resource is a on-demand resource, and the resource access request carries a target return-to-source path, and the target return-to-source path points to a target relay node for providing the target resource to an execution subject of the method; when the target resource does not exist locally, obtaining the target resource from the target relay node according to the target return-to-source path; and sending the target resource to the terminal device.
[0010] According to a fourth aspect of the present disclosure, there is provided a back-to-source device based on on-demand resources, which is implemented based on a content distribution network, wherein the content distribution network includes multiple edge nodes and multiple relay nodes, and the device includes: a scheduling request receiving module, used to receive a scheduling request for a target resource sent by a terminal device, wherein the target resource is a on-demand resource; a scheduling data determining module, used to determine a target edge node for providing the target resource to the terminal device and a target relay node for providing the target resource to the target edge node based on resource storage information and node health information of the content distribution network; a scheduling data sending module, used to send scheduling data to the terminal device, wherein the scheduling data includes a target edge node address and a target back-to-source path, wherein the target edge node address points to the target edge node, and the target back-to-source path points to the target relay node.
[0011] According to a fifth aspect of the present disclosure, a back-to-source device based on on-demand resources is provided, which is implemented based on a content distribution network, wherein the content distribution network includes multiple edge nodes and multiple relay nodes, and the device includes: a scheduling request sending module, used to send a scheduling request for a target resource to a scheduling server, wherein the target resource is a on-demand resource; a scheduling data receiving module, used to receive scheduling data corresponding to the scheduling request sent by the scheduling server, wherein the scheduling data includes a target edge node address and a target back-to-source path, wherein the target edge node address points to a target edge node for providing the target resource to an execution subject of the method, and the target back-to-source path points to a target relay node for providing the target resource to the target edge node; a resource access request sending module, used to send a resource access request for the target resource to the target edge node according to the target edge node address, wherein the resource access request carries the target back-to-source path.
[0012] According to a sixth aspect of the present disclosure, there is provided a source return device based on on-demand resources, which is implemented based on a content distribution network, wherein the content distribution network includes multiple edge nodes and multiple relay nodes, and the device includes: a resource access request receiving module, which is used to receive a resource access request for a target resource sent by a terminal device, wherein the target resource is a on-demand resource, and the resource access request carries a target source return path, and the target source return path points to a target relay node for providing the target resource to an execution subject of the method; a source return module, which is used to obtain the target resource from the target relay node according to the target source return path when the target resource does not exist locally, and send the obtained target resource to the terminal device; a target resource sending module, which is used to send the target resource to the terminal device.
[0013] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising program code instructions. When the program product is executed by a computer, the program code instructions enable the computer to execute the method according to the first aspect, the second aspect or the third aspect of the present disclosure.
[0014] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method according to the first aspect, the second aspect or the third aspect of the present disclosure.
[0015] According to the ninth aspect of the present disclosure, an electronic device is provided, comprising: a processor, a memory that electronically communicates with the processor; and instructions, wherein the instructions are stored in the memory and can be executed by the processor to enable the electronic device to perform the method according to the first aspect, the second aspect or the third aspect of the present disclosure.
[0016] In an embodiment of the present disclosure, the scheduling server provides the target edge node address to the terminal device while providing the target back-to-source path, so that the resource access request sent by the terminal device to the edge node can carry the above-mentioned target back-to-source path. The edge node can directly return to the source without querying the back-to-source path separately, which is conducive to reducing the back-to-source time and reducing the risk of back-to-source failure.
[0017] It should be understood that the content described in this section is not intended to identify key or essential features of the claimed invention, nor is it intended to be used alone to determine the scope of the claimed invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0019] Figure 1 A system architecture diagram of an embodiment of a method for returning to the source based on on-demand resources according to the present disclosure is shown;
[0020] Figure 2A A flowchart of an embodiment of a method for returning to the source based on on-demand resources according to the present disclosure is shown, and the implementation subject is a scheduling server;
[0021] Figure 2BA flowchart of an embodiment of a method for returning to the source based on on-demand resources according to the present disclosure is shown, and the implementation subject is a terminal device;
[0022] Figure 2C A flowchart of an embodiment of a method for returning to the source based on on-demand resources according to the present disclosure is shown, and the implementation subject is an edge node;
[0023] Figure 3A A schematic diagram showing a specific example of an embodiment of a method for returning to the source based on on-demand resources according to the present disclosure;
[0024] Figure 3B A schematic diagram showing a storage method of resources with different popularity according to an embodiment of a method for returning to the source based on on-demand resources disclosed in the present invention;
[0025] Figure 4A An exemplary block diagram of an embodiment of a source return device based on on-demand resources according to the present disclosure is shown, which is applied to a scheduling server;
[0026] Figure 4B An exemplary block diagram of an embodiment of a source return device based on on-demand resources according to the present disclosure is shown, which is applied to a terminal device;
[0027] Figure 4C An exemplary block diagram of an embodiment of a back-to-source device based on on-demand resources according to the present disclosure is shown, which is applied to an edge node;
[0028] Figure 5 A schematic diagram of an example electronic device 500 is shown that may be used to implement embodiments of the present disclosure.
[0029] Specific implementation method
[0030] The present disclosure will be described more fully below with reference to the accompanying drawings. However, the present disclosure may be embodied in a variety of alternative forms and should not be construed as being limited to the embodiments described herein. Therefore, although the present disclosure is susceptible to various modifications and alternative forms, its specific embodiments are shown by way of example in the accompanying drawings and will be described in detail herein. However, it should be understood that this approach is not intended to limit the present disclosure to the specific form disclosed, but rather, the present disclosure covers all modifications, equivalents, and alternatives that fall within the spirit and scope of the present disclosure as defined by the claims.
[0031] It should be understood that although various elements can be described herein with terms such as first, second, etc., these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, a first element can be referred to as a second element, and similarly, a second element can be referred to as a first element without departing from the teaching of the present disclosure.
[0032] Some examples are described herein in conjunction with block diagrams and / or flow charts, wherein each box represents a circuit element, module, or portion of code that includes one or more executable instructions for implementing a specified logical function. It should also be noted that in other implementations, the functions in the box may not occur in the order in which they are shown. For example, depending on the functions involved, two boxes shown in succession may actually be executed substantially simultaneously, or the boxes may sometimes be executed in reverse order.
[0033] The phrases "according to an embodiment..." or "in an embodiment..." mentioned herein mean that a specific feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one implementation of the present disclosure. The phrases "according to an embodiment..." or "in an embodiment..." that appear in different places herein do not necessarily refer to the same embodiment, nor are they necessarily separate or alternative embodiments that are mutually exclusive with other embodiments.
[0034] First, the terms involved in one or more embodiments of the present application are explained.
[0035] Cluster: Grouping multiple independent computers or servers together to work together to perform specific tasks or provide specific services. These computers are called cluster nodes, which are connected together through a network to share resources and workloads to improve performance, scalability, and availability. Clusters are widely used in large-scale computing and distributed systems to improve system efficiency and reliability.
[0036] On-demand: Video on demand is a non-real-time video content. The video source is an existing video file or media source. It can be used multiple times and can be rewound and fast-forwarded. There are many scenarios for video on demand in daily life, such as cable TV, online video on demand, short videos, etc.
[0037] Content distribution network: A technology that deploys nodes at the edge of the network and caches the static resources of the website on edge nodes closer to the user, thereby improving user access speed, reducing bandwidth consumption, and increasing concurrent capacity. In the embodiment of the present disclosure, the content distribution network is divided into edge nodes, multiple relay nodes (also referred to as secondary nodes), and source stations in order from low to high levels. Among them, multiple edge nodes form an edge node cluster. Multiple relay nodes form a relay node cluster. In the content distribution network, the lower the level, the shorter the data transmission link to the terminal device, and the higher the level, the longer the data transmission link to the terminal device. Relay nodes can play a role in reducing the pressure on the source station. Relay nodes can have only one level or be divided into multiple levels.
[0038] Back-to-source: In a content distribution network, if the target resource does not exist in a low-level node (such as an edge node), the target resource will be obtained from the node of the next higher level (such as a relay node). This process is called back-to-source.
[0039] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the on-demand resource-based back-to-source method, apparatus, terminal device, and storage medium of the present disclosure can be applied.
[0040] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0041] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as voice interaction applications, video conferencing applications, short video social applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0042] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with microphones and speakers, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) players, portable computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0043] The server 105 may be a server that provides various services. For example, the server 105 may be a background server that processes the back-to-source requests based on on-demand resources sent by the terminal devices 101 , 102 , and 103 .
[0044] In some cases, the on-demand resource-based return-to-source method provided in the present disclosure may be executed by terminal devices 101, 102, and 103. Accordingly, the on-demand resource-based return-to-source device may also be set in the terminal devices 101, 102, and 103. In this case, the system architecture 100 may not include the server 105.
[0045] In some cases, the on-demand resource-based return-to-source method provided in the present disclosure may be executed by the server 105. Accordingly, the on-demand resource-based return-to-source device may also be set in the server 105. In this case, the system architecture 100 may not include the terminal devices 101, 102, and 103. The server 105 may be a scheduling server, or a whole formed by a combination of a central server and a scheduling server. The server 105 may also be an edge node.
[0046] In some cases, the on-demand resource-based return-to-source method provided in the present disclosure may be jointly performed by the terminal devices 101, 102, 103 and the server 105. Accordingly, the on-demand resource-based return-to-source apparatus may also be respectively disposed in the terminal devices 101, 102, 103 and the server 105.
[0047] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0048] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0049] Figure 2A A flowchart of an embodiment of a method for returning to the source based on on-demand resources according to the present disclosure is shown, and the implementation subject is a scheduling server.
[0050] like Figure 2A As shown, the method 210 includes the following steps:
[0051] Step 211: The scheduling server receives a scheduling request for a target resource sent by a terminal device, wherein the target resource is a video-on-demand resource.
[0052] In this embodiment, the target resource is a video-on-demand resource, such as a video manuscript uploaded by a video creator, or a live playback file generated after a live video broadcast.
[0053] In this embodiment, the scheduling server provides scheduling services for users to access CDN. When a user accesses a target resource stored in CDN, the terminal device first sends a scheduling request to the scheduling server, and the scheduling server determines the edge node for processing the user's resource access request and returns it to the terminal device, and the terminal device then sends a resource access request to the edge node.
[0054] Step 212: The scheduling server determines a target edge node for providing target resources to the terminal device and a target relay node for providing target resources to the target edge node based on the resource storage information and node health information of the content distribution network.
[0055] In this embodiment, the resource storage information of the content distribution network refers to which resources are stored in the content distribution network and on which edge nodes each resource is stored.
[0056] In this embodiment, the node health information of the content distribution network refers to whether the operating status of each edge node and each relay node in the CDN is normal. The above operating status includes, for example, memory usage and disk capacity.
[0057] In an optional implementation, the resource storage information and node health information of the content distribution network can be obtained based on the reported information of the node. Exemplarily, the resource storage information of the content distribution network can be obtained based on the resource storage information reported by each edge node, and the node health information of the content distribution network can be obtained based on the node health information reported by each edge node and / or each relay node.
[0058] In an optional implementation, a hash algorithm may be used to determine the target edge node from edge nodes that store the target resource and are in a normal health state in step 212. The above method is conducive to ensuring that the selected target edge node can smoothly provide the target resource to the user.
[0059] In an optional implementation, a target relay node is determined from the relay nodes in a normal health state using a hash algorithm in step 212. Based on the characteristics of the hash algorithm, the above method can make the same resources return to the same relay node, avoiding the resources in the relay node being eliminated by the LRU (Least Recently Used) algorithm.
[0060] The above method is only used as an example for determining a target edge node and a target relay node, and this embodiment is not limited to the above method.
[0061] Step 213: The scheduling server sends scheduling data to the terminal device, wherein the scheduling data includes a target edge node address and a target back-to-source path, the target edge node address points to the target edge node, and the target back-to-source path points to the target relay node.
[0062] The scheduling data sent by the scheduling server to the terminal device includes both the target edge node address and the target back-to-source path. The target edge node address is used by the terminal device to send a resource access request to the target edge node, and the target back-to-source path is used by the target edge node to return the target resource to the target relay node when the target resource does not exist in the target edge node. Therefore, the resource access request sent by the terminal device to the edge node can carry the above-mentioned target back-to-source path, and the edge node can directly return to the source without querying the back-to-source path separately, which is conducive to reducing the back-to-source time and reducing the risk of back-to-source failure.
[0063] Generally speaking, different resources have different access frequencies, or different popularity. If the same storage method is used for resources of different popularity, it will lead to a waste of storage resources.
[0064] In response to the above problem, in an optional implementation, the method 210 further includes the following steps: obtaining the resource access frequency of its own storage resources reported by each edge node; determining the popularity of the target resource based on the resource access frequency of its own storage resources reported by each edge node; and determining the storage method of the target resource in multiple edge nodes based on the popularity of the target resource.
[0065] In the above method, adopting corresponding storage methods for resources of different popularity is conducive to avoiding waste of storage resources.
[0066] In the above method, the resource heat is obtained based on the resource access frequency of its own storage resources reported by the edge node. Furthermore, the heat of each resource can be updated regularly, and its storage method can be adjusted in time when the resource heat changes, so as to avoid service paralysis due to untimely response to the sudden increase in the heat of a resource.
[0067] In an optional implementation, the resources stored in the content distribution network are divided into hot resources, warm resources and cold resources according to their popularity from high to low, and each edge node corresponds to a specific region and a specific operator. The above step of "determining the storage method of the target resource in multiple edge nodes according to the popularity of the target resource" further includes: when the target resource is a hot resource, the target resource is stored in each edge node; when the target resource is a warm resource, multiple edge node clusters are selected from a region, and an edge node is selected from each edge node cluster to store the target resource; when the target resource is a cold resource, an edge node cluster is selected from a region, and then an edge node is selected from the edge node cluster to store the target resource.
[0068] Figure 3A A schematic diagram showing different hot resource storage methods according to an embodiment of the on-demand resource return method disclosed in the present invention. Figure 3A For hot resources, they are stored in each edge node; for warm resources, they are stored in only one edge node in each of the multiple clusters in a region; for cold resources, they are stored in only one edge node in one cluster in a region. It can be seen that the heat of a resource is positively correlated with the amount of storage resources allocated to it.
[0069] The above method is only an example of heat division and storage resource configuration, and the present disclosure is not limited to the above method.
[0070] In this embodiment, the CDN node directly reports resource storage information, node health information, resource access frequency and other information to the scheduling server. In other embodiments, the CDN node can report the above information to the central server, and the central server provides it to the scheduling server.
[0071] Figure 3B FIG. 1 is a schematic diagram showing a specific example of an embodiment of a method for returning to the source based on on-demand resources according to the present disclosure. Figure 3B As shown, the edge nodes and relay nodes in the CDN regularly report resource storage information and node health information to the central server, and the central server provides the above reported information to the scheduling server. Before requesting the target resource, the terminal device first sends a scheduling request to the scheduling server. The scheduling server determines the target edge node and the target relay node based on the above reported information, and sends the corresponding target edge node address and the target back-to-source path to the terminal device. Based on this, the terminal device sends a resource access request for the target resource to the target edge node, and the resource access request carries the target back-to-source path. In the case where the target resource is not stored in the target edge node, the target edge node returns to the source to the target relay node based on the target back-to-source path. In the case where the target relay node does not store the target resource, the target relay node further returns to the source station.
[0072] In the above example, the relay nodes have only one level. In other examples, the relay nodes can be divided into multiple levels, and the relay nodes at the lower level can relay back to the relay nodes at the higher level.
[0073] Figure 2B A flowchart of an embodiment of a method for returning to the source based on on-demand resources according to the present disclosure is shown, and the implementation subject is a terminal device.
[0074] like Figure 2B As shown, the method 220 includes the following steps:
[0075] Step 221: The terminal device sends a scheduling request for a target resource to a scheduling server, wherein the target resource is a video-on-demand resource.
[0076] In step 222, the terminal device receives scheduling data corresponding to the scheduling request sent by the scheduling server, the scheduling data including the target edge node address and the target return path. The target edge node address points to the target edge node used to provide the target resources to the terminal device, and the target return path points to the target relay node used to provide the target resources to the target edge node.
[0077] In step 223, the terminal device sends a resource access request for the target resource to the target edge node according to the target edge node address, wherein the resource access request carries the target back-to-source path.
[0078] In an optional implementation, after step 223, the method 220 further includes: the terminal device receives the target resource sent by the target edge node, wherein the target resource is pre-stored locally at the target edge node, or the target resource is obtained by the target edge node by requesting the target relay node based on the target back-to-source path.
[0079] The specific details and technical effects of the method 220 can be found in the above description of the method 210.
[0080] Figure 2C A flowchart of an embodiment of a method for returning to the source based on on-demand resources according to the present disclosure is shown, and the implementation subject is an edge node.
[0081] like Figure 2C As shown, the method 230 includes the following steps:
[0082] Step 231, the edge node receives a resource access request for a target resource sent by a terminal device, wherein the target resource is a VOD resource and the resource access request carries a target back-to-source path, which points to a target relay node for providing the target resource to the edge node.
[0083] Step 232: When the target resource does not exist locally, the edge node obtains the target resource from the target relay node according to the target back-to-source path.
[0084] Step 233: The edge node sends the target resource to the terminal device.
[0085] In an optional implementation, the method 230 further includes: reporting its own resource storage information and node health information to the scheduling server; or reporting its own resource storage information and node health information to the central server, so that the central server sends the resource storage information and node health information to the scheduling server.
[0086] In an optional implementation, the method 230 further includes: reporting the resource access frequency of its own storage resources to the scheduling server; or reporting the resource access frequency of its own storage resources to the central server, so that the central server sends the resource access frequency to the scheduling server.
[0087] The specific details and technical effects of the method 230 can be found in the above description of the method 210.
[0088] Figure 4A FIG. 1 shows an exemplary block diagram of a source return device based on on-demand resources according to an embodiment of the present disclosure. Figure 4A As shown, the on-demand resource-based return-to-source device 410 includes: a scheduling request receiving module 411, used to receive a scheduling request for a target resource sent by a terminal device, wherein the target resource is a on-demand resource; a scheduling data determination module 412, used to determine a target edge node for providing the target resource to the terminal device and a target relay node for providing the target resource to the target edge node based on resource storage information and node health information of the content distribution network; a scheduling data sending module 413, used to send scheduling data to the terminal device, wherein the scheduling data includes a target edge node address and a target return-to-source path, the target edge node address points to the target edge node, and the target return-to-source path points to the target relay node.
[0089] It should be understood that Figure 4A The modules of the device 410 shown in FIG. 4 can be used in conjunction with the reference Figure 2A The steps in the method 210 described above correspond to each other. Therefore, the operations, features and advantages described above for the method 210 are also applicable to the device 410 and the modules included therein. For the sake of brevity, some operations, features and advantages are not repeated here.
[0090] In an optional implementation, the resource storage information of the content distribution network is obtained based on the resource storage information reported by each of the edge nodes; and / or the node health information of the content distribution network is obtained based on the node health information reported by each of the edge nodes and / or each of the relay nodes.
[0091] In an optional embodiment, the scheduling data determination module 412 is also used to: use a hash algorithm to determine the above-mentioned target edge node from the edge nodes that store the above-mentioned target resources and are in a normal healthy state; and / or use a hash algorithm to determine the above-mentioned target relay node from the relay nodes that are in a normal healthy state.
[0092] In an optional embodiment, the device 410 also includes a heat management module, which is used to: obtain the resource access frequency of the storage resources reported by each of the above-mentioned edge nodes; determine the heat of the above-mentioned target resource based on the resource access frequency of the storage resources reported by each of the above-mentioned edge nodes; and determine the storage method of the above-mentioned target resource in the above-mentioned multiple edge nodes based on the heat of the above-mentioned target resource.
[0093] In an optional implementation, the resources stored in the above-mentioned content distribution network are divided into hot resources, warm resources and cold resources according to their heat from high to low, and each of the above-mentioned edge nodes corresponds to a specific region and a specific operator; and the heat management module is also used to: when the above-mentioned target resource is a hot resource, store the above-mentioned target resource in each of the above-mentioned edge nodes; when the above-mentioned target resource is a warm resource, select multiple edge node clusters from one region, and then select an edge node from each edge node cluster to store the above-mentioned target resource; when the above-mentioned target resource is a cold resource, select an edge node cluster from one region, and then select an edge node from it to store the target resource.
[0094] Figure 4B FIG. 1 shows an exemplary block diagram of a source return device based on on-demand resources according to an embodiment of the present disclosure. Figure 4B As shown, the on-demand resource-based return-to-source device 420 includes: a scheduling request sending module 421, used to send a scheduling request for the target resource to the scheduling server, wherein the target resource is a on-demand resource; a scheduling data receiving module 422, used to receive scheduling data corresponding to the scheduling request sent by the scheduling server, the scheduling data including a target edge node address and a target return-to-source path, the target edge node address points to a target edge node for providing the target resource to the execution subject of the method, and the target return-to-source path points to a target relay node for providing the target resource to the target edge node; a resource access request sending module 423, used to send a resource access request for the target resource to the target edge node according to the target edge node address, wherein the resource access request carries the target return-to-source path.
[0095] It should be understood that Figure 4B The various modules of the device 420 shown in FIG. Figure 2B The steps in the method 220 described above correspond to each other. Therefore, the operations, features and advantages described above for the method 220 are also applicable to the device 420 and the modules included therein. For the sake of brevity, some operations, features and advantages are not repeated here.
[0096] In an optional embodiment, the device 420 also includes a resource receiving module, which is used to: receive the above-mentioned target resources sent by the above-mentioned target edge node, wherein the above-mentioned target resources are pre-stored locally in the above-mentioned target edge node, or the above-mentioned target resources are obtained by the above-mentioned target edge node requesting the above-mentioned target relay node based on the above-mentioned target back-to-source path.
[0097] Figure 4C FIG. 1 shows an exemplary block diagram of a source return device based on on-demand resources according to an embodiment of the present disclosure. Figure 4C As shown, the on-demand resource-based return-to-source device 430 includes: a resource access request receiving module 431, which is used to receive a resource access request for a target resource sent by a terminal device, wherein the target resource is a on-demand resource, and the resource access request carries a target return-to-source path, and the target return-to-source path points to a target relay node for providing the target resource to the execution subject of the method; a return-to-source module 432, which is used to obtain the target resource from the target relay node according to the target return-to-source path when the target resource does not exist locally, and send the obtained target resource to the terminal device; a target resource sending module 433, which is used to send the target resource to the terminal device.
[0098] It should be understood that Figure 4C The various modules of the device 430 shown in FIG. 4 can be used in conjunction with the reference Figure 2C The steps in the method 230 described above correspond to each other. Therefore, the operations, features and advantages described above for the method 230 are also applicable to the device 430 and the modules included therein. For the sake of brevity, some operations, features and advantages are not repeated here.
[0099] In an optional embodiment, the device 430 also includes a first reporting module, which is used to: report its own resource storage information and node health information to the scheduling server; or report its own resource storage information and node health information to the central server, so that the above-mentioned central server sends the above-mentioned resource storage information and the above-mentioned node health information to the above-mentioned scheduling server.
[0100] In an optional implementation, device 430 also includes a second reporting module, which is used to: report the resource access frequency of its own storage resources to the scheduling server; or report the resource access frequency of its own storage resources to the central server, so that the central server sends the resource access frequency to the scheduling server.
[0101] Figure 5 Schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. Figure 5, a structural block diagram of an electronic device 500 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein. Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504. Multiple components in the device 500 are connected to the I / O interface 505, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0102] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as a return-to-source method based on on-demand resources. For example, in some embodiments, the return-to-source method based on on-demand resources may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the return-to-source method based on on-demand resources described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the on-demand resource-based source return method in any other appropriate manner (eg, by means of firmware).
[0103] The various illustrative logics, logic blocks, modules, circuits, and algorithmic processes described in conjunction with the aspects disclosed herein may be implemented as electronic hardware, computer software, or a combination of both. The interchangeability of hardware and software has been generally described in terms of functionality and illustrated in the various illustrative components, blocks, modules, circuits, and processes described above. Whether such functionality is implemented in hardware or software depends on the specific application and design constraints on the overall system.
[0104] The hardware and data processing apparatus for implementing the various illustrative logics, logic blocks, modules and circuits described in conjunction with the aspects disclosed herein can be implemented or executed with a general purpose single-chip or multi-chip processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor can be a microprocessor or any conventional processor, controller, microcontroller or state machine. The processor can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration. In some aspects, specific processes and methods can be performed by circuits specific to a given function.
[0105] In one or more aspects, the functions described may be implemented in hardware, digital electronic circuitry, computer software, firmware (including the structures disclosed in this specification and their equivalents), or any combination thereof. Aspects of the subject matter described in this specification may also be implemented as one or more computer programs, i.e., one or more modules of computer program instructions, encoded on computer storage media for execution by a data processing apparatus or to control the operation of the data processing apparatus.
[0106] If implemented in software, the function can be stored or transferred to a computer-readable medium as one or more instructions or codes. The process of the method or algorithm disclosed herein can be implemented in a software module executable by a processor, and the software module can reside on a computer-readable medium. Computer-readable media include computer storage media and communication media, and the communication media include any medium capable of transmitting a computer program from one place to another. The storage medium can be any available medium accessible by a computer. As an example and not limitation, this computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to store the required program code in the form of an instruction or data structure and can be accessed by a computer. In addition, any connection can be appropriately referred to as a computer-readable medium. The disk (Disk) and disk (disc) used herein include high-density optical disks (CDs), laser disks, optical disks, digital versatile disks (DVDs), floppy disks and blue-ray disks, wherein the disk (Disk) usually copies data magnetically, and the disk (disc) copies data optically with lasers. The above combination should also be included in the scope of computer-readable media. Additionally, the operations of a method or algorithm may be implemented as one or any combination or set of codes and instructions on a machine-readable medium and a computer-readable medium, which may be incorporated into a computer program product.
[0107] Each embodiment in the present disclosure is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, equipment embodiment, computer-readable storage medium embodiment, and computer program product embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A method for returning to the source based on on-demand resources, implemented based on a content distribution network, wherein the content distribution network includes a plurality of edge nodes and a plurality of relay nodes, and the method includes: Receiving a scheduling request for a target resource sent by a terminal device, wherein the target resource is a video-on-demand resource; Based on the resource storage information and node health information of the content distribution network, determining a target edge node for providing the target resource to the terminal device and a target relay node for providing the target resource to the target edge node; Sending scheduling data to the terminal device, wherein the scheduling data includes a target edge node address and a target back-to-source path, the target edge node address points to the target edge node, and the target back-to-source path points to the target relay node.
2. The method according to claim 1, wherein: The resource storage information of the content distribution network is obtained based on the resource storage information reported by each edge node; and / or The node health information of the content distribution network is obtained based on the node health information reported by each edge node and / or each relay node.
3. The method according to claim 1, wherein: The determining, based on the resource storage information and the node health information of the content distribution network, a target edge node for providing the target resource to the terminal device and a target relay node for providing the target resource to the target edge node comprises: Using a hash algorithm, determining the target edge node from edge nodes that store the target resource and are in a normal health state; and / or The target relay node is determined from the relay nodes in normal health status by using a hash algorithm.
4. The method according to claim 1, wherein: The method further comprises: Obtaining resource access frequencies of storage resources reported by each edge node; Determining the heat of the target resource according to the resource access frequency of its own storage resources reported by each edge node; A storage method of the target resource in the plurality of edge nodes is determined according to the popularity of the target resource.
5. The method according to claim 4, wherein: The resources stored in the content distribution network are divided into hot resources, warm resources and cold resources according to their popularity from high to low, and each edge node corresponds to a specific region and a specific operator; as well as The step of determining the storage mode of the target resource in the plurality of edge nodes according to the popularity of the target resource includes: In the case where the target resource is a hot resource, storing the target resource in each of the edge nodes; When the target resource is a warm resource, multiple edge node clusters are selected from a region, and an edge node is selected from each edge node cluster to store the target resource; In the case where the target resource is a cold resource, an edge node cluster is selected from a region, and then an edge node is selected from the cluster to store the target resource.
6. A method for returning to the source based on on-demand resources, implemented based on a content distribution network, wherein the content distribution network includes a plurality of edge nodes and a plurality of relay nodes, and the method includes: Sending a scheduling request for a target resource to a scheduling server, wherein the target resource is a video-on-demand resource; Receiving scheduling data corresponding to the scheduling request sent by the scheduling server, the scheduling data including a target edge node address and a target back-to-source path, the target edge node address pointing to a target edge node for providing the target resource to the execution subject of the method, and the target back-to-source path pointing to a target relay node for providing the target resource to the target edge node; According to the target edge node address, a resource access request for the target resource is sent to the target edge node, wherein the resource access request carries the target back-to-source path.
7. The method according to claim 1, wherein: After sending a resource access request for the target resource to the target edge node according to the target edge node address, the method further includes: The target resource sent by the target edge node is received, wherein the target resource is pre-stored locally in the target edge node, or the target resource is obtained by the target edge node by requesting the target relay node based on the target back-to-source path.
8. A method for returning to the source based on on-demand resources, implemented based on a content distribution network, wherein the content distribution network includes a plurality of edge nodes and a plurality of relay nodes, and the method includes: Receiving a resource access request for a target resource sent by a terminal device, wherein the target resource is a video-on-demand resource, and the resource access request carries a target back-to-source path, and the target back-to-source path points to a target relay node for providing the target resource to an execution subject of the method; If the target resource does not exist locally, obtaining the target resource from the target relay node according to the target back-to-source path; The target resource is sent to the terminal device.
9. The method according to claim 8, wherein: The method further comprises: Report its own resource storage information and node health information to the scheduling server; or Report its own resource storage information and node health information to the central server, so that the central server sends the resource storage information and the node health information to the scheduling server.
10. The method according to claim 8, wherein: The method further comprises: Report the resource access frequency of its own storage resources to the scheduling server; or Report the resource access frequency of its own storage resources to the central server, so that the central server can send the resource access frequency to the scheduling server.
11. A source return device based on on-demand resources, implemented based on a content distribution network, the content distribution network includes multiple edge nodes and multiple relay nodes, the device includes: A scheduling request receiving module, used to receive a scheduling request for a target resource sent by a terminal device, wherein the target resource is a video-on-demand resource; A scheduling data determination module, configured to determine a target edge node for providing the target resource to the terminal device and a target relay node for providing the target resource to the target edge node based on resource storage information and node health information of the content distribution network; A scheduling data sending module is used to send scheduling data to the terminal device, wherein the scheduling data includes a target edge node address and a target return path, the target edge node address points to the target edge node, and the target return path points to the target relay node.
12. A source return device based on on-demand resources, implemented based on a content distribution network, the content distribution network includes multiple edge nodes and multiple relay nodes, the device includes: A scheduling request sending module, used to send a scheduling request for a target resource to a scheduling server, wherein the target resource is a video-on-demand resource; a scheduling data receiving module, configured to receive scheduling data corresponding to the scheduling request sent by the scheduling server, wherein the scheduling data includes a target edge node address and a target back-to-source path, wherein the target edge node address points to a target edge node for providing the target resource to the execution subject of the method, and the target back-to-source path points to a target relay node for providing the target resource to the target edge node; A resource access request sending module is used to send a resource access request for the target resource to the target edge node according to the target edge node address, wherein the resource access request carries the target back-to-source path.
13. A source return device based on on-demand resources, implemented based on a content distribution network, the content distribution network includes multiple edge nodes and multiple relay nodes, the device includes: A resource access request receiving module, configured to receive a resource access request for a target resource sent by a terminal device, wherein the target resource is a video-on-demand resource, and the resource access request carries a target back-to-source path, and the target back-to-source path points to a target relay node for providing the target resource to an execution subject of the method; A back-to-source module, configured to, when the target resource does not exist locally, obtain the target resource from the target relay node according to the target back-to-source path, and send the obtained target resource to the terminal device; The target resource sending module is used to send the target resource to the terminal device.
14. A computer program product, comprising program code instructions, which, when the program product is executed by a computer, cause the computer to execute the method according to any one of claims 1 to 12.
15. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-12.
16. An electronic device, comprising: processor, a memory in electronic communication with the processor; as well as Instructions, which are stored in the memory and can be executed by the processor to enable the electronic device to perform the method according to any one of claims 1-12.
Citation Information
Cited By
Multi-level streaming media cascade and cluster scheduling system and method
CN121771171A
