A video pushing method, device, apparatus and storage medium
By predicting video request volume and cache replacement space, and rationally matching videos with edge nodes, the problem of unbalanced load on edge nodes was solved, thereby improving video acquisition speed and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, randomly pushing video copies to edge node networks leads to load imbalance, affecting video acquisition speed and user experience.
By predicting the number of video requests during peak periods, the number of copies and cache replacement space are determined, and videos are reasonably matched with edge nodes to achieve load-balanced video push.
This effectively ensures video acquisition speed, improves user experience, and avoids situations where high-performance edge nodes are underloaded or low-performance edge nodes are overloaded.
Smart Images

Figure CN116528004B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to computer technology, and more particularly to a video push method, apparatus, device, and storage medium. Background Technology
[0002] With the rapid development of computer technology, videos in CDN (Content Delivery Network) servers can be copied and pushed to edge node networks for caching, allowing users to obtain videos from nearby edge nodes, thereby improving video retrieval speed and reducing bandwidth usage when retrieving videos from the CDN.
[0003] Currently, when pushing copied video copies to edge node networks, the video copy is typically pushed randomly to one of the edge nodes. However, this random pushing method can lead to excessive load on the edge nodes, failing to effectively guarantee video acquisition speed and degrading the user experience. Summary of the Invention
[0004] This disclosure provides a video push method, apparatus, device, and storage medium to achieve load balancing of edge nodes, thereby effectively ensuring video acquisition speed and improving user experience.
[0005] In a first aspect, embodiments of this disclosure provide a video push method, including:
[0006] Obtain the first set of videos to be pushed and the first set of edge nodes corresponding to the first set of videos;
[0007] For each first video in the first video set, a prediction is made to determine the predicted request volume of each first video during the peak request period;
[0008] Based on the predicted request volume and the second video already cached by each first edge node in the first edge node set, determine the number of copies corresponding to each first video;
[0009] Based on the cache space occupied by each first video and the number of copies, as well as the current bandwidth utilization and node cache space of each first edge node, the set of second edge nodes and the cache replacement space corresponding to each second edge node are determined.
[0010] Based on the first video representation vector corresponding to each first video, the cache space occupied and the number of copies, as well as the second video representation vector corresponding to the second video already cached at each second edge node and the cache replacement space, the third edge node to which each first video is to be pushed is determined;
[0011] Based on the number of copies corresponding to each first video and the third edge node, each first video is copied and pushed during non-peak request periods.
[0012] Secondly, embodiments of this disclosure also provide a video push device, including:
[0013] The collection acquisition module is used to acquire the first video collection to be pushed and the first edge node collection corresponding to the first video collection;
[0014] The predicted request volume determination module is used to predict the predicted request volume of each first video in the first video set during the peak request period.
[0015] The copy number determination module is used to determine the number of copies corresponding to each first video based on the predicted request volume and the second video cached by each first edge node in the first edge node set;
[0016] The cache replacement space determination module is used to determine the second edge node set and the cache replacement space corresponding to each second edge node based on the cache space occupied by each first video and the number of copies, as well as the current bandwidth utilization and node cache space of each first edge node.
[0017] The third edge node determination module is used to determine the third edge node to which each first video is to be pushed, based on the first video representation vector corresponding to each first video, the cache space occupied and the number of copies, and the second video representation vector corresponding to the second video already cached at each second edge node and the cache replacement space.
[0018] The first video push module is used to push copies of each first video during non-peak request periods based on the number of copies corresponding to each first video and the third edge node.
[0019] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0020] One or more processors;
[0021] Storage device for storing one or more programs.
[0022] When the one or more programs are executed by the one or more processors, the one or more processors implement the video push method as described in any of the embodiments of this disclosure.
[0023] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the video push method as described in any of the embodiments of this disclosure.
[0024] In this embodiment, the predicted request volume for each first video in the first set of videos to be pushed is determined by predicting the request volume of each first video during peak request periods. Based on the predicted request volume and the second videos already cached by each first edge node in the first edge node set, the number of copies corresponding to each first video is determined. Based on the cache space occupied by each first video and the number of copies, as well as the current bandwidth utilization and node cache space of each first edge node, the second edge node set and the cache replacement space corresponding to each second edge node are determined. Based on the first video representation vector, cache space occupied, and number of copies corresponding to each first video, as well as the second video representation vector and cache replacement space corresponding to the second videos already cached by each second edge node, the third edge node to which each first video should be pushed is determined. Based on the number of copies corresponding to each first video, each copy of the first video is pushed to the corresponding third edge node during non-peak request periods. This approach reasonably matches the videos to be pushed with the edge nodes by considering the differences in edge node caching performance, avoiding situations where high-performance edge nodes are not fully utilized and low-performance edge nodes are overloaded. This achieves load balancing of edge nodes, effectively ensuring video acquisition efficiency and improving user experience. Attached Figure Description
[0025] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0026] Figure 1 This is a schematic flowchart of a video push method provided in an embodiment of this disclosure;
[0027] Figure 2 This is a schematic flowchart of a video push method provided in an embodiment of this disclosure;
[0028] Figure 3 This is a schematic flowchart of a video push method provided in an embodiment of this disclosure;
[0029] Figure 4 This is a schematic flowchart of a video push method provided in an embodiment of this disclosure;
[0030] Figure 5This is an example of a knowledge graph involved in an embodiment of this disclosure;
[0031] Figure 6 This is a schematic diagram of the structure of a video push device provided in an embodiment of this disclosure;
[0032] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0033] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0034] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0035] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0036] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only 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 interdependencies.
[0037] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0038] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0039] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0040] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0041] Before introducing the embodiments of this disclosure, a video push scenario will be described. The video push architecture includes terminals, edge nodes, and a CDN. The terminal can be a user device used to play videos. Edge nodes can refer to small network devices with caching capabilities, such as servers attached to base stations, small data centers of network operators, or small server rooms in communities or enterprises. A CDN can refer to a cloud server used to store all videos. The storage capacity of a CDN is higher than that of edge nodes. For example, a CDN can be a large server room, while edge nodes can be distributed storage nodes such as home routers or small server rooms. A CDN can connect to an edge node network, which includes multiple edge nodes. The CDN can copy the same video multiple times and push each copy to an edge node in the edge node network, resulting in multiple edge nodes storing the same video. The user can directly pull videos from a closer edge node instead of from the CDN, thereby reducing the bandwidth traffic requested from the CDN. By storing popular videos on edge nodes, massive user requests can be routed from the center to the edge, thereby reducing latency and offloading traffic. Because edge nodes are closer to the user and widely distributed, their capacity and stability are more vulnerable than CDN. As a result, the user can connect to multiple edge nodes simultaneously to download videos in parallel to ensure smooth video playback.
[0042] During continuous video requests from users, the workload of each edge node in the edge node network is dynamically changing and highly skewed due to the differences in the videos stored and the frequency of requests at each edge node. However, the number of video requests that a single edge node can process in parallel is limited. When an edge node is overloaded, it will refuse to provide services to users. This leads to a rapid increase in connection failure rates during peak hours, limiting the effective utilization of edge node bandwidth, failing to guarantee video acquisition speed, and affecting the smoothness of video viewing for users. It should be noted that different videos are pushed to different edge node networks with varying numbers of copies, i.e., different numbers of edge nodes.
[0043] Figure 1This is a flowchart illustrating a video push method provided in an embodiment of the present disclosure. This embodiment is applicable to the situation of pushing copied video copies to an edge node network. The method can be executed by a video push device, which can be implemented in software and / or hardware, or optionally by an electronic device, such as a CDN server.
[0044] like Figure 1 As shown, the video push method specifically includes the following steps:
[0045] S110. Obtain the first set of videos to be pushed and the first set of edge nodes corresponding to the first set of videos.
[0046] Here, the first video can refer to the video that needs to be pushed to the edge node network. The first video set can be a collection of all the first videos. In this embodiment, the video can be a video file that exists in the form of a file. Different videos can have different video content characteristics, such as video bitrate, video resolution, etc. The first edge node set can refer to the push object of the first video set, that is, the set of edge nodes included in the edge node network to which the first video set is to be pushed.
[0047] Specifically, a CDN can use all stored videos as the first video to be pushed, or it can select videos with high historical request volumes (i.e., high popularity) from all stored videos as the first video to be pushed, in order to improve cache utilization. For example, it can obtain the historical request volume for each video and select videos with historical request volumes greater than a preset request volume threshold as the first videos to be pushed. All the first videos to be pushed are combined to obtain a set of first videos to be pushed. All edge nodes in the edge node network can be combined to obtain a first edge node set, so that each first video can be pushed to one edge node in the edge node network.
[0048] For example, "obtaining the first set of videos to be pushed" in S110 may include: obtaining the set of historical videos that were requested in the current historical time period; and determining the first set of videos to be pushed based on the historical request volume and preset request volume threshold corresponding to each historical video in the historical video set.
[0049] The current historical time period can be the most recent historical time period within the current push cycle. For example, the current historical time period can refer to the most recent hour. Multiple push cycles are divided within non-peak request periods using a second preset duration as the granularity. Non-peak request periods can refer to any time period other than peak request periods. Peak request periods can refer to periods with peak request volume. For example, peak request periods are 20:00–21:00, and non-peak request periods are 0:00–20:00 and 21:00–24:00. Within non-peak request periods, each second preset duration, such as 5 minutes, constitutes a push cycle, thus dividing the non-peak request periods into multiple push cycles. Video pushes are performed within each push cycle, achieving periodic pushes and further improving the video push effect. The current push cycle can refer to the push cycle in which the user is currently located. Historical request volume can refer to the number of times a user requested a video within the current historical time period, i.e., the number of user visits.
[0050] Specifically, for the current push cycle, the historical request volume corresponding to each historical video within the current historical time period can be compared with a preset request volume threshold. Historical videos with a request volume greater than or equal to the preset request volume threshold are selected as the first videos to be pushed, thus obtaining the first video set. Historical videos with a request volume less than the preset request volume threshold are not pushed within the current push cycle. Periodic pushes during non-peak request periods indicate that some videos will be pushed and stored on edge nodes when they are far from peak request periods. However, as the prediction time span increases, the accuracy of video popularity prediction will decrease significantly, resulting in uneven load on edge nodes when pushing based solely on video popularity.
[0051] S120. For each first video in the first video set, make a prediction to determine the predicted request volume of each first video during the peak request period.
[0052] Request volume refers to the number of times users request to retrieve the video, i.e., user visits. Predicted request volume refers to the predicted request volume during peak request periods. A higher predicted request volume indicates greater video popularity and buzz.
[0053] Specifically, regression prediction can be performed on the video content data and historical request data of each first video over a past period to obtain the predicted request volume for each first video during peak request periods. The video content data may include, but is not limited to: video bitrate, video size, encoding method, video resolution, video content category, video duration, video release time, and video publisher information. Historical request data can be the video request volume over a recent period. For example, using a 1-hour granularity, the historical request volume for the past 24 hours can be obtained.
[0054] For example, the video content data and historical request data corresponding to each first video can be input into a trained regression prediction model. The regression prediction model can fuse the video content data and historical request data to predict the predicted request volume of the first video during the peak request period and output this predicted request volume. By using the regression prediction model, the predicted request volume of each first video during the peak request period can be determined more accurately and quickly.
[0055] S130. Based on the predicted request volume and the second video already cached by each first edge node in the first edge node set, determine the number of copies corresponding to each first video.
[0056] The second video can refer to the video currently cached in the first edge node. There can be multiple second videos. The number of copies refers to the number of copies of the same video. Each copy of the video is cached on one edge node, and the number of copies equals the number of edge nodes that need to cache the video. During periodic pushes, the number of copies, compared to previously pushed video copies, can refer to the incremental number of additional copies that need to be pushed within the current push period.
[0057] Specifically, for each first video, the cached second video of each first edge node in the first edge node set can be compared with the first video to determine the number of first edge nodes that currently cache the first video, which is the number of copies of the first video that have been pushed. The predicted request volume of the first video during the peak request period can be used as the number of push copies corresponding to the first video, that is, the total number of copies required in the edge node network. The difference between the number of push copies and the number of first edge nodes is determined as the number of copy copies corresponding to the first video.
[0058] S140. Based on the cache space occupied by each first video and the number of copies, as well as the current bandwidth utilization and node cache space of each first edge node, determine the set of second edge nodes and the cache replacement space corresponding to each second edge node.
[0059] Here, the cache space occupied by the first video can refer to the file size of the first video. The current bandwidth utilization rate can be determined based on the most recent historical request data. For example, the current bandwidth utilization rate can refer to the bandwidth utilization rate of the first edge node in the previous push cycle. The node cache space can refer to the total storage space of the first edge node. The current bandwidth utilization rate and node cache space can be used to characterize the service performance of the first edge node. The second edge node refers to the first edge node that can be used to cache the first video. The set of second edge nodes refers to the set of second edge nodes that can be used to cache each first video. The cache replacement space corresponding to the second edge node refers to the replaceable cache space, so that after clearing this cache space, newly pushed first videos can be cached.
[0060] Specifically, the total cache size can be determined based on the cache space occupied by each first video and the number of copies. Based on the current bandwidth utilization of each first edge node, second edge nodes capable of caching the first videos are selected from all first edge nodes. Based on the current bandwidth utilization and node cache space of each second edge node, the total cache size is dynamically allocated to determine the cache replacement space for each second edge node. For example, the lower the current bandwidth utilization or the larger the node cache space, the larger the cache replacement space can be allocated to improve bandwidth utilization and avoid overload.
[0061] S150. Based on the first video representation vector, cache space and number of copies corresponding to each first video, and the second video representation vector and cache replacement space corresponding to the second video already cached at each second edge node, determine the third edge node to which each first video should be pushed.
[0062] The first video representation vector can be an information vector used to represent the first video. Different first videos correspond to different first video representation vectors. Similarly, the second video representation vector can be an information vector used to represent the second video. Both the first and second video representation vectors can be obtained by pre-processing the video information. The number of third edge nodes corresponding to the first video is equal to the number of corresponding copies, so that a copy of the video can be pushed to a third edge node.
[0063] Specifically, based on the first video representation vector corresponding to each first video and the second video representation vector corresponding to each cached second video at each second edge node, the popularity trend between any two first videos or between each first video and each cached second video at each second edge node can be measured. For example, two videos with smaller video representation vector distances have similar popularity trends. Videos with similar popularity trends need to be stored on different edge nodes to effectively avoid excessive load on edge nodes in a short period of time, thereby ensuring load balancing. Based on video similarity, the cache replacement space corresponding to each second edge node, and the cache space occupied and copy number corresponding to each first video, the first videos and second edge nodes are reasonably matched to determine the third edge node to which each first video should be pushed, thereby achieving load balancing of edge nodes.
[0064] S160. Based on the number of copies of each first video and the third edge node, push copies of each first video during non-peak request periods.
[0065] Specifically, for each first video, a corresponding number of copies of the first video can be copied based on the number of copies corresponding to that first video. During off-peak periods, each copy of the first video is pushed to a corresponding third edge node, thus completing the video push and ensuring load balancing of the edge nodes, improving bandwidth utilization. For example, during periodic pushes, at the end of the current push period, incremental copying and pushing are performed on each first video based on the number of copies corresponding to each first video and the third edge node.
[0066] The technical solution of this disclosure involves predicting the predicted request volume of each first video in the first set of videos to be pushed during peak request periods. Based on the predicted request volume and the second videos already cached by each first edge node in the first edge node set, the number of copies corresponding to each first video is determined. Based on the cache space occupied by each first video and the number of copies, as well as the current bandwidth utilization and node cache space of each first edge node, a second edge node set and a cache replacement space corresponding to each second edge node are determined. Based on the first video representation vector, cache space occupied, and number of copies corresponding to each first video, as well as the second video representation vector and cache replacement space corresponding to the second videos already cached by each second edge node, a third edge node to which each first video should be pushed is determined. Based on the number of copies corresponding to each first video, each copy of the first video is pushed to the corresponding third edge node during non-peak request periods. This approach reasonably matches the videos to be pushed with the edge nodes by considering the differences in edge node caching performance, avoiding situations where high-performance edge nodes are not fully utilized and low-performance edge nodes are overloaded. This achieves load balancing of edge nodes, effectively ensuring video acquisition efficiency and improving user experience.
[0067] Based on the above technical solution, S130 may include: for each first video, determining the number of first edge nodes that have cached the first video based on the second video cached by each first edge node in the first edge node set; determining the number of push replicas corresponding to the first video based on the predicted request volume and the preset number of parallel request nodes corresponding to the first video; and determining the number of copy replicas corresponding to the first video based on the number of push replicas and the number of first edge nodes.
[0068] The preset number of parallel request nodes η can be pre-set based on business needs, ensuring that each user request requires at least η edge nodes to respond to it. The number of push replicas can refer to the total number of edge nodes in the edge node network that need to cache the same video, which is the total number of push replicas of the same video.
[0069] Specifically, for each first video, the cached second video of each first edge node in the first edge node set can be compared with the first video to determine whether the first video is cached in each first edge node, and the number of first edge nodes that currently cache the first video can be counted. The predicted request volume of the first video during the peak request period can be multiplied by the preset number of parallel request nodes, and the result can be used as the number of push replicas corresponding to the first video. The difference between the number of push replicas and the number of first edge nodes is determined as the number of copy replicas corresponding to the first video. By using the preset number of parallel request nodes, the number of copy replicas that need to be pushed for each first video can be obtained more accurately, further improving the video push effect.
[0070] Based on the above technical solution, S140 may include: determining the total cache space corresponding to the first video set based on the cache space occupied by each first video and the number of copies; detecting whether the current bandwidth utilization rate corresponding to each first edge node is less than a preset bandwidth utilization rate threshold, and taking the first edge nodes that are less than the preset bandwidth utilization rate threshold as second edge nodes to obtain a set of second edge nodes; determining the bandwidth utilization rate difference between the current bandwidth utilization rate corresponding to each second edge node and the preset bandwidth utilization rate threshold; and determining the cache replacement space corresponding to each second edge node based on the total cache space occupied, the node cache space corresponding to each second edge node, and the bandwidth utilization rate difference.
[0071] Specifically, the total cache space for each first video can be obtained by multiplying its cache space and the number of copies. The total cache space for all first videos is then summed to obtain the total cache space for the first video set. If the current bandwidth utilization is greater than or equal to a preset bandwidth utilization threshold, the first edge node is considered to have a high load and no new video needs to be deployed. If the current bandwidth utilization is less than the preset bandwidth utilization threshold, the first edge node is considered to have a low load and new videos need to be deployed to improve bandwidth utilization. First edge nodes with bandwidth utilization less than the preset threshold are designated as second edge nodes, thus obtaining a set of second edge nodes where new videos can be deployed. The current bandwidth utilization for each second edge node is subtracted from the preset bandwidth utilization threshold to obtain the bandwidth utilization difference. Based on the bandwidth utilization difference and node cache space for each second edge node, the total cache space is allocated to determine the cache replacement space for each second edge node. For example, a larger bandwidth utilization difference or node cache space allows for a larger cache replacement space to be allocated, thereby improving bandwidth utilization and preventing excessive load.
[0072] It should be noted that the total cache replacement space corresponding to the second edge node set needs to be greater than or equal to the total cache space corresponding to the first video set, so that each video copy pushed can be cached in the second edge node set.
[0073] For example, determining the cache replacement space for each second edge node based on the total cache space, the node cache space corresponding to each second edge node, and the bandwidth utilization difference can include: multiplying the node cache space corresponding to each second edge node by the corresponding bandwidth utilization difference to obtain the maximum cache replacement space for each second edge node; summing the maximum cache replacement spaces for all second edge nodes to obtain the total cache replacement space; dividing the maximum cache replacement space for each second edge node by the total cache replacement space to obtain the cache replacement ratio for each second edge node; and multiplying the cache replacement ratio for each second edge node by the total cache space to obtain the cache replacement space for each second edge node. By allocating the total cache space according to the cache replacement ratio, the lifespan of videos cached on different cache nodes can be increased more evenly.
[0074] Based on the above technical solution, S150 may include: clustering the first video set based on the first video representation vector corresponding to each first video to obtain multiple first video groups and a central video representation vector corresponding to each first video group; determining the average video representation vector corresponding to each second edge node based on the second video representation vector corresponding to the second video already cached at each second edge node; and determining the third edge node to which each first video is to be pushed based on the central representation vector corresponding to each first video group, the average video representation vector corresponding to each second edge node, the cache replacement space, and the cache occupied space and copy number corresponding to each first video.
[0075] The central video representation vector can be used to represent the overall information of the first video group. The average video representation vector can be used to represent the overall information of all the second videos cached at each second edge node.
[0076] Specifically, based on the first video representation vector corresponding to each first video, the first video set is clustered into groups, such as K-means clustering, to obtain K first video groups. The representation vector of the center point of each first video group can be used as the center video representation vector. The second video representation vectors corresponding to all cached second videos at each second edge node are averaged to obtain the average video representation vector corresponding to each second edge node. The center representation vector corresponding to each first video group and the average video representation vector corresponding to each second edge node can be used to measure the similarity between each first video and the cached second videos at the second edge nodes. Based on the similarity, the cache replacement space corresponding to each second edge node, and the cache space occupied and copy number corresponding to each first video, the first video is matched to the least similar second edge node with sufficient cache replacement space to store the first video. These second edge nodes are then used as the third edge nodes to which the first video is to be pushed, thereby achieving load balancing of the edge nodes.
[0077] Figure 2 This is a flowchart illustrating a video push method provided in an embodiment of this disclosure. Based on the aforementioned embodiments, this disclosure further optimizes the step of "determining the third edge node to which each first video is to be pushed, based on the center representation vector corresponding to each first video group, the average video representation vector corresponding to each second edge node, the cache replacement space, and the cache space occupied and copy number corresponding to each first video." Explanations of terms identical or corresponding to those in the aforementioned embodiments are not repeated here.
[0078] like Figure 2 As shown, the video push method specifically includes the following steps:
[0079] S210. Obtain the first set of videos to be pushed and the first set of edge nodes corresponding to the first set of videos.
[0080] S220. For each first video in the first video set, make a prediction and determine the predicted request volume of each first video during the peak request period.
[0081] S230. Based on the predicted request volume and the second video already cached by each first edge node in the first edge node set, determine the number of copies corresponding to each first video.
[0082] S240. Based on the cache space occupied and the number of copies corresponding to each first video, as well as the current bandwidth utilization and node cache space corresponding to each first edge node, determine the set of second edge nodes and the cache replacement space corresponding to each second edge node.
[0083] S250. Based on the first video representation vector corresponding to each first video, the first video set is clustered and grouped to obtain multiple first video groups and the central video representation vector corresponding to each first video group.
[0084] Specifically, the first video set can be clustered based on the first video representation vector corresponding to each first video, such as through K-means clustering, to obtain K first video groups. The representation vector of the center point of each first video group can be used as the center video representation vector.
[0085] S260. Based on the second video representation vector corresponding to the cached second video of each second edge node, determine the average video representation vector corresponding to each second edge node.
[0086] Specifically, the average video representation vector corresponding to all cached second videos at each second edge node can be averaged to obtain the average video representation vector corresponding to each second edge node.
[0087] S270. Based on the central representation vector corresponding to each first video group, obtain the current central representation vector corresponding to the current first video group where the current first video is located.
[0088] Specifically, each first video to be pushed can be considered the current first video, and steps S270-S290 are used to determine the third edge node to which each first video should be pushed. The current first video group can refer to the first video group to which the current first video belongs. The current center representation vector refers to the center video representation vector corresponding to the current first video group.
[0089] S280. Determine the vector distance between the current center representation vector and the average video representation vector corresponding to each second edge node, and sort the second edge nodes in descending order based on the vector distance to obtain the second edge node sequence.
[0090] The vector distance can be used to characterize the popularity similarity between the current first video and the second video cached at the second edge node. For example, the smaller the vector distance, the greater the popularity similarity, and the more similar the current first video is to the second video cached at the second edge node.
[0091] Specifically, the vector distance between the current center representation vector and the average video representation vector corresponding to each second edge node can be determined using a cosine similarity method. Based on the vector distance, the second edge nodes are sorted in descending order to obtain a sequence of second edge nodes with gradually decreasing vector distances. The popularity similarity between the cached second video and the current first video in the second edge node sequence gradually increases. In other words, the current first video is preferentially allocated according to the order of the second edge node sequence, that is, the current first video should be preferentially allocated to the first second edge node to maximize the difference in popularity and avoid caching videos with the same popularity on the same edge node, thereby ensuring load balancing of user requests.
[0092] S290. Based on the second edge node sequence, the cache replacement space corresponding to each second edge node, the current cache space occupied by the current first video, and the current number of copies, determine the third edge node to which the current first video should be pushed.
[0093] Specifically, based on the order of the second edge node sequence, the second edge nodes with the current number of copies can be selected sequentially. The cache replacement space corresponding to the selected second edge node is greater than the current cache space occupied by the current first video, ensuring that the selected second edge nodes have sufficient space to cache the current first video. All selected second edge nodes are then used as the third edge nodes to which the current first video will be pushed, thereby achieving load balancing of the edge nodes.
[0094] S291. Based on the number of copies of each first video and the third edge node, push copies of each first video during non-peak request periods.
[0095] The technical solution of this disclosure embodiment sorts the second edge nodes in descending order based on the vector distance between the current center representation vector and the average video representation vector corresponding to each second edge node to obtain a second edge node sequence. Based on the order of the second edge node sequence, the second edge node with the current number of copies is selected, and the cache replacement space corresponding to the selected second edge node is greater than the current cache occupied space, thereby achieving a reasonable match between the second edge node and the first video and ensuring the load balance of the edge nodes.
[0096] Based on the above technical solution, S290 may include: determining a target selection number greater than the current number of copies corresponding to the current first video; selecting target second edge nodes of the target selection number in sequence based on the order of the second edge node sequence, wherein the cache replacement space corresponding to the target second edge node is greater than the current cache occupied space corresponding to the current first video; and determining the third edge node to which the current first video is to be pushed based on the current number of copies, the maximum upload bandwidth corresponding to each target second edge node, and the node cache space.
[0097] The maximum upload bandwidth can be used to characterize the upload bandwidth bottleneck of an edge node. It can also be used to characterize the upload performance of an edge node. The target second edge node refers to the second edge node to which the current first video can be pushed. The number of target second edge nodes is greater than the number of current copy replicas.
[0098] Specifically, the current number of copies of the first video can be multiplied by a preset amplification factor to obtain a target selection number greater than the current number of copies. Based on the order of the second edge node sequence, the target selection number of target second edge nodes can be selected sequentially, and the cache replacement space corresponding to the selected second edge nodes is greater than the current cache space. Based on the maximum upload bandwidth and node cache space corresponding to each target second edge node, the target second edge node with the strongest overall performance (the number of copies currently copied) is selected from the target selection number of target second edge nodes as the third edge node to which the current first video is to be pushed. By further filtering based on the maximum upload bandwidth and node cache space, it is possible to further avoid the underutilization of the capabilities of some high-performance edge nodes and the overload of low-performance edge nodes, thus achieving load balancing.
[0099] For example, determining the third edge node to which the current first video is to be pushed, based on the current number of copies, the maximum upload bandwidth corresponding to each target second edge node, and the node cache space, may include: determining the unit space upload bandwidth corresponding to each target second edge node based on the maximum upload bandwidth corresponding to each target second edge node and the node cache space; sorting the target second edge nodes in descending order based on the unit space upload bandwidth to obtain a sequence of target second edge nodes; and determining the third edge node to which the current first video is to be pushed based on the sequence of target second edge nodes and the current number of copies.
[0100] Specifically, the maximum upload bandwidth corresponding to each target second edge node can be divided by the corresponding node cache space to obtain the unit space upload bandwidth for each target second edge node. A higher unit space upload bandwidth indicates higher performance of the target second edge node. Based on the unit space upload bandwidth, the target second edge nodes are sorted in descending order to obtain a sequence of target second edge nodes with progressively decreasing unit space upload bandwidth. The first few target second edge nodes in the sequence with the number of current copy replicas are selected as the third edge nodes to which the first video is to be pushed, thus obtaining the third edge node with the strongest overall performance for video push, further ensuring load balancing among edge nodes.
[0101] Figure 3 This is a flowchart illustrating a video push method provided in an embodiment of this disclosure. Based on the aforementioned embodiments, this disclosure optimizes the step "obtaining the first set of videos to be pushed and the first set of edge nodes corresponding to the first set of videos," and further optimizes the step "predicting each first video in the first set and determining the predicted request volume for each first video during the peak request period." Explanations of terms identical or corresponding to those in the aforementioned embodiments are not repeated here.
[0102] like Figure 3 As shown, the video push method specifically includes the following steps:
[0103] S310. Obtain the set of historical videos that exist in the current region.
[0104] In this system, different user requests for the same video have different geographical distributions, and different edge nodes also have different geographical distributions. This allows the entire geographical area to be divided into multiple regions, enabling independent popularity prediction and video delivery for each region. This reduces the number of cross-regional requests and further ensures video acquisition efficiency. For example, the entire country can be divided into six regions: North China, East China, Northeast China, South China, Northwest China, and Southwest China. Each region can be designated as the current region, and popularity prediction and video delivery can be performed for each region by executing steps S310-S392.
[0105] Specifically, it is possible to obtain the set of historical videos that were requested in the current region within the current historical time period. For example, during periodic push notifications, it is possible to obtain the historical videos that were requested within the current historical time period, and determine the set of historical videos in the current region based on the user's geographical location for each historical video request.
[0106] S320. Based on the historical request volume and preset request volume threshold corresponding to each historical video in the historical video set, determine the first video set to be pushed in the current area.
[0107] Specifically, the historical request volume corresponding to each historical video in the current historical time period can be compared with a preset request volume threshold. Historical videos in the current area that are greater than or equal to the preset request volume threshold are selected as the first videos to be pushed, thus obtaining the first video set.
[0108] S330. Combine the edge nodes located in the current area to obtain the first edge node set corresponding to the first video set.
[0109] Specifically, based on the deployment address of each edge node in the edge node network, each edge node located in the current region is taken as the first edge node to obtain the first edge node set, so that the first video set can be copied and pushed to the first edge node set located in the same region, thereby realizing regional granular popularity prediction and resource allocation, and further ensuring the load balance of edge nodes in each region.
[0110] S340. Obtain the video content data and historical request data corresponding to each first video in the first video set.
[0111] The video content data may include, but is not limited to: video bitrate, video size, encoding method, video resolution, video content category, video duration, video release time, and video publisher information. Historical request data can be the number of user requests from the current region within a recent period. For example, retrieving the historical request volume over the past 24 hours at a 1-hour granularity.
[0112] S350. Determine the current prediction network model corresponding to the current region.
[0113] Specifically, a prediction network model can be pre-trained based on sample request data corresponding to a region, thereby establishing a correspondence between regions and prediction network models. The prediction network model can then be used to predict the request volume of a video within that region during peak request periods. For example, the prediction network model can be, but is not limited to, an XGBoost (eXtremeGradient Boosting) model. In practical applications, based on the correspondence between regions and prediction network models, the current prediction network model corresponding to the current region can be directly obtained.
[0114] It's important to note that current popularity prediction methods perform predictions globally. However, in reality, user requests for most videos are not evenly distributed across all regions. Instead, user requests for the vast majority of videos exhibit regional skewness, meaning that the main users requesting the same video are concentrated in only a few regions. Therefore, to improve the accuracy of popularity prediction, it's necessary to perform popularity prediction and model training on a regional rather than global basis.
[0115] For example, S350 may include: determining the target time window corresponding to the current prediction time, wherein multiple time windows are divided into segments with a first preset duration during non-request peak periods; and determining the current prediction network model corresponding to the current region in the target time window based on the correspondence between the region and the prediction network model in each time window.
[0116] Specifically, the number of prediction network models depends not only on the number of regions but also on the interval between the prediction time and the peak demand period. This is because the underlying quantitative relationship between the input training data and peak popularity varies at different times during the non-peak demand period. Therefore, prediction network models need to be trained separately for different prediction times to ensure the accuracy of popularity prediction. For example, the non-peak demand period can be divided into multiple time windows with a first preset duration (e.g., 1 hour). This means a prediction network model needs to be trained for each time window within the non-peak demand period. Furthermore, a separate prediction network model needs to be trained for each region. Therefore, the number of prediction network models to be trained is the product of the number of time windows and the number of regions.
[0117] The training process for each prediction network model is as follows: Obtain sample request data corresponding to each region within each time window, and input this sample request data into the prediction network model to be trained to obtain the output predicted request volume during peak request periods. For example... f k ∈F(i=1,2,…n), where the set of classification and regression decision trees is F={f(x)=w q(x)}(q:R m →{1,2,…,T},w∈R T ), where q is the tree structure mapping samples to leaf nodes, T is the number of leaf nodes, and w is the real number fraction of a leaf node. The objective function for training the prediction network model can be divided into an error function term L and a model complexity function term Ω, which can be expressed as Obj = L + Ω, where In Ω, γT is an L1 regularization term. This is the L2 regularization term. The model parameters are adjusted by minimizing the objective function to obtain the prediction network model after training.
[0118] In practical use, the target time window of the current prediction moment can be determined, and based on the pre-obtained correspondence between regions and prediction network models within each time window, the target correspondence between regions and prediction network models within the target time window can be determined. Based on the target correspondence between regions and prediction network models, the current prediction network model corresponding to the current region is obtained. By considering the different prediction moments, the accuracy of popularity prediction can be further improved.
[0119] S360. Input the video content data and historical request data into the current prediction network model corresponding to the current region for prediction.
[0120] Specifically, for each first video, the unencoded data from the historical request data and video content data corresponding to that first video, such as video ID, video duration, video likes, bitrate, and other purely numerical or already encoded data, can be directly input into the current prediction network model. The data from the video content data that requires encoding, such as encoding method, resolution, video type, and other non-numerical data, should first undergo one-hot encoding before being input into the current prediction network model.
[0121] S370. Based on the output of the current prediction network model, determine the predicted request volume for each first video during the peak request period.
[0122] Specifically, the current prediction network model can predict the popularity of the input video content data and historical request data, obtain the predicted request volume of the first video during the peak request period, and output it. This allows the model to obtain the predicted request volume of each first video during the peak request period. By performing popularity prediction at the regional granularity, the accuracy of popularity prediction in each region can be improved, further enhancing the accuracy of video push notifications.
[0123] S380. Based on the predicted request volume and the second video already cached by each first edge node in the first edge node set, determine the number of copies corresponding to each first video.
[0124] S390. Based on the cache space occupied and the number of copies corresponding to each first video, as well as the current bandwidth utilization and node cache space corresponding to each first edge node, determine the set of second edge nodes and the cache replacement space corresponding to each second edge node.
[0125] S391. Based on the first video representation vector, cache space and number of copies corresponding to each first video, and the second video representation vector and cache replacement space corresponding to the second video already cached at each second edge node, determine the third edge node to which each first video should be pushed.
[0126] S392. Based on the number of copies of each first video and the third edge node, push copies of each first video during non-peak request periods.
[0127] The technical solution of this disclosure improves the accuracy of popularity prediction in each region by performing popularity prediction at the regional granularity, thereby further improving the accuracy of video push. By copying and pushing the first video set to the first edge node set located in the same region, regional granular resource allocation is achieved, further ensuring load balancing of edge nodes in each region.
[0128] Figure 4 This is a flowchart illustrating a video push method provided in this embodiment. Based on the above-described embodiments, this embodiment details the process of determining the first video representation vector corresponding to each first video. Explanations of terms identical or corresponding to those in the above-described embodiments are not repeated here.
[0129] like Figure 4 As shown, the video push method specifically includes the following steps:
[0130] S410. Obtain the first set of videos to be pushed and the first set of edge nodes corresponding to the first set of videos.
[0131] S420. For each first video in the first video set, make a prediction to determine the predicted request volume of each first video during the peak request period.
[0132] S430. Based on the predicted request volume and the second video already cached by each first edge node in the first edge node set, determine the number of copies corresponding to each first video.
[0133] S440. Based on the cache space occupied and the number of copies corresponding to each first video, as well as the current bandwidth utilization and node cache space corresponding to each first edge node, determine the set of second edge nodes and the cache replacement space corresponding to each second edge node.
[0134] S450. Obtain the first representation vector library, which includes the third video representation vector corresponding to each third video.
[0135] The third video can be any video requested within the most recent historical time period. For example, the third video could refer to a video requested by a user within the last week. The third video representation vector can be obtained by embedding the video content data corresponding to each third video into a knowledge graph.
[0136] Specifically, all requested third videos within the most recent first historical time period can be pre-acquired, and a knowledge graph can be constructed based on the video content data corresponding to each third video. The knowledge graph is a heterogeneous graph where nodes represent entities and edges represent relationships between entities, providing rich side information for representation learning in content enhancement models. By mapping the video content data of videos to the knowledge graph, general and compact contextual information can be obtained. For example, Figure 5 An example of a knowledge graph is given. For example... Figure 5 As shown, a knowledge graph can be constructed using six content features: author ID, video ID, video category, video duration, resolution, and publication time. In the knowledge graph, each edge is represented as a ternary (head entity, relation, tail entity), indicating a specific relationship between the head and tail entities. For example, (FID-1, Author, Alice) means Alice is the author of FID-1. Embedding learning of the knowledge graph maps entities and relations to low-dimensional representation vectors, and encodes the graph structure and semantic information within these low-dimensional representation vectors, thereby obtaining the third video representation vector corresponding to each third video and constructing the first representation vector library.
[0137] For example, to accurately learn video representation vectors, the TransR model can be used to model entities and relations separately in independent spaces, and to train video representation vectors by projecting entities from the entity space to the relation space using a projection matrix. For instance, first, the video content data of all requested third videos within the past week can be obtained, then these can be fed into the TransR model for training to obtain the representation vector for each third video, and stored in a first representation vector library, such as KG_library. It should be noted that the distance between two representation vectors is inversely proportional to the popularity similarity of the two videos; stronger similarity means a more similar popularity trend, i.e., the two videos should be stored separately in different edge nodes.
[0138] S460. Obtain the first video representation vector corresponding to each first video from the first representation vector library.
[0139] Specifically, the first video representation vector corresponding to each first video can be obtained from the pre-built first representation vector library KG_library.
[0140] For example, S460 may include: if there is no first video representation vector corresponding to the target first video in the first representation vector library, then obtain the second representation vector library; and determine the first video representation vector corresponding to the target first video based on the first representation vector library and the second representation vector library.
[0141] The target first video can refer to a video for which no representation vector exists in the first representation vector library. The second representation vector library can include the fourth video representation vector corresponding to each fourth video. The fourth video can refer to a video that was requested within the most recent second historical time period, and whose historical request volume is greater than a preset request volume threshold. The second historical time period is shorter than the first historical time period. For example, the fourth video can refer to a video requested by a user within the last 4 hours. The fourth video representation vector can be obtained by collaborative filtering embedding learning based on the fourth video requested by each user.
[0142] Specifically, during periodic push notifications, new videos are created. These new videos do not have corresponding vectors in the first representation vector library, requiring real-time updates to the first representation vector library to obtain the new video representation vectors. However, this real-time update method is extremely costly and inefficient. To address this, a collaborative filtering embedding learning approach can be introduced to capture the implicit relationships between videos from users' collaborative request behavior, constructing a second representation vector library based on collaborative filtering, such as CF_library. This library can then supplement the missing representation vectors of new videos in the first representation vector library KG_library, thereby significantly reducing the update cost.
[0143] For example, the construction process of the second representation vector library CF_library is as follows: First, based on user collaborative features, videos requested by different users within the most recent second historical time period are divided into independent video sets. Videos in the same set are more closely related because they were accessed by the same user. However, videos with a historical request volume less than or equal to a preset request volume threshold are filtered out from all sets, and only the fourth video with a historical request volume greater than the preset request volume threshold is retained. Finally, the representation vectors of the fourth videos in all sets can be trained using the item2vector collaborative filtering method and the skip-gram model to obtain the representation vector of each fourth video, and these are stored in the second representation vector library, thus constructing the second representation vector library CF_library.
[0144] For example, determining the first video representation vector corresponding to the target first video based on the first representation vector library and the second representation vector library may include: determining a fifth video that exists simultaneously in both the first and second representation vector libraries; obtaining the candidate video representation vector corresponding to the target first video and the fifth video representation vector corresponding to each fifth video from the second representation vector library; determining the distance between the target first video and each fifth video based on the candidate video representation vector and the fifth video representation vector, and determining the fifth video with the smallest distance as the sixth video; obtaining the sixth video representation vector corresponding to the sixth video from the first representation vector library, and determining the sixth video representation vector as the first video representation vector corresponding to the target first video.
[0145] Specifically, a fifth video that exists simultaneously in both the first representation vector library KG_library and the second representation vector library CF_library is identified. The representation vector corresponding to the target first video f obtained from the second representation vector library is used as the corresponding candidate video representation vector, and the representation vector corresponding to each fifth video obtained from the second representation vector library is used as the corresponding fifth video representation vector. Based on the cosine formula, the vector distance between the candidate video representation vector and each fifth video representation vector can be used as the distance between the target first video f and each fifth video, and the fifth video with the smallest distance is determined as the sixth video f′, thus obtaining the sixth video f′ that is closest to the target first video f from the second representation vector library. The sixth video representation vector corresponding to the sixth video f′ in the first representation vector library is determined as the first video representation vector corresponding to the target first video f, thereby using the second representation vector library to supplement the missing video representation vectors in the first representation vector library.
[0146] S470. Based on the first video representation vector corresponding to each first video, the cache space occupied and the number of copies, and the second video representation vector and cache replacement space corresponding to the second video already cached at each second edge node, determine the third edge node to which each first video should be pushed.
[0147] S480: Based on the number of copies of each first video and the third edge node, push copies of each first video during non-peak request periods.
[0148] The technical solution of this disclosure, by using the video content data corresponding to the requested third video that exists in the most recent first historical time period for knowledge graph embedding learning, can more accurately represent video vectors and further improve the video push effect.
[0149] Based on the above technical solution, S460 may include: detecting whether the first representation vector library contains each first video, and determining the first video hit rate; if the first video hit rate is less than a preset hit rate threshold, updating the first representation vector library, and obtaining the first video representation vector corresponding to each first video from the updated first representation vector library; if the first video hit rate is greater than or equal to the preset hit rate threshold, determining the first video representation vector corresponding to each first video based on the first representation vector library and the second representation vector library.
[0150] Specifically, it can be determined whether each first video is included in the first representation vector library. The ratio of the number of first videos included in the first representation vector library to the total number of first videos is defined as the first video hit rate. If the first video hit rate is less than a preset hit rate threshold, it indicates that many videos lack corresponding representation vectors, and the first representation vector library needs to be updated. In this case, all requested third videos within the most recent first historical time period can be used for knowledge graph embedding learning to retrain the entire knowledge graph, obtaining an updated first representation vector library. The first video representation vector corresponding to each first video is then obtained from the updated first representation vector library. If the first video hit rate is greater than or equal to the preset hit rate threshold, a second representation vector library can be obtained using collaborative filtering. Based on the second representation vector library, the missing video representation vectors in the first representation vector library are supplemented. The specific supplementation process can be found in the description above and will not be repeated here. By controlling the update frequency of the first representation vector library through the first video hit rate, the update cost can be reduced while ensuring the accuracy of the video representation vectors.
[0151] Figure 6 This is a schematic diagram of the structure of a video push device provided in an embodiment of the present disclosure, as shown below. Figure 6 As shown, the device specifically includes: a collection acquisition module 610, a predicted request volume determination module 620, a copy number determination module 630, a cache replacement space determination module 640, a third edge node determination module 650, and a first video push module 660.
[0152] The system includes: a set acquisition module 610, used to acquire a first set of videos to be pushed and a first set of edge nodes corresponding to the first set of videos; a predicted request volume determination module 620, used to predict the predicted request volume of each first video in the first set of videos during the peak request period; a copy number determination module 630, used to determine the number of copies corresponding to each first video based on the predicted request volume and the cached second videos of each first edge node in the first set of edge nodes; and a cache replacement space determination module 640, used to determine the number of copies based on the cache space occupied by each first video, the number of copies, and the number of copies of each first video. The current bandwidth utilization and node cache space of an edge node are used to determine the set of second edge nodes and the cache replacement space corresponding to each second edge node; the third edge node determination module 650 is used to determine the third edge node to which each first video is to be pushed based on the first video representation vector corresponding to each first video, the cache space occupied and the number of copies, and the second video representation vector corresponding to the second video already cached by each second edge node and the cache replacement space; the first video push module 660 is used to push copies of each first video during non-peak request periods based on the number of copies corresponding to each first video and the third edge node.
[0153] The technical solution provided in this disclosure involves predicting the predicted request volume of each first video in a first set of videos to be pushed during peak request periods. Based on the predicted request volume and the second videos already cached by each first edge node in the first edge node set, the number of copies corresponding to each first video is determined. Based on the cache space occupied by each first video and the number of copies, as well as the current bandwidth utilization and node cache space of each first edge node, a second edge node set and a cache replacement space corresponding to each second edge node are determined. Based on the first video representation vector, cache space occupied, and number of copies corresponding to each first video, as well as the second video representation vector and cache replacement space corresponding to the second videos already cached by each second edge node, a third edge node to which each first video should be pushed is determined. Based on the number of copies corresponding to each first video, each copy of the first video is pushed to the corresponding third edge node during non-peak request periods. This approach reasonably matches the videos to be pushed with the edge nodes by considering the differences in edge node caching performance, avoiding situations where high-performance edge nodes are not fully utilized and low-performance edge nodes are overloaded. This achieves load balancing of edge nodes, effectively ensuring video acquisition efficiency and improving user experience.
[0154] Based on the above technical solution, the acquisition module 610 is specifically used for:
[0155] Obtain the set of historical videos that are requested in the current area; based on the historical request volume and preset request volume threshold corresponding to each historical video in the historical video set, determine the first set of videos to be pushed in the current area; combine the edge nodes located in the current area to obtain the first set of edge nodes corresponding to the first set of videos.
[0156] Based on the above technical solutions, the request volume prediction and determination module 620 includes:
[0157] The data acquisition unit is used to acquire video content data and historical request data corresponding to each first video in the first video set;
[0158] The current prediction network model determination unit is used to determine the current prediction network model corresponding to the current region.
[0159] The data input unit is used to input the video content data and the historical request data into the current prediction network model corresponding to the current region for prediction.
[0160] The predicted request volume determination unit is used to determine the predicted request volume of each first video during the peak request period based on the output of the current prediction network model.
[0161] Based on the above technical solutions, the current prediction network model determination unit is specifically used for:
[0162] Determine the target time window corresponding to the current prediction time, wherein multiple time windows are divided with a first preset duration as the granularity during non-request peak periods; based on the correspondence between the region and the prediction network model under each time window, determine the current prediction network model corresponding to the current region under the target time window.
[0163] Based on the above technical solutions, the copy number determination module 630 is specifically used for:
[0164] For each first video, based on the second video already cached by each first edge node in the first edge node set, determine the number of first edge nodes that have cached the first video; based on the predicted request volume and the preset number of parallel request nodes corresponding to the first video, determine the number of push replicas corresponding to the first video; based on the number of push replicas and the number of first edge nodes, determine the number of copy replicas corresponding to the first video.
[0165] Based on the above technical solutions, the cache replacement space determination module 640 includes:
[0166] The total cache space determination unit is used to determine the total cache space corresponding to the first video set based on the cache space corresponding to each first video and the number of copies.
[0167] The second edge node determination unit is used to detect whether the current bandwidth utilization rate corresponding to each first edge node is less than a preset bandwidth utilization rate threshold, and to take the first edge node that is less than the preset bandwidth utilization rate threshold as the second edge node, thereby obtaining the second edge node set.
[0168] The bandwidth utilization difference determination unit is used to determine the bandwidth utilization difference between the current bandwidth utilization of each second edge node and the preset bandwidth utilization threshold.
[0169] The cache replacement space determination unit is used to determine the cache replacement space corresponding to each second edge node based on the total cache occupied space, the node cache space corresponding to each second edge node, and the bandwidth utilization difference.
[0170] Based on the above technical solutions, the cache replacement space determination unit is specifically used for:
[0171] Multiply the node cache space corresponding to each second edge node by the corresponding bandwidth utilization difference to obtain the maximum cache replacement space corresponding to each second edge node; add the maximum cache replacement spaces corresponding to all second edge nodes to obtain the total cache replacement space; divide the maximum cache replacement space corresponding to each second edge node by the total cache replacement space to obtain the cache replacement ratio corresponding to each second edge node; multiply the cache replacement ratio corresponding to each second edge node by the total cache space to obtain the cache replacement space corresponding to each second edge node.
[0172] Based on the above technical solutions, the third edge node determination module 650 includes:
[0173] The clustering grouping unit is used to cluster the first video set based on the first video representation vector corresponding to each first video to obtain multiple first video groups and the center video representation vector corresponding to each first video group.
[0174] The average video representation vector determination unit is used to determine the average video representation vector corresponding to each second edge node based on the second video representation vector corresponding to the second video that has been cached for each second edge node.
[0175] The third edge node determination unit is used to determine the third edge node to which each first video is to be pushed, based on the center representation vector corresponding to each first video group, the average video representation vector corresponding to each second edge node, the cache replacement space, the cache occupied space corresponding to each first video, and the number of copy replicas.
[0176] Based on the above technical solutions, the third edge node determination unit includes:
[0177] The current center representation vector acquisition subunit is used to obtain the current center representation vector corresponding to the current first video group, based on the center representation vector corresponding to each first video group;
[0178] The second edge node arrangement subunit is used to determine the vector distance between the current center representation vector and the average video representation vector corresponding to each second edge node, and to arrange the second edge nodes in descending order based on the vector distance to obtain the second edge node sequence.
[0179] The third edge node determination subunit is used to determine the third edge node to which the current first video is to be pushed, based on the second edge node sequence, the cache replacement space corresponding to each second edge node, the current cache space occupied by the current first video, and the current number of copy replicas.
[0180] Based on the above technical solutions, the third edge node determines the sub-units, including:
[0181] The target selection quantity determination submodule is used to determine a target selection quantity greater than the current copy quantity based on the current copy quantity corresponding to the current first video.
[0182] The target second edge node selection submodule is used to select the target second edge nodes sequentially based on the order of the second edge node sequence, wherein the cache replacement space corresponding to the target second edge node is greater than the current cache space occupied by the current first video.
[0183] The third edge node determination submodule is used to determine the third edge node to which the current first video should be pushed, based on the current number of copy replicas, the maximum upload bandwidth corresponding to each target second edge node, and the node cache space.
[0184] Based on the above technical solutions, the third edge node determination submodule is specifically used for:
[0185] Based on the maximum upload bandwidth and node cache space corresponding to each target second edge node, the unit space upload bandwidth corresponding to each target second edge node is determined; based on the unit space upload bandwidth, the target second edge nodes are sorted in descending order to obtain a target second edge node sequence, and based on the target second edge node sequence and the current number of copy replicas, the third edge node to which the current first video is to be pushed is determined.
[0186] Based on the above technical solutions, the device also includes:
[0187] The first representation vector library acquisition module is used to acquire a first representation vector library, which includes: a third video representation vector corresponding to each third video, wherein the third video is a video that was requested in the most recent first historical time period; the third video representation vector is obtained by embedding and learning a knowledge graph based on the video content data corresponding to each third video.
[0188] The first video representation vector determination module is used to obtain the first video representation vector corresponding to each first video from the first representation vector library.
[0189] Based on the above technical solutions, the first video representation vector determination module includes:
[0190] The second representation vector library acquisition unit is used to acquire a second representation vector library if the first representation vector library does not contain a first video representation vector corresponding to the target first video. The second representation vector library includes: a fourth video representation vector corresponding to each fourth video, wherein the fourth video refers to a video that was requested in the most recent second historical time period and whose historical request volume is greater than a preset request volume threshold; the second historical time period is shorter than the first historical time period; the fourth video representation vector is obtained by embedding learning based on the fourth video requested by each user through collaborative filtering.
[0191] The first video representation vector determination unit is used to determine the first video representation vector corresponding to the target first video based on the first representation vector library and the second representation vector library.
[0192] Based on the above technical solutions, the first video representation vector determination unit is specifically used for:
[0193] A fifth video is identified that exists simultaneously in both the first and second representation vector libraries. The candidate video representation vector corresponding to the target first video and the fifth video representation vector corresponding to each fifth video are obtained from the second representation vector library. Based on the candidate video representation vector and the fifth video representation vector, the distance between the target first video and each fifth video is determined, and the fifth video with the smallest distance is identified as the sixth video. The sixth video representation vector corresponding to the sixth video is obtained from the first representation vector library, and the sixth video representation vector is identified as the first video representation vector corresponding to the target first video.
[0194] Based on the above technical solutions, the first video representation vector determination module is specifically used for:
[0195] The system detects whether each first video is included in the first representation vector library and determines the first video hit rate. If the first video hit rate is less than a preset hit rate threshold, the first representation vector library is updated, and the first video representation vector corresponding to each first video is obtained from the updated first representation vector library. If the first video hit rate is greater than or equal to the preset hit rate threshold, the first video representation vector corresponding to each first video is determined based on the first representation vector library and the second representation vector library.
[0196] The video push device provided in this disclosure can execute the video push method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the method execution.
[0197] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0198] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 7 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 7 The diagram below shows the structure of the terminal device or server 500. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0199] like Figure 7 As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.
[0200] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0201] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0202] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0203] The electronic device provided in this embodiment and the video push method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0204] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the video push method provided in the above embodiments.
[0205] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0206] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0207] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0208] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire a first set of videos to be pushed and a first set of edge nodes corresponding to the first set of videos; predict the predicted request volume for each first video in the first set of videos during peak request periods; determine the number of copies corresponding to each first video based on the predicted request volume and the second videos cached by each first edge node in the first set of edge nodes; determine a second set of edge nodes and a cache replacement space corresponding to each second edge node based on the cache space occupied by each first video, the number of copies, the current bandwidth utilization and node cache space of each first edge node; determine a third edge node to which each first video is to be pushed based on the first video representation vector, the cache space occupied and the number of copies, the second video representation vector corresponding to the second videos cached by each second edge node and the cache replacement space; and push each first video by copy during non-peak request periods based on the number of copies corresponding to each first video and the third edge node.
[0209] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0210] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0211] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0212] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0213] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0214] According to one or more embodiments of this disclosure, [Example 1] provides a video push method, including:
[0215] Obtain the first set of videos to be pushed and the first set of edge nodes corresponding to the first set of videos;
[0216] For each first video in the first video set, a prediction is made to determine the predicted request volume of each first video during the peak request period;
[0217] Based on the predicted request volume and the second video already cached by each first edge node in the first edge node set, determine the number of copies corresponding to each first video;
[0218] Based on the cache space occupied by each first video and the number of copies, as well as the current bandwidth utilization and node cache space of each first edge node, the set of second edge nodes and the cache replacement space corresponding to each second edge node are determined.
[0219] Based on the first video representation vector corresponding to each first video, the cache space occupied and the number of copies, as well as the second video representation vector corresponding to the second video already cached at each second edge node and the cache replacement space, the third edge node to which each first video is to be pushed is determined;
[0220] Based on the number of copies corresponding to each first video and the third edge node, each first video is copied and pushed during non-peak request periods.
[0221] According to one or more embodiments of this disclosure, [Example 2] provides a video push method, which further includes:
[0222] Optionally, obtaining the first set of videos to be pushed and the first set of edge nodes corresponding to the first set of videos includes:
[0223] Retrieve the set of historical videos that exist in the current region;
[0224] Based on the historical request volume and preset request volume threshold corresponding to each historical video in the historical video set, determine the first video set to be pushed in the current area;
[0225] The edge nodes located in the current area are combined to obtain the first edge node set corresponding to the first video set.
[0226] According to one or more embodiments of this disclosure, [Example 3] provides a video push method, which further includes:
[0227] Optionally, the step of predicting the number of requests for each first video in the first video set and determining the predicted request volume for each first video during the peak request period includes:
[0228] Obtain the video content data and historical request data corresponding to each first video in the first video set;
[0229] Determine the current prediction network model corresponding to the current region;
[0230] The video content data and the historical request data are input into the current prediction network model corresponding to the current region for prediction.
[0231] Based on the output of the current prediction network model, the predicted request volume for each first video during the peak request period is determined.
[0232] According to one or more embodiments of this disclosure, [Example 4] provides a video push method, which further includes:
[0233] Optionally, determining the current prediction network model corresponding to the current region includes:
[0234] Determine the target time window corresponding to the current prediction time, wherein the non-peak period is divided into multiple time windows with a first preset duration as the granularity;
[0235] Based on the correspondence between the region and the prediction network model under each time window, the current prediction network model corresponding to the current region under the target time window is determined.
[0236] According to one or more embodiments of this disclosure, [Example 5] provides a video push method, which further includes:
[0237] Optionally, determining the number of copies corresponding to each first video based on the predicted request volume and the second video already cached by each first edge node in the first edge node set includes:
[0238] For each first video, based on the second video already cached for each first edge node in the first edge node set, determine the number of first edge nodes that have cached the first video;
[0239] Based on the predicted request volume and the preset number of parallel request nodes corresponding to the first video, the number of push replicas corresponding to the first video is determined;
[0240] Based on the number of push copies and the number of the first edge nodes, the number of copy copies corresponding to the first video is determined.
[0241] According to one or more embodiments of this disclosure, Example Six provides a video push method, which further includes:
[0242] Optionally, determining the set of second edge nodes and the cache replacement space corresponding to each second edge node based on the cache space occupied by each first video, the number of copies, the current bandwidth utilization and node cache space of each first edge node includes:
[0243] Based on the cache space occupied by each first video and the number of copies, the total cache space occupied by the first video set is determined.
[0244] Detect whether the current bandwidth utilization rate of each first edge node is less than a preset bandwidth utilization rate threshold, and take the first edge nodes that are less than the preset bandwidth utilization rate threshold as second edge nodes to obtain a set of second edge nodes;
[0245] Determine the bandwidth utilization difference between the current bandwidth utilization of each second edge node and the preset bandwidth utilization threshold;
[0246] Based on the total cache space occupied, the node cache space corresponding to each second edge node, and the bandwidth utilization difference, the cache replacement space corresponding to each second edge node is determined.
[0247] According to one or more embodiments of this disclosure, [Example Seven] provides a video push method, which further includes:
[0248] Optionally, determining the cache replacement space corresponding to each second edge node based on the total cache occupancy, the node cache space corresponding to each second edge node, and the bandwidth utilization difference includes:
[0249] Multiply the node cache space corresponding to each second edge node by the corresponding bandwidth utilization difference to obtain the maximum cache replacement space corresponding to each second edge node;
[0250] Add up the maximum cache replacement space corresponding to all the second edge nodes to obtain the total cache replacement space, and divide the maximum cache replacement space corresponding to each second edge node by the total cache replacement space to obtain the cache replacement ratio corresponding to each second edge node;
[0251] Multiply the cache replacement ratio corresponding to each second edge node by the total cache space to obtain the cache replacement space corresponding to each second edge node.
[0252] According to one or more embodiments of this disclosure, [Example Eight] provides a video push method, which further includes:
[0253] Optionally, determining the third edge node to which each first video should be pushed, based on the first video representation vector corresponding to each first video, the cache space occupied, the number of copies, and the second video representation vector corresponding to the second video already cached at each second edge node and the cache replacement space, includes:
[0254] Based on the first video representation vector corresponding to each first video, the first video set is clustered and grouped to obtain multiple first video groups and the central video representation vector corresponding to each first video group.
[0255] Based on the second video representation vector corresponding to the second video cached at each second edge node, determine the average video representation vector corresponding to each second edge node;
[0256] Based on the central representation vector corresponding to each first video group, the average video representation vector corresponding to each second edge node, the cache replacement space, the cache space occupied by each first video, and the number of copies, the third edge node to which each first video is to be pushed is determined.
[0257] According to one or more embodiments of this disclosure, [Example Nine] provides a video push method, which further includes:
[0258] Optionally, determining the third edge node to which each first video should be pushed, based on the center representation vector corresponding to each first video group, the average video representation vector corresponding to each second edge node, the cache replacement space, the cache space occupied by each first video, and the number of copies, includes:
[0259] Based on the central representation vector corresponding to each first video group, obtain the current central representation vector corresponding to the current first video group where the current first video is located;
[0260] Determine the vector distance between the current center representation vector and the average video representation vector corresponding to each second edge node, and based on the vector distance, sort the second edge nodes in descending order to obtain the second edge node sequence;
[0261] Based on the second edge node sequence, the cache replacement space corresponding to each second edge node, the current cache space occupied by the current first video, and the current number of copy replicas, the third edge node to which the current first video is to be pushed is determined.
[0262] According to one or more embodiments of this disclosure, [Example 10] provides a video push method, which further includes:
[0263] Optionally, determining the third edge node to which the current first video should be pushed, based on the second edge node sequence, the cache replacement space corresponding to each second edge node, the current cache space occupied by the current first video, and the current number of copies, includes:
[0264] Based on the current number of copies of the first video, determine a target selection number that is greater than the current number of copies.
[0265] Based on the order of the second edge node sequence, the target second edge nodes of the target selection number are selected sequentially, wherein the cache replacement space corresponding to the target second edge node is greater than the current cache space occupied by the current first video;
[0266] Based on the current number of copies, the maximum upload bandwidth corresponding to each target second edge node, and the node cache space, determine the third edge node to which the current first video needs to be pushed.
[0267] According to one or more embodiments of this disclosure, Example 11 provides a video push method, which further includes:
[0268] Optionally, determining the third edge node to which the current first video is to be pushed, based on the current number of copies, the maximum upload bandwidth corresponding to each target second edge node, and the node cache space, includes:
[0269] Based on the maximum upload bandwidth and node cache space corresponding to each target second edge node, determine the unit space upload bandwidth corresponding to each target second edge node;
[0270] Based on the unit space upload bandwidth, the target second edge nodes are sorted in descending order to obtain the target second edge node sequence, and the third edge node to which the current first video is to be pushed is determined based on the target second edge node sequence and the current number of copies.
[0271] According to one or more embodiments of this disclosure, [Example Twelve] provides a video push method, which further includes:
[0272] Optionally, before determining the third edge node to which each first video should be pushed based on the first video representation vector corresponding to each first video, the cache space occupied, the number of copies, and the second video representation vector corresponding to the second video already cached at each second edge node and the cache replacement space, the method further includes:
[0273] Obtain a first representation vector library, which includes: a third video representation vector corresponding to each third video, wherein the third video is a video that was requested in the most recent first historical time period; the third video representation vector is obtained by embedding and learning a knowledge graph based on the video content data corresponding to each third video.
[0274] Obtain the first video representation vector corresponding to each first video from the first representation vector library.
[0275] According to one or more embodiments of this disclosure, [Example Thirteen] provides a video push method, which further includes:
[0276] Optionally, obtaining the first video representation vector corresponding to each first video from the first representation vector library includes:
[0277] If the first video representation vector corresponding to the target first video does not exist in the first representation vector library, then the second representation vector library is obtained. The second representation vector library includes: the fourth video representation vector corresponding to each fourth video, wherein the fourth video refers to the video that was requested in the most recent second historical time period and whose historical request volume is greater than a preset request volume threshold; the second historical time period is shorter than the first historical time period; the fourth video representation vector is obtained by embedding learning based on the fourth video requested by each user through collaborative filtering.
[0278] Based on the first representation vector library and the second representation vector library, the first video representation vector corresponding to the target first video is determined.
[0279] According to one or more embodiments of this disclosure, [Example Fourteen] provides a video push method, which further includes:
[0280] Optionally, determining the first video representation vector corresponding to the target first video based on the first representation vector library and the second representation vector library includes:
[0281] Identify the fifth video that exists simultaneously in both the first representation vector library and the second representation vector library;
[0282] Obtain the candidate video representation vector corresponding to the target first video and the fifth video representation vector corresponding to each fifth video from the second representation vector library;
[0283] Based on the candidate video representation vector and the fifth video representation vector, the distance between the target first video and each fifth video is determined, and the fifth video with the smallest distance is determined as the sixth video.
[0284] Obtain the sixth video representation vector corresponding to the sixth video from the first representation vector library, and determine the sixth video representation vector as the first video representation vector corresponding to the target first video.
[0285] According to one or more embodiments of this disclosure, [Example Fifteen] provides a video push method, which further includes:
[0286] Optionally, obtaining the first video representation vector corresponding to each first video from the first representation vector library includes:
[0287] Detect whether each first video is contained in the first representation vector library, and determine the hit rate of the first video;
[0288] If the hit rate of the first video is less than the preset hit rate threshold, the first representation vector library is updated, and the first video representation vector corresponding to each first video is obtained from the updated first representation vector library.
[0289] If the hit rate of the first video is greater than or equal to a preset hit rate threshold, then based on the first representation vector library and the second representation vector library, the first video representation vector corresponding to each first video is determined.
[0290] According to one or more embodiments of this disclosure, [Example Sixteen] provides a video push device, including:
[0291] The collection acquisition module is used to acquire the first video collection to be pushed and the first edge node collection corresponding to the first video collection;
[0292] The predicted request volume determination module is used to predict the predicted request volume of each first video in the first video set during the peak request period.
[0293] The copy number determination module is used to determine the number of copies corresponding to each first video based on the predicted request volume and the second video cached by each first edge node in the first edge node set;
[0294] The cache replacement space determination module is used to determine the second edge node set and the cache replacement space corresponding to each second edge node based on the cache space occupied by each first video and the number of copies, as well as the current bandwidth utilization and node cache space of each first edge node.
[0295] The third edge node determination module is used to determine the third edge node to which each first video is to be pushed, based on the first video representation vector corresponding to each first video, the cache space occupied and the number of copies, and the second video representation vector corresponding to the second video already cached at each second edge node and the cache replacement space.
[0296] The first video push module is used to push copies of each first video during non-peak request periods based on the number of copies corresponding to each first video and the third edge node.
[0297] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0298] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0299] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A video push method, characterized in that, include: Obtain the first set of videos to be pushed and the first set of edge nodes corresponding to the first set of videos; For each first video in the first video set, a prediction is made to determine the predicted request volume of each first video during the peak request period; Based on the predicted request volume and the second video already cached by each first edge node in the first edge node set, determine the number of copies corresponding to each first video; Based on the cache space occupied by each first video and the number of copies, the total cache space occupied by the first video set is determined. Detect whether the current bandwidth utilization rate of each first edge node is less than a preset bandwidth utilization rate threshold, and take the first edge nodes that are less than the preset bandwidth utilization rate threshold as second edge nodes to obtain a set of second edge nodes; Determine the bandwidth utilization difference between the current bandwidth utilization of each second edge node and the preset bandwidth utilization threshold; Based on the total cache space occupied, the node cache space corresponding to each second edge node, and the bandwidth utilization difference, the cache replacement space corresponding to each second edge node is determined; Based on the first video representation vector corresponding to each first video, the cache space occupied and the number of copies, as well as the second video representation vector corresponding to the second video already cached at each second edge node and the cache replacement space, the third edge node to which each first video is to be pushed is determined; Based on the number of copies corresponding to each first video and the third edge node, each first video is copied and pushed during non-peak request periods.
2. The video push method according to claim 1, characterized in that, The step of obtaining the first set of videos to be pushed and the first set of edge nodes corresponding to the first set of videos includes: Retrieve the set of historical videos that exist in the current region; Based on the historical request volume and preset request volume threshold corresponding to each historical video in the historical video set, determine the first video set to be pushed in the current area; The edge nodes located in the current area are combined to obtain the first edge node set corresponding to the first video set.
3. The video push method according to claim 2, characterized in that, The step of predicting the number of requests for each first video in the first video set and determining the predicted request volume for each first video during the peak request period includes: Obtain the video content data and historical request data corresponding to each first video in the first video set; Determine the current prediction network model corresponding to the current region; The video content data and the historical request data are input into the current prediction network model corresponding to the current region for prediction. Based on the output of the current prediction network model, the predicted request volume for each first video during the peak request period is determined.
4. The video push method according to claim 3, characterized in that, Determining the current prediction network model corresponding to the current region includes: Determine the target time window corresponding to the current prediction time, wherein the non-peak period is divided into multiple time windows with a first preset duration as the granularity; Based on the correspondence between the region and the prediction network model under each time window, the current prediction network model corresponding to the current region under the target time window is determined.
5. The video push method according to claim 1, characterized in that, The step of determining the number of copies corresponding to each first video based on the predicted request volume and the second video already cached by each first edge node in the first edge node set includes: For each first video, based on the second video already cached for each first edge node in the first edge node set, determine the number of first edge nodes that have cached the first video; Based on the predicted request volume and the preset number of parallel request nodes corresponding to the first video, the number of push replicas corresponding to the first video is determined; Based on the number of push copies and the number of the first edge nodes, the number of copy copies corresponding to the first video is determined.
6. The video push method according to claim 1, characterized in that, The step of determining the cache replacement space corresponding to each second edge node based on the total cache space occupied, the node cache space corresponding to each second edge node, and the bandwidth utilization difference includes: Multiply the node cache space corresponding to each second edge node by the corresponding bandwidth utilization difference to obtain the maximum cache replacement space corresponding to each second edge node; Add up the maximum cache replacement space corresponding to all the second edge nodes to obtain the total cache replacement space, and divide the maximum cache replacement space corresponding to each second edge node by the total cache replacement space to obtain the cache replacement ratio corresponding to each second edge node; Multiply the cache replacement ratio corresponding to each second edge node by the total cache space to obtain the cache replacement space corresponding to each second edge node.
7. The video push method according to claim 1, characterized in that, The step of determining the third edge node to which each first video should be pushed, based on the first video representation vector corresponding to each first video, the cache space occupied, the number of copies, and the second video representation vector corresponding to the second video already cached at each second edge node and the cache replacement space, includes: Based on the first video representation vector corresponding to each first video, the first video set is clustered and grouped to obtain multiple first video groups and the central video representation vector corresponding to each first video group. Based on the second video representation vector corresponding to the second video cached at each second edge node, determine the average video representation vector corresponding to each second edge node; Based on the central representation vector corresponding to each first video group, the average video representation vector corresponding to each second edge node, the cache replacement space, the cache space occupied by each first video, and the number of copies, the third edge node to which each first video is to be pushed is determined.
8. The video push method according to claim 7, characterized in that, The step of determining the third edge node to which each first video should be pushed, based on the center representation vector corresponding to each first video group, the average video representation vector corresponding to each second edge node, the cache replacement space, the cache space occupied by each first video, and the number of copies, includes: Based on the central representation vector corresponding to each first video group, obtain the current central representation vector corresponding to the current first video group where the current first video is located; Determine the vector distance between the current center representation vector and the average video representation vector corresponding to each second edge node, and based on the vector distance, sort the second edge nodes in descending order to obtain the second edge node sequence; Based on the second edge node sequence, the cache replacement space corresponding to each second edge node, the current cache space occupied by the current first video, and the current number of copy replicas, the third edge node to which the current first video is to be pushed is determined.
9. The video push method according to claim 8, characterized in that, The step of determining the third edge node to which the current first video should be pushed, based on the second edge node sequence, the cache replacement space corresponding to each second edge node, the current cache space occupied by the current first video, and the current number of copies, includes: Based on the current number of copies of the first video, determine a target selection number that is greater than the current number of copies. Based on the order of the second edge node sequence, the target second edge nodes of the target selection number are selected sequentially, wherein the cache replacement space corresponding to the target second edge node is greater than the current cache space occupied by the current first video; Based on the current number of copies, the maximum upload bandwidth corresponding to each target second edge node, and the node cache space, determine the third edge node to which the current first video needs to be pushed.
10. The video push method according to claim 9, characterized in that, The process of determining the third edge node to which the first video is to be pushed, based on the current number of copies, the maximum upload bandwidth corresponding to each target second edge node, and the node cache space, includes: Based on the maximum upload bandwidth and node cache space corresponding to each target second edge node, determine the unit space upload bandwidth corresponding to each target second edge node; Based on the unit space upload bandwidth, the target second edge nodes are sorted in descending order to obtain the target second edge node sequence, and the third edge node to which the current first video is to be pushed is determined based on the target second edge node sequence and the current number of copies.
11. The video push method according to any one of claims 1-10, characterized in that, Before determining the third edge node to which each first video should be pushed, based on the first video representation vector corresponding to each first video, the cache space occupied, the number of copies, and the second video representation vector corresponding to the second video already cached at each second edge node and the cache replacement space, the method further includes: Obtain a first representation vector library, which includes: a third video representation vector corresponding to each third video, wherein the third video is a video that was requested in the most recent first historical time period; the third video representation vector is obtained by embedding and learning a knowledge graph based on the video content data corresponding to each third video. Obtain the first video representation vector corresponding to each first video from the first representation vector library.
12. The video push method according to claim 11, characterized in that, The step of obtaining the first video representation vector corresponding to each first video from the first representation vector library includes: If the first video representation vector corresponding to the target first video does not exist in the first representation vector library, then the second representation vector library is obtained. The second representation vector library includes: the fourth video representation vector corresponding to each fourth video, wherein the fourth video refers to the video that was requested in the most recent second historical time period and whose historical request volume is greater than a preset request volume threshold; the second historical time period is shorter than the first historical time period; the fourth video representation vector is obtained by embedding learning based on the fourth video requested by each user through collaborative filtering. Based on the first representation vector library and the second representation vector library, the first video representation vector corresponding to the target first video is determined.
13. The video push method according to claim 12, characterized in that, The step of determining the first video representation vector corresponding to the target first video based on the first representation vector library and the second representation vector library includes: Identify the fifth video that exists simultaneously in both the first representation vector library and the second representation vector library; Obtain the candidate video representation vector corresponding to the target first video and the fifth video representation vector corresponding to each fifth video from the second representation vector library; Based on the candidate video representation vector and the fifth video representation vector, the distance between the target first video and each fifth video is determined, and the fifth video with the smallest distance is determined as the sixth video. Obtain the sixth video representation vector corresponding to the sixth video from the first representation vector library, and determine the sixth video representation vector as the first video representation vector corresponding to the target first video.
14. The video push method according to claim 11, characterized in that, The step of obtaining the first video representation vector corresponding to each first video from the first representation vector library includes: Detect whether each first video is contained in the first representation vector library, and determine the hit rate of the first video; If the hit rate of the first video is less than the preset hit rate threshold, the first representation vector library is updated, and the first video representation vector corresponding to each first video is obtained from the updated first representation vector library. If the hit rate of the first video is greater than or equal to a preset hit rate threshold, then based on the first representation vector library and the second representation vector library, the first video representation vector corresponding to each first video is determined.
15. A video push device, characterized in that, include: The collection acquisition module is used to acquire the first video collection to be pushed and the first edge node collection corresponding to the first video collection; The predicted request volume determination module is used to predict the predicted request volume of each first video in the first video set and determine the predicted request volume of each first video during the peak request period. The copy number determination module is used to determine the number of copies corresponding to each first video based on the predicted request volume and the second video cached by each first edge node in the first edge node set; The cache replacement space determination module is used to determine the total cache space corresponding to the first video set based on the cache space occupied by each first video and the number of copies. Detect whether the current bandwidth utilization rate of each first edge node is less than a preset bandwidth utilization rate threshold, and take the first edge nodes that are less than the preset bandwidth utilization rate threshold as second edge nodes to obtain a set of second edge nodes; Determine the bandwidth utilization difference between the current bandwidth utilization of each second edge node and the preset bandwidth utilization threshold; Based on the total cache space occupied, the node cache space corresponding to each second edge node, and the bandwidth utilization difference, the cache replacement space corresponding to each second edge node is determined; The third edge node determination module is used to determine the third edge node to which each first video is to be pushed, based on the first video representation vector corresponding to each first video, the cache space occupied and the number of copies, and the second video representation vector corresponding to the second video already cached at each second edge node and the cache replacement space. The first video push module is used to push copies of each first video during non-peak request periods based on the number of copies corresponding to each first video and the third edge node.
16. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the video push method as described in any one of claims 1-14.
17. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the video push method as described in any one of claims 1-14.
Citation Information
Patent Citations
Streaming media video-on-demand duplicate hybrid buffer strategy based on cloud server cluster
CN103297431A
Content Placement
US20120137336A1