Scheduling Method, Device, Equipment and Storage Medium for Video Distribution Nodes
By implementing the scheduling method of video distribution nodes in the central scheduler of the content distribution network, the problems of low bandwidth utilization and frequent return times in the prior art are solved, and efficient bandwidth resource utilization and node service life extension are achieved.
Patent Information
- Application Number
- CN202211258822.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2042-10-14
AI Technical Summary
While improving the bandwidth utilization rate of video distribution nodes, it is difficult to effectively reduce the number of return times of edge nodes in the hot-film computer room, resulting in a shortening of the service life of the node and wasting bandwidth resources.
By implementing a scheduling method for video distribution nodes in the central scheduler of the content distribution network, if the target video requested by the client is recorded in the historical hot-film list, the edge node in the hot-film room with bandwidth utilization meets the preset conditions is selected as the target edge node, and priority is given to the nodes that store the target video, and a new node is selected if it is not stored.
This improves the bandwidth utilization rate of video distribution nodes, reduces the number of return times of edge nodes in the hot-film computer room, extends the service life of nodes, and optimizes the utilization of bandwidth resources.
Smart Images

Figure CN115633095B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of content distribution network, and in particular to a scheduling method, device, equipment and storage medium for a video distribution node. Background Art
[0002] The content distribution network is a mainstream network architecture currently used by video service providers. The content distribution network consists of a central scheduler and multiple edge nodes (equivalent to server devices). The central scheduler is used to dispatch the client's video acquisition request to an edge node, which sends the corresponding video stored locally to the client, or when the corresponding video is not stored locally, obtains the corresponding video from other edge nodes through back-to-source and provides it to the client. Back-to-source means that when an edge node does not have the video requested by the client, it requests the video from another edge node.
[0003] Currently, video service providers generally distribute multiple edge nodes in the Internet Data Center (IDC) computer rooms of different manufacturers, and use the computer rooms with better quality and lower bandwidth costs as hot computer rooms, and use other computer rooms as cold computer rooms. The edge nodes in the hot computer rooms are used to store a small number of hot videos with higher popularity, while the edge nodes in the cold computer rooms store the full amount of videos.
[0004] The edge nodes in the hot film room have a small storage space. Therefore, if the acquisition requests of hot videos are frequently dispatched to one of the edge nodes, the edge node will frequently return to the source, which will cause the edge node to frequently erase and write to the disk, reducing the service life of the edge node. If too few acquisition requests are dispatched, the bandwidth of the edge node will not be fully utilized.
[0005] Therefore, how to reasonably schedule the edge nodes of the hot film room while improving bandwidth utilization and minimizing the number of return calls has become an urgent problem to be solved in the field of video distribution. Summary of the invention
[0006] In view of the above-mentioned shortcomings of the prior art, the present invention provides a scheduling method, device, equipment and storage medium for a video distribution node to improve the scheduling efficiency of the video distribution node.
[0007] In a first aspect, the present application provides a scheduling method for a video distribution node, which is applied to a central scheduler of a content distribution network, wherein the content distribution network includes the central scheduler and a plurality of edge nodes for distributing videos, and the method includes:
[0008] Receive a video acquisition request from a client carrying an identifier of a target video;
[0009] If the target video is recorded in the preset list of historical popular videos, select any edge node that meets the preset utilization condition of bandwidth utilization and is deployed in the hot video server room as the target edge node;
[0010] Determine whether the target edge node stores the target video;
[0011] If the target edge node stores the target video, schedule the target edge node to the client;
[0012] If the target edge node does not store the target video, return to execute the step of selecting any edge node that meets the preset utilization condition of bandwidth utilization and is deployed in the hot video server room as the target edge node to determine a new target edge node.
[0013] Optionally, the step of selecting any edge node that meets the preset utilization condition of bandwidth utilization and is deployed in the hot video server room as the target edge node includes:
[0014] Select any hot video server room whose overall bandwidth of the server room is less than or equal to the preset threshold water level of the server room;
[0015] Among the multiple edge nodes deployed in the selected hot video server room, select any edge node whose node bandwidth water level is less than the preset serviceable bandwidth water level as the target edge node.
[0016] Optionally, after receiving the video acquisition request carried by the client with the identifier of the target video, it further includes:
[0017] If the target video is not recorded in the historical popular video list, select any edge node deployed in the cold video server room as the target edge node.
[0018] Optionally, before returning to execute the step of selecting any edge node that meets the preset utilization condition of bandwidth utilization and is deployed in the hot video server room as the target edge node, it further includes:
[0019] Judge whether the node bandwidth water level of the target edge node matches the popularity of the target video;
[0020] If the node bandwidth water level of the target edge node matches the popularity of the target video, schedule the target edge node to the client;
[0021] If the node bandwidth water level of the target edge node does not match the popularity of the target video, return to execute the step of selecting any edge node that meets the preset utilization condition of bandwidth utilization and is deployed in the hot video server room as the target edge node.
[0022] The second aspect of the present application provides a scheduling device for a video distribution node, which is applied to a central scheduler of a content distribution network. The content distribution network includes the central scheduler and multiple edge nodes for distributing videos. The device includes:
[0023] A receiving unit, configured to receive a video acquisition request carried by a client with an identifier of a target video;
[0024] A selection unit, configured to, if the target video is recorded in a preset historical hot video list, select any edge node deployed in a hot video computer room and having a bandwidth utilization rate meeting a preset utilization rate condition as a target edge node;
[0025] A determination unit, configured to determine whether the target edge node stores the target video;
[0026] A scheduling unit, configured to, if the target edge node stores the target video, schedule the target edge node to the client;
[0027] The selection unit is configured to, if the target edge node does not store the target video, return to execute the step of selecting any edge node deployed in a hot video computer room and having a bandwidth utilization rate meeting a preset utilization rate condition as a target edge node to determine a new target edge node.
[0028] Optionally, when the selection unit selects any edge node deployed in a hot video computer room and having a bandwidth utilization rate meeting a preset utilization rate condition as a target edge node, it is specifically configured to:
[0029] Select any hot video computer room with an overall bandwidth of the computer room less than or equal to a preset computer room threshold water level;
[0030] Among multiple edge nodes deployed in the selected hot video computer room, select any edge node with a node bandwidth water level less than a preset serviceable bandwidth water level as a target edge node.
[0031] Optionally, the selection unit is further configured to:
[0032] If the target video is not recorded in the historical hot video list, select any edge node deployed in a cold video computer room as a target edge node.
[0033] Optionally, the scheduling unit is further configured to:
[0034] Judge whether the node bandwidth water level of the target edge node matches the popularity of the target video;
[0035] If the node bandwidth water level of the target edge node matches the popularity of the target video, schedule the target edge node to the client;
[0036] The selection unit is used for:
[0037] If the node bandwidth water level of the target edge node does not match the popularity of the target video, return and execute any edge node deployed in the hot slice computer room with a bandwidth utilization rate meeting the preset utilization rate condition as the target edge node.
[0038] The third aspect of the present application provides an electronic device, including a memory and a processor;
[0039] Wherein, the memory is used for storing a computer program;
[0040] The processor is used for executing the computer program, specifically for implementing the scheduling method of the video distribution node provided in any item of the first aspect of the present application.
[0041] The fourth aspect of the present application provides a computer storage medium for storing a computer program, which when executed, is specifically used for implementing the scheduling method of the video distribution node provided in any item of the first aspect of the present application.
[0042] The present application provides a scheduling method, device, equipment and storage medium for video distribution nodes, which is applied to the central scheduler of a content distribution network. The content distribution network includes a central scheduler and multiple edge nodes for distributing videos. The method includes: if the target video requested by the client is recorded in the historical hot slice list, select an edge node in the hot slice computer room with a bandwidth utilization rate meeting the utilization rate condition as the target edge node, and after determining that the target edge node stores the target video, schedule the target edge node to the client. If the target edge node does not store the target video, select a new target edge node. This solution schedules according to the bandwidth utilization rate and preferentially schedules the client to the edge node storing the target video, achieving the effect of minimizing the number of backhaul times of the edge nodes in the hot slice computer room while improving the bandwidth utilization rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0044] Figure 1 It is a signaling interaction schematic diagram of a video distribution process provided by an embodiment of the present application;
[0045] Figure 2 It is a flowchart of a scheduling method for video distribution nodes provided by an embodiment of the present application;
[0046] Figure 3 It is a flowchart of a method for maintaining a heat sheet list provided by an embodiment of the present application;
[0047] Figure 4 It is a flowchart of a method for matching the node bandwidth water level with the current popularity of a video provided by an embodiment of the present application;
[0048] Figure 5 It is a schematic diagram of matching the node bandwidth water level with the current popularity of a file provided by an embodiment of the present application;
[0049] Figure 6 It is a schematic diagram of the structure of a scheduling device for a video distribution node provided by an embodiment of the present application;
[0050] Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0051] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0052] To facilitate understanding of the technical solutions of the present application, first, in conjunction with Figure 1 A brief description of the video distribution process will be given. Figure 1 It is a schematic diagram of signaling interaction in the video distribution process.
[0053] S101, the client requests a video.
[0054] In this step, the client can send the uniform resource locator (URL) of the video to be played to the central scheduler of the content distribution network, thereby requesting the corresponding video.
[0055] S102, schedule an edge node.
[0056] After receiving the request from the client, the central scheduler executes step S102, thereby selecting an edge node from multiple edge nodes to provide the video corresponding to the URL for the client.
[0057] As an example, the central scheduler selects the first edge node to provide the required video for the client through scheduling.
[0058] S103, feedback the node address.
[0059] After the central scheduler selects the edge node providing the video, it can feed back the address of the edge node in the network, ie, the node address, to the client in step S103. Continuing with the above example, the central scheduler feeds back the node address of the first edge node to the client.
[0060] S104, request to obtain the video.
[0061] After receiving the node address fed back by the central scheduler, the client executes S104 to request the edge node pointed to by the node address to obtain the required video. Continuing with the above example, after receiving the node address of the first edge node, the client requests the first edge node to obtain the video.
[0062] S105, checking whether there is a corresponding video.
[0063] After receiving the request from the client, the edge node executes step S105 to check whether the video requested by the client exists in the locally stored videos. If the video requested by the client exists, the video is directly fed back to the client, and the video distribution ends. If the video requested by the client does not exist, step S106 needs to be executed, that is, to return to other edge nodes to obtain the video requested by the client.
[0064] Continuing with the above example, after the client requests the first edge node to obtain a video, the first edge node checks whether the requested video is stored locally. If it is found that the requested video is not stored locally, step S106 is executed.
[0065] S106: Video does not exist, request to return to the source.
[0066] When an edge node receives a request from a client and finds that the requested video does not exist locally, it requests to return to the source from other edge nodes storing the requested video. Specifically, it requests to obtain the video from other edge nodes storing the requested video.
[0067] It can be understood that the request to return to the source carries the identifier of the video requested to be obtained (for example, the URL of the video).
[0068] Continuing with the above example, after the first edge node finds that the requested video is not available locally, it executes step S106 to request the second edge node to return the video to the source.
[0069] S107, feeding back the video to the source.
[0070] After any edge node receives a request from another edge node to return to the source, if the requested video is stored locally, step S107 is executed to feed back the requested video to the edge node that initiated the return to the source.
[0071] Continuing with the foregoing example, after the first edge node requests a return to the source from the second edge node, the second edge node executes step S107 and feeds back the video requested by the first edge node to return to the source (which is also the video requested by the client) to the first edge node.
[0072] S108, Feed back the video returned to the source.
[0073] S109, Cache the video returned to the source.
[0074] After an edge node obtains a video from another edge node through source return, it executes steps S108 and S109 respectively. On the one hand, it feeds back the video obtained from the source return to the client that requests the video. On the other hand, it stores the video obtained from the source return locally. When a client requests to obtain this video later, it can directly feed back this video to the client.
[0075] Continuing with the foregoing example, after the first edge node obtains the video requested by the client from the second edge node through source return, it executes step S108, feeds back the video requested by the client obtained from the source return to the client, and executes step S109 to store the video obtained from the source return locally.
[0076] From the above video distribution process, it can be seen that for edge nodes, especially those deployed in hot film computer rooms, due to limited storage space, if this edge node frequently requests source return, it will cause this edge node to frequently delete the original videos on the disk and write the new videos obtained from the source return, shortening the service life of the disks in the edge node. And each source return will occupy the bandwidth resources of the edge node, affecting the speed at which the edge node feeds back videos to the client. Therefore, how to reasonably schedule the edge nodes in the hot film computer room and reduce the number of source returns of the edge nodes in the hot film computer room has become an urgent problem to be solved in the field of video content distribution.
[0077] An existing solution to this problem is to pre-push hot videos to the edge nodes during the off-peak period of business (that is, the time period when the video requests from the client are relatively few, such as the early morning period). In this way, during the peak period of business (that is, the time period when the video requests from the client are relatively many), when the client requests a hot video from the edge node, the edge node does not need to perform source return.
[0078] The problem with this method is that for some videos that need to be pushed after entering the peak period of business, and some videos with a short heat cycle, such as those with low heat during the off-peak period of business and suddenly increasing heat after entering the peak period of business, they cannot be pushed in time.
[0079] Embodiment 1
[0080] In view of the above problems, this application provides a scheduling method for video distribution nodes. Please refer to Figure 2, is a flowchart of the method, and the method may include the following steps.
[0081] The method is applied to the central scheduler of a content delivery network, which includes a central scheduler and multiple edge nodes for distributing videos.
[0082] In this embodiment, each step can be executed by the central scheduler in the content delivery network.
[0083] S201, Receive a video acquisition request from the client.
[0084] The video acquisition request carries the video identifier of at least one video that the client needs to acquire. For example, it can be the file encoding (File ID, FID) of the video that the client needs to acquire.
[0085] The video corresponding to the video identifier carried in the video acquisition request is called the target video.
[0086] Step S201 is equivalent to receiving a video acquisition request from the client carrying the identifier of the target video.
[0087] S202, Determine whether the target video is in the historical hot video list.
[0088] If the target video is in the historical hot video list, execute step S203; if the target video is not in the historical hot video list, execute step S208.
[0089] In some optional embodiments, the historical hot video list can be maintained regularly, that is, every time a preset hot video maintenance period elapses, the historical hot video list is updated once according to a specific maintenance method. The length of the hot video maintenance period can be set according to the actual situation, and this embodiment does not make a limitation.
[0090] The historical hot video list can be specifically stored in the central scheduler. The historical hot video list is used to record the hot videos that have appeared in the recent period (for example, the recent 48 hours).
[0091] The hot video can be defined as the video that ranks among the top N (sorted from high to low in terms of popularity) in terms of popularity among all videos. The popularity of the video can be defined as the number of video acquisition requests for acquiring this video within a short period of time, such as within the recent 5 minutes or within the recent 10 minutes. Exemplarily, for video A, if the central scheduler receives 50 video acquisition requests for acquiring video A within the recent 10 minutes, then the popularity of video A is 50.
[0092] S203, Select a hot video machine room whose overall bandwidth of the machine room is less than or equal to the preset machine room threshold water level line.
[0093] The central scheduler first selects each hot chip computer room that is currently in normal working condition (ie, there is no fault at present), and then counts the overall bandwidth of these hot chip computer rooms in normal working condition one by one to see whether it is less than or equal to the computer room threshold water level line.
[0094] The overall bandwidth of the computer room represents the sum of the bandwidth currently occupied by all edge nodes deployed in the computer room. In step S203, the overall bandwidth of the computer room can be represented by the sum of the bandwidth resources currently occupied by all edge nodes in the computer room as a percentage of all bandwidth resources that the computer room can provide.
[0095] For example, the overall bandwidth of the computer room may be 50%, which means that the sum of the bandwidth resources occupied by all edge nodes in the computer room accounts for 50% of all the bandwidth resources that the computer room can provide.
[0096] The threshold waterline of the computer room is also a preset percentage. The threshold waterline of the computer room can be understood as the bandwidth waterline suitable for the computer room. If the overall bandwidth of the computer room exceeds the threshold waterline, the edge nodes in the computer room may be affected. Therefore, after the overall bandwidth of the computer room exceeds the threshold waterline, it is not suitable to schedule the edge nodes in the computer room.
[0097] Optionally, in step S203, if it is found that each current hot-chip computer room does not meet the condition that the overall bandwidth of the computer room is less than or equal to the computer room threshold water level line, or it is found that each hot-chip computer room that meets this condition has been selected in this scheduling process, you can jump to step S208.
[0098] S204, selecting a target edge node in the selected hot chip computer room, whose node bandwidth water level is less than or equal to the serviceable bandwidth water level.
[0099] Optionally, each edge node may be set with a serviceable bandwidth water level, and the serviceable bandwidth water levels may be the same or different between different edge nodes.
[0100] The central scheduler can screen out edge nodes in the selected hot chip computer room, whose bandwidth water level of each node is not greater than (i.e., less than or equal to) the serviceable bandwidth water level, which is currently in normal working condition (i.e., no failure has occurred) and has not been selected in this scheduling process, and then randomly select an edge node from the screened one or more edge nodes as the target edge node.
[0101] One or more edge nodes can be deployed in a hot chip computer room. Specifically, multiple edge servers can be set up in a hot chip computer room, and one or more edge servers can form an edge node.
[0102] The node bandwidth water level reflects the amount of bandwidth currently occupied by an edge node. Generally, the percentage of the currently occupied bandwidth resources of an edge node in all available bandwidth resources of the edge node can be used as the node bandwidth water level of the edge node. Generally, the node bandwidth water level can be represented by the ratio obtained by dividing the current bandwidth of the edge node by the original egress bandwidth of the edge node.
[0103] The serviceable bandwidth water level can be understood as the maximum bandwidth that an edge node is suitable for providing video downloads to clients. That is to say, when the node bandwidth water level of an edge node is less than or equal to the serviceable bandwidth water level, the edge node can send videos to the client at the expected rate. When the node bandwidth water level is greater than the serviceable bandwidth water level, the edge node will be affected when sending videos to the client, that is, it cannot send videos to the client at the expected rate. Therefore, in this case, the edge node is not suitable for providing download services to the client.
[0104] The serviceable bandwidth water level can also be represented by a percentage, and its specific value can be set according to factors such as the performance of the edge node, which is not limited in this embodiment.
[0105] It should be noted that each time step S204 is executed, it will be selected from the edge nodes that meet the above conditions that the node bandwidth water level is less than or equal to the serviceable bandwidth water level and have not been selected during the current scheduling process. If there are no edge nodes that meet the above conditions in the currently selected hot video server room, or every edge node that meets the above conditions has been selected, then step S203 can be returned to execute, and a new hot video server room can be selected again.
[0106] Further optionally, if for each hot video server room that meets the conditions in step S203, the deployed edge nodes do not meet the conditions of step S204, or all the edge nodes that meet the conditions during the execution of step S204 have been selected, then step S208 can be jumped to.
[0107] Optionally, in step S204, the target edge node can be selected from at least one edge node that meets the conditions according to the consistent hashing algorithm. The consistent hashing algorithm is an existing algorithm, and its specific implementation process can be referred to relevant technical literature and will not be elaborated here.
[0108] It can be understood that both the overall bandwidth of the server room and the node bandwidth water level reflect the bandwidth utilization rate of the edge node. Correspondingly, the overall bandwidth of the server room being less than or equal to the server room threshold water level, and the node bandwidth water level being less than or equal to the preset serviceable bandwidth water level are both equivalent to the preset bandwidth utilization rate conditions.
[0109] Therefore, steps S202 to S204 are equivalent to:
[0110] If the target video is recorded in the preset list of historical popular videos, select any edge node that meets the preset utilization condition of bandwidth utilization and is deployed in the hot video computer room as the target edge node.
[0111] Among them, S203 is equivalent to: selecting any hot video computer room whose overall bandwidth of the computer room is less than or equal to the preset valve value water level of the computer room.
[0112] S204 is equivalent to: among the multiple edge nodes deployed in the selected hot video computer room, select any edge node whose node bandwidth water level is less than the preset serviceable bandwidth water level as the target edge node.
[0113] S205, retrieve the corresponding relationship between the target video and the target edge node in the file-node relationship table.
[0114] If the corresponding relationship between the target video and the target edge node is not found after retrieval, execute step S206. If the corresponding relationship between the target video and the target edge node is found after retrieval, execute step S207.
[0115] The file-node relationship table is used to record several corresponding relationships between videos and edge nodes, and each corresponding relationship has a timestamp, which represents the time when the corresponding relationship was last updated.
[0116] A corresponding relationship in the file-node relationship table can indicate that the video in the corresponding relationship is stored in the edge node in the corresponding relationship. For example, a corresponding relationship can be that video A corresponds to edge node 1, and this corresponding relationship means that edge node 1 stores video A.
[0117] Therefore, step S205 is equivalent to determining whether the target video is stored in the target edge node.
[0118] In an embodiment that does not include step S206, if the above corresponding relationship is not found in S205, then return to execute step S204, and this situation is equivalent to:
[0119] If the target video is not stored in the target edge node, return to execute selecting any edge node that meets the preset utilization condition of bandwidth utilization and is deployed in the hot video computer room as the target edge node to determine a new target edge node.
[0120] S206, judge whether the node bandwidth water level of the target edge node matches the popularity of the target video.
[0121] If the node bandwidth water level of the target edge node matches the popularity of the target video, then execute step S207. If the node bandwidth water level of the target edge node does not match the popularity of the target video, then return to execute step S204.
[0122] For the specific judgment method, please refer to the description of Embodiment 3 below, and details are not elaborated here.
[0123] It should be noted that step S206 is an optional step. That is to say, in some alternative embodiments, if it is found that there is no corresponding relationship between the target video and the target edge node in the file node relationship table, step S204 can be directly returned to find a new target edge node, without determining whether the node bandwidth water level of the target edge node matches the popularity of the target video.
[0124] Step S206 is equivalent to: determining whether the node bandwidth water level of the target edge node matches the popularity of the target video.
[0125] Among them, after step S206 determines that the node bandwidth water level of the target edge node matches the popularity of the target video, step S207 is executed, which is equivalent to:
[0126] If the node bandwidth water level of the target edge node matches the popularity of the target video, schedule the target edge node to the client.
[0127] Correspondingly, after determining that the two do not match, step S204 is executed, which is equivalent to:
[0128] If the node bandwidth water level of the target edge node does not match the popularity of the target video, return to execute the step of selecting an edge node that meets the preset utilization condition of bandwidth utilization and is deployed in the hot slice computer room as the target edge node.
[0129] S207, update the corresponding relationship between the target video and the target edge node in the file node relationship table, and schedule the target edge node to the client.
[0130] The above update of the corresponding relationship may specifically include the following operations:
[0131] A1. Determine whether there is a corresponding relationship between the target video and the target edge node in the file node relationship table. If there is, skip A1 and execute A2. If not, add a corresponding relationship between the target video and the target edge node to the file node relationship table.
[0132] A2. Set the timestamp of the corresponding relationship between the target video and the target edge node in the file node relationship table to the moment when step S207 is executed. Among them, if there is already such a corresponding relationship in the file node relationship table, use the moment when S207 is executed this time as the timestamp to replace the timestamp before this corresponding relationship. If this corresponding relationship is a newly added corresponding relationship in step A1, directly set the moment when S207 is executed as the timestamp of this corresponding relationship.
[0133] Scheduling the target edge node to the client means sending the node address of the target edge node to the client, so that the client can request the target video from the target edge node according to the node address.
[0134] Step S207 is equivalent to scheduling the target edge node to the client if the target edge node stores the target video.
[0135] S208: Select an edge node in the cold slice computer room as the target edge node.
[0136] After executing step S208, return to execute step S207.
[0137] For the process of selecting the cold slice computer room in step S208 and selecting the edge node in the cold slice computer room as the target edge node, reference can be made to the relevant existing technologies and will not be elaborated here.
[0138] Step S208 is equivalent to:
[0139] If the target video is not recorded in the historical hot slice list, select any edge node deployed in the cold slice computer room as the target edge node.
[0140] S209: Periodically delete the corresponding relationships in the file node relationship table whose retention time is greater than the preset expiration threshold.
[0141] Step S209 can be executed once every preset cleaning period. This cleaning period can be the same as or different from the hot slice maintenance period, and there is no limitation.
[0142] For each corresponding relationship in the file node relationship table, its retention time can be the difference between the timestamp corresponding to this corresponding relationship and the current moment. The length of the expiration threshold can be set according to actual needs, and there is no limitation in this embodiment.
[0143] It can be understood that step S209 is an optional step. In some alternative embodiments, the expired (i.e., the retention time is greater than the preset expiration threshold) corresponding relationships can also be deleted irregularly. That is to say, each corresponding relationship in the file node relationship table can be retained all the time.
[0144] The advantage of executing step S209 is that by periodically deleting the expired corresponding relationships, the data volume of the file node relationship table can be reduced, avoiding occupying too much storage space of the central scheduler.
[0145] The beneficial effects of this embodiment are as follows:
[0146] On the one hand, through steps S203 and S204, the central scheduler can preferentially schedule the clients requesting videos to the hot slice computer rooms with relatively low current bandwidth occupancy and the edge nodes therein, so that the bandwidth utilization rates of each hot slice computer room and each edge node deployed within the hot slice computer room are as close as possible to the corresponding computer room threshold water level line and the serviceable bandwidth water level, achieving the improvement of bandwidth utilization.
[0147] On the other hand, through step S205, this embodiment can preferentially schedule the clients to the edge nodes that locally store the target videos, thereby minimizing the number of times the edge nodes deployed within the hot slice computer room need to return to the source, and prolonging the service life of the disks of the edge nodes.
[0148] Embodiment 2
[0149] As mentioned above, the historical hot slice table can be maintained regularly. The following provides a method for maintaining the historical hot slice table. Please refer to Figure 3 , which is the flowchart of the method for maintaining the historical hot slice table provided in this embodiment.
[0150] The maintenance of the historical hot slice table can also be performed by the central scheduler.
[0151] S301, record the request quantity of each video in the current video list in real time.
[0152] The current video list is used to record all the videos stored in the content delivery network.
[0153] The request quantity of a video refers to the number of video acquisition requests for this video received by the central scheduler.
[0154] S302, start the timer to count until a preset heat period ends.
[0155] The heat period is the time period for counting the video acquisition request quantity in the definition of video heat in step S202. The length of the heat period can be set according to actual needs and is not limited in this embodiment. Exemplarily, the heat period can be set to 10 minutes. That is to say, when the timer starts and counts to 10 minutes, the following steps are executed.
[0156] S303, update the historical hot slice list according to the videos ranked in the top N positions in the current video list in descending order of heat.
[0157] Each time step S303 is executed, the heat of the videos in the current video list can be represented by the request quantity of this video counted within the most recent heat period. For example, if the heat period is 10 minutes, when S303 is executed, if 60 video acquisition requests for a video in the current video list are received within the most recent 10 minutes, then the heat of this video is 60.
[0158] Step S303 may specifically include the following steps:
[0159] First, determine whether the top N videos (i.e., the first N videos) with the highest to lowest popularity in the current video list are all recorded in the historical hot video list. If there is a video in the first N videos that has not been recorded in the historical hot video list, add it to the historical hot video list.
[0160] Then, update the popularity of the above-mentioned first N videos recorded in the historical hot video list to the popularity recorded in the current video list when executing S303. For example, before executing S303, the popularity of a certain video B in the historical hot video list is 100. When executing S303, it is found that video B belongs to the above-mentioned first N videos, and the popularity of video B recorded in the current video list is 90, then update the popularity of video B in the historical hot video list to 90 as well.
[0161] Finally, update the timestamps of the above-mentioned first N videos recorded in the historical hot video list to the current time point (i.e., the time point when executing S303).
[0162] S304. Clear the request count of each video recorded in the current video list.
[0163] In this embodiment, every time a popularity cycle passes, after obtaining the request counts (i.e., the popularity of each video) of each video statistically within the popularity cycle, clear the request counts statistically within this popularity cycle, and then start re-statistical the request count of each video from 0 in the next popularity cycle, so as to ensure that only the request counts of each video in the most recent one popularity cycle are recorded in the current video list all the time. In this way, when executing step S303, the request counts of each video recorded in the current video list can be directly determined as the popularity corresponding to the video.
[0164] S305. Delete the expired videos in the historical hot video list.
[0165] An expired video refers to a video in the historical hot video list whose retention time exceeds a preset hot video cleaning cycle. The retention time of a video can be represented by the duration between the timestamp of the video in the historical hot video list and the current moment (i.e., the moment when executing step S305). For example, when executing S305 at time T0, the timestamp of a certain video in the historical hot video list is T1, then the retention time of this video is T0 - T1. If T0 - T1 is greater than the hot video cleaning cycle, then this video is an expired video.
[0166] The length of the hot video cleaning cycle can be set as needed without limitation. Exemplarily, the hot video cleaning cycle can be set to 48 hours.
[0167] S306. Clear the timer.
[0168] After executing step S306, return to execute step S302. That is to say, in this embodiment, steps S303 to S306 are executed once every heat cycle, so as to update the historical hot video list every other heat cycle.
[0169] Embodiment III
[0170] Please refer to Figure 4 , which is a flowchart of the process for determining whether the node bandwidth water level matches the current heat of the video provided by the embodiment of the present application. This process may include the following steps.
[0171] S401, calculate the node bandwidth water level and the heat range value of the video in the historical hot video list.
[0172] The node bandwidth water level can be obtained by dividing the current bandwidth of the edge node by the original egress bandwidth, that is, node bandwidth water level = current bandwidth / original egress bandwidth. The node bandwidth water level can be represented by L.
[0173] After calculating the node bandwidth water level, it is possible to first determine whether the currently matched edge node and video satisfy that the video belongs to the historical hot video list and the node bandwidth water level of the edge node does not exceed the preset threshold, that is, the available service bandwidth water level.
[0174] After determining that the above conditions are met, the heat range value of the video can be calculated according to the following method.
[0175] The heat range value of the video can be represented by H in this embodiment. When calculating the heat range value H of the video, first sort all the videos recorded in the historical hot video list in reverse order according to the corresponding heat, that is, sort from high to low according to the heat. After sorting, the video with the highest heat is ranked first in the list, and the video with the lowest heat is ranked last in the list.
[0176] After sorting is completed, let the position of the currently matched video in the sorted list be the Pth position, and there are N videos recorded in the historical hot video list in total. Then, the heat range value H of the currently matched video can be calculated according to the formula: H = 1 - P / N.
[0177] According to the above calculation process, it can be seen that the heat range value of the video represents what percentage of the videos in the historical hot video list the current matched video's heat exceeds, or it represents the proportion of the videos with a lower heat than the current matched video.
[0178] Please refer to Figure 5 , which is an example diagram of the matching between the node bandwidth water level and the current heat of the video. Figure 5Let (1) represent the heat range value of the currently matched video, and (2) represent the node bandwidth water level of the currently matched node. It can be seen from (2) that the node bandwidth water level of the currently matched node is 70%. Therefore, only when the heat range value of the matched video is greater than or equal to 70% can it be determined that the video and the node are matched, and then the node is scheduled to the client requesting the video.
[0179] Exemplarily, for video A, the calculated heat range value of video A through the above steps is 70%, which is greater than or equal to the node bandwidth water level of 70% of the currently matched node. Thus, it can be determined that video A and the currently matched node are successfully matched.
[0180] In some optional embodiments, the historical hot video list used in the above process of the heat range value can also be replaced with the current video list described in Embodiment 2. The corresponding calculation method is the same as the method calculated according to the historical hot video list above, and will not be elaborated here.
[0181] S402, determine whether the heat range value of the video is less than the node bandwidth water level.
[0182] If the heat range value of the video is less than the node bandwidth water level, execute step S403. The heat range value of the video being less than the node bandwidth water level indicates that the video and the node are not successfully matched, and the request for the video cannot be scheduled to the node.
[0183] If the heat range value of the video is greater than or equal to the node bandwidth water level, execute step S404. The heat range value of the video being greater than or equal to the node bandwidth water level indicates that the video and the node are successfully matched, and the request for the video can be scheduled to the node.
[0184] In some optional embodiments, a heat adjustment factor K can be introduced to adjust the matching result. Specifically, after obtaining the heat range value of the currently matched video, multiply this heat range value by the heat adjustment factor of the currently matched node to obtain the weighted heat range value of the video. The corresponding step S402 can be adjusted to determine whether the weighted heat range value of the video is less than the node bandwidth water level, that is, to determine whether the product of the heat range value multiplied by the heat adjustment factor is greater than the node bandwidth water level. If H*K is greater than or equal to L, the request for the video can be scheduled to the node; if H*K is less than L, the request for the video cannot be scheduled to the node.
[0185] Optionally, each edge node can separately configure the heat adjustment factor of the node.
[0186] The magnitude of the heat adjustment factor K can be set as needed. When K is greater than 1, it indicates an increase in the scheduling weight of the node, and more popular videos can be scheduled to the node; when it is less than 1, it indicates a decrease in the scheduling weight of the node, and the number of popular videos scheduled to this node can be reduced.
[0187] S403. Determine that the node bandwidth water level does not match the current popularity of the video.
[0188] S404. Determine that the node bandwidth water level matches the current popularity of the video.
[0189] It can be seen from the above matching process that in this embodiment, when the target video requested is stored in the edge node, the higher the current node bandwidth water level of the edge node, the higher the popularity required for the requested target video to be scheduled to this edge node.
[0190] Embodiment 4
[0191] According to the scheduling method of the video distribution node provided by the embodiment of the present application, this embodiment further provides a scheduling device for the video distribution node. Please refer to Figure 6 , which is a schematic structural diagram of the scheduling device for the video distribution node provided by this embodiment. The device may include the following units.
[0192] A receiving unit 601, configured to receive a video acquisition request carried by the client with the identifier of the target video.
[0193] A selection unit 602, configured to, if the target video is recorded in the preset historical popular video list, select any edge node deployed in the popular video computer room with a bandwidth utilization rate meeting the preset utilization rate condition as the target edge node.
[0194] A determination unit 603, configured to determine whether the target edge node stores the target video.
[0195] A scheduling unit 604, configured to, if the target edge node stores the target video, schedule the target edge node to the client.
[0196] The selection unit 602, configured to, if the target edge node does not store the target video, return to execute the operation of selecting any edge node deployed in the popular video computer room with a bandwidth utilization rate meeting the preset utilization rate condition as the target edge node to determine a new target edge node.
[0197] Optionally, when the selection unit 602 selects any edge node deployed in the popular video computer room with a bandwidth utilization rate meeting the preset utilization rate condition as the target edge node, it is specifically configured to:
[0198] Select any popular video computer room with the overall bandwidth of the computer room less than or equal to the preset computer room threshold water level;
[0199] Among multiple edge nodes deployed in the selected hot film computer room, select an edge node whose node bandwidth water level is less than the preset serviceable bandwidth water level as the target edge node.
[0200] Optionally, the selection unit 602 is further configured to:
[0201] If the target video is not recorded in the historical hot film list, select any edge node deployed in the cold film computer room as the target edge node.
[0202] Optionally, the scheduling unit 604 is further configured to:
[0203] Determine whether the node bandwidth water level of the target edge node matches the popularity of the target video;
[0204] If the node bandwidth water level of the target edge node matches the popularity of the target video, schedule the target edge node to the client;
[0205] The selection unit is configured to:
[0206] If the node bandwidth water level of the target edge node does not match the popularity of the target video, return to execute selecting any edge node deployed in the hot film computer room whose bandwidth utilization meets the preset utilization condition as the target edge node.
[0207] The device provided in this embodiment can be regarded as a computer program running on the central scheduler of the content delivery network.
[0208] For the specific working principle of the scheduling device of the video distribution node provided in this embodiment, reference can be made to the relevant steps in the scheduling method of the video distribution node provided in any embodiment of this application, which will not be elaborated here.
[0209] This application provides a scheduling device for video distribution nodes, which is applied to the central scheduler of a content distribution network. The content distribution network includes a central scheduler and multiple edge nodes for distributing videos. The device includes: a receiving unit 601, configured to receive a video acquisition request carried by a client with the identifier of a target video; a selection unit 602, configured to, if the target video is recorded in a preset historical hot video list, select any edge node with a bandwidth utilization rate meeting a preset utilization rate condition and deployed in a hot video computer room as the target edge node; a determination unit 603, configured to determine whether the target edge node stores the target video; a scheduling unit 604, configured to, if the target edge node stores the target video, schedule the target edge node to the client; and the selection unit 602, configured to, if the target edge node does not store the target video, return to execute the operation of selecting any edge node with a bandwidth utilization rate meeting a preset utilization rate condition and deployed in a hot video computer room as the target edge node to determine a new target edge node. This solution schedules according to the bandwidth utilization rate and preferentially schedules the client to the edge node storing the target video, achieving the effect of minimizing the number of times the edge node in the hot video computer room needs to return to the source while improving the bandwidth utilization rate.
[0210] An embodiment of this application also provides an electronic device. Please refer to Figure 7 , which includes a memory 701 and a processor 702.
[0211] Among them, the memory 701 is used to store a computer program;
[0212] The processor 702 is used to execute the computer program, and specifically used to implement the scheduling method for video distribution nodes provided in any embodiment of this application.
[0213] An embodiment of this application also provides a computer storage medium, which is used to store a computer program. When the computer program is executed, it is specifically used to implement the scheduling method for video distribution nodes provided in any embodiment of this application.
[0214] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "including", "comprising" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without more limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0215] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.
[0216] Those skilled in the art can implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A scheduling method for a video distribution node, characterized in that, A central scheduler applied to a content delivery network, the content delivery network including the central scheduler and multiple edge nodes for distributing videos, the method comprising: Receiving a video acquisition request carried by a client with an identifier of a target video; If the target video is recorded in a preset historical hot video list, selecting any edge node deployed in a hot video computer room whose bandwidth utilization rate meets a preset utilization rate condition, including: selecting any hot video computer room where the overall bandwidth of the computer room is less than or equal to a preset computer room threshold water level, the overall bandwidth of the computer room representing the sum of the currently occupied bandwidths of all edge nodes deployed in the computer room; among the multiple edge nodes deployed in the selected hot video computer room, selecting any edge node whose node bandwidth water level is less than a preset serviceable bandwidth water level as the target edge node, the node bandwidth water level of the edge node being the percentage of the currently occupied bandwidth resource of the edge node in all available bandwidth resources of the edge node; Determining whether the target edge node stores the target video; If the target edge node stores the target video, scheduling the target edge node to the client; If the target edge node does not store the target video, returning to execute the step of selecting any edge node deployed in a hot video computer room whose bandwidth utilization rate meets a preset utilization rate condition as the target edge node to determine a new target edge node; Wherein, before the returning to execute the step of selecting any edge node deployed in a hot video computer room whose bandwidth utilization rate meets a preset utilization rate condition as the target edge node, it further includes: Judging whether the node bandwidth water level of the target edge node matches the popularity of the target video; If the node bandwidth water level of the target edge node matches the popularity of the target video, scheduling the target edge node to the client; If the node bandwidth water level of the target edge node does not match the popularity of the target video, returning to execute the step of selecting any edge node deployed in a hot video computer room whose bandwidth utilization rate meets a preset utilization rate condition as the target edge node.
2. The scheduling method according to claim 1, characterized in that, After the receiving the video acquisition request carried by the client with the identifier of the target video, it further includes: If the target video is not recorded in the historical hot video list, selecting any edge node deployed in a cold video computer room as the target edge node.
3. A scheduling device for a video distribution node, characterized in that, A central scheduler applied to a content delivery network, the content delivery network including the central scheduler and multiple edge nodes for distributing videos, the apparatus comprising: A receiving unit, configured to receive a video acquisition request carried by a client with an identifier of a target video; A selection unit, configured to, if the target video is recorded in a preset historical hot video list, select any edge node deployed in a hot video computer room and meeting a preset utilization rate condition of bandwidth utilization rate as the target edge node, including: selecting any hot video computer room with an overall bandwidth of the computer room less than or equal to a preset computer room threshold water level, where the overall bandwidth of the computer room represents the sum of the currently occupied bandwidths of all edge nodes deployed in the computer room; among the multiple edge nodes deployed in the selected hot video computer room, selecting any edge node with a node bandwidth water level less than a preset serviceable bandwidth water level as the target edge node, where the node bandwidth water level of the edge node is the percentage of the currently occupied bandwidth resource of the edge node in all available bandwidth resources of the edge node; A determination unit, configured to determine whether the target edge node stores the target video; A scheduling unit, configured to, if the target edge node stores the target video, schedule the target edge node to the client; The selection unit, configured to, if the target edge node does not store the target video, return to execute the step of selecting any edge node deployed in a hot video computer room and meeting a preset utilization rate condition of bandwidth utilization rate as the target edge node to determine a new target edge node; The scheduling unit is further configured to: Judge whether the node bandwidth water level of the target edge node matches the popularity of the target video; If the node bandwidth water level of the target edge node matches the popularity of the target video, schedule the target edge node to the client; The selection unit is configured to: If the node bandwidth water level of the target edge node does not match the popularity of the target video, return to execute the step of selecting any edge node deployed in a hot video computer room and meeting a preset utilization rate condition of bandwidth utilization rate as the target edge node.
4. The scheduling device according to claim 3, characterized in that, The selection unit is further configured to: If the target video is not recorded in the historical hot video list, select any edge node deployed in a cold video computer room as the target edge node.
5. An electronic device, characterized in that, It includes a memory and a processor; wherein, the memory is used to store a computer program; The processor is used to execute the computer program, and specifically used to implement the scheduling method of the video distribution node as described in claim 1 or 2.
6. A computer storage medium, characterized in that, For storing a computer program, when the computer program is executed, it is specifically used to implement the scheduling method of the video distribution node as described in claim 1 or 2.
Citation Information
Patent Citations
P2P streaming media system and streaming media downloading method thereof
CN101640699A
Network content resource scheduling method, domain name scheduling server and electronic equipment
CN111614736A
Resource request processing method and device, computer equipment and medium
CN115208955A