Video pushing method and apparatus, device, and storage medium
By analyzing the predicted request volume of the video and matching the edge node performance, the load balancing of the edge nodes is achieved, which solves the problem of excessive edge node load in the existing technology and improves the video acquisition speed and user experience.
Patent Information
- Application Number
- PCT/CN2024/082305
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-12
- Filing Date
- 2024-03-18
- Publication Date
- 2024-10-17
AI Technical Summary
When the existing technology pushes videos to the edge node network, the load on the edge nodes is too high, and the video acquisition speed cannot be effectively guaranteed, which reduces the user experience.
By analyzing the predicted request volume of the video to be pushed, and combining the cache performance differences of edge nodes, we can reasonably match the video and edge nodes to avoid underutilization of stronger nodes and excessive load on weak nodes, and use non-peak request periods Copy push is performed within the server to achieve load balancing.
It effectively ensures the speed of video acquisition and improves user experience. By reasonably matching videos and edge nodes, it avoids load imbalance problems and improves the bandwidth utilization of edge nodes.
Smart Images

Figure CN2024082305_17102024_PF_FP_ABST
Abstract
Description
Video push method, device, equipment and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese invention patent application number 202310389667.4, entitled “A video push method, device, equipment and storage medium” and filed on April 12, 2023, and the entire application is incorporated herein by reference. Technical Field
[0003] The present disclosure relates to computer technology, and more particularly to a video push method, apparatus, device, and storage medium. Background Art
[0004] With the rapid development of computer technology, video copies in CDN (Content Delivery Network) servers can be pushed to edge node networks for caching, allowing users to obtain videos from closer edge nodes, thereby improving the video acquisition speed and reducing the bandwidth traffic for obtaining videos from CDN.
[0005] Currently, when pushing video copies to edge node networks, the video copies are usually pushed to a random edge node. However, this random push method can cause edge nodes to be overloaded, making it impossible to effectively guarantee video acquisition speed, and thus reducing the user experience.
[0006] Summary of the Invention
[0007] The present disclosure provides a video push method, apparatus, device and storage medium to achieve load balancing of edge nodes, thereby effectively ensuring the video acquisition speed and improving user experience.
[0008] In a first aspect, an embodiment of the present disclosure provides a video push method, including:
[0009] Obtaining a first video set to be pushed and a first edge node set corresponding to the first video set;
[0010] Predicting each first video in the first video set, and determining a predicted request amount for each first video during a peak request period;
[0011] Determining a number of copies corresponding to each first video based on the predicted request amount and the second video cached by each first edge node in the first edge node set;
[0012] Determine a second edge node set and a cache replacement space corresponding to each second edge node based on the cache occupied space and the number of copies corresponding to each first video, and the current bandwidth utilization and node cache space corresponding to each first edge node;
[0013] Determining a third edge node to which each first video is to be pushed based on a first video representation vector corresponding to each first video, the cache occupied space, and the number of copies, and a second video representation vector corresponding to a second video cached by each second edge node and the cache replacement space;
[0014] Based on the number of copies corresponding to each first video and the third edge node, a copy of each first video is pushed during a non-request peak period.
[0015] In a second aspect, the present disclosure also provides a video push device, including:
[0016] A set acquisition module, configured to acquire a first video set to be pushed and a first edge node set corresponding to the first video set;
[0017] a predicted request amount determination module, configured to predict each first video in the first video set and determine a predicted request amount for each first video during a request peak period;
[0018] a copy number determination module, configured to determine the number of copies corresponding to each first video based on the predicted request amount and the second video cached by each first edge node in the first edge node set;
[0019] a cache replacement space determination module, configured to determine a set of second edge nodes and a cache replacement space corresponding to each second edge node based on the cache occupied space and the number of copies corresponding to each first video, and the current bandwidth utilization and node cache space corresponding to each first edge node;
[0020] A third edge node determination module is configured to determine a third edge node to which each first video is to be pushed based on a first video representation vector corresponding to each first video, the cache occupied space, and the number of copies, and a second video representation vector corresponding to a second video cached by each second edge node and the cache replacement space;
[0021] The first video pushing module is configured to push a copy of each first video during a non-request peak period based on the number of copies corresponding to each first video and the third edge node.
[0022] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0023] one or more processors;
[0024] a storage device for storing one or more programs,
[0025] When the one or more programs are executed by the one or more processors, the one or more processors implement the video pushing method as described in any embodiment of the present disclosure.
[0026] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the video push method as described in any of the embodiments of the present disclosure.
[0027] In the disclosed embodiment, a predicted request volume for each first video in a set of first videos to be pushed is determined during a peak request period. The number of copies corresponding to each first video is determined based on the predicted request volume and the second videos cached by each first edge node in the set of first edge nodes. A cache replacement space corresponding to a set of second edge nodes and each second edge node is determined based on the cache occupied space 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. A third edge node to which each first video is to be pushed is determined based on the first video representation vector, cache occupied space, and the 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 cached by each second edge node. Furthermore, each first video copy is pushed to the corresponding third edge node during a non-peak request period based on the number of copies corresponding to each first video. This allows for reasonable matching of videos to be pushed and edge nodes by considering differences in edge node cache performance, avoiding situations where stronger edge nodes fail to fully utilize their capabilities and weaker edge nodes are overloaded. This achieves load balancing among edge nodes, effectively ensuring video acquisition efficiency and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0029] FIG1 is a flow chart of a video push method provided by an embodiment of the present disclosure;
[0030] FIG2 is a flow chart of a video push method provided by an embodiment of the present disclosure;
[0031] FIG3 is a flow chart of a video push method provided by an embodiment of the present disclosure;
[0032] FIG4 is a flow chart of a video push method provided by an embodiment of the present disclosure;
[0033] FIG5 is an example of a knowledge graph involved in an embodiment of the present disclosure;
[0034] FIG6 is a structural diagram of a video push device provided by an embodiment of the present disclosure;
[0035] FIG7 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0037] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0038] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0039] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0040] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0041] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0042] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0043] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0044] Before introducing the embodiments of the present disclosure, let's first describe the video push scenario. The video push architecture includes terminals, edge nodes, and CDNs. A terminal can be a user device used to play videos. An edge node can be a small network device with caching capabilities, such as a server attached to a base station, a network operator's small data center, or a small computer room in a community or enterprise. A CDN can be a cloud server used to store all videos. The storage capacity of a CDN is greater than that of an edge node. For example, a CDN can be a large computer room, while an edge node can be a decentralized storage node such as a home router or a small computer room. A CDN can connect to an edge node network, which includes multiple edge nodes. The CDN can create multiple copies of the same video and push each copy to an edge node in the edge node network, allowing multiple edge nodes in the edge node network to store the same video. The user can directly pull videos from a closer edge node instead of from the CDN, reducing the bandwidth required for requests to the CDN. By storing popular videos in edge nodes, massive user requests can be directed from the center to the edge, thereby reducing latency and offloading traffic. Because edge nodes are close to the user end and are widely distributed, the capacity and stability of edge nodes are more fragile than CDN. Therefore, the user end can connect to multiple edge nodes at the same time to download videos in parallel to ensure smooth video viewing.
[0045] As users continuously issue video requests, the workload on each edge node in the edge node network is dynamically changing and highly skewed due to differences in the number of videos stored and the frequency of requests received. However, a single edge node is limited in the number of video requests it can process in parallel. When overloaded, an edge node will refuse to provide service to users. This leads to a rapid increase in the connection failure rate of requests during the evening peak, limiting the effective utilization of edge node bandwidth, making it impossible to effectively guarantee video access speeds, and affecting the smoothness of user viewing. It should be noted that different videos are pushed to different numbers of copies in the edge node network, that is, they are pushed to different numbers of edge nodes.
[0046] Figure 1 is a flow chart of a video push method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the case of pushing a copied video copy to an edge node network. The method can be executed by a video push device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a CDN server, etc.
[0047] As shown in FIG1 , the video push method specifically includes the following steps:
[0048] S110: Obtain a first video set to be pushed and a first edge node set corresponding to the first video set.
[0049] The first video may refer to a video that needs to be pushed to the edge node network. The first video set may be a set consisting of all first videos. The video in this embodiment may be a video file in the form of a file. Different videos may have different video content characteristics, such as video bit rate, video resolution, etc. The first edge node set may refer to the push object of the first video set, that is, the set consisting of edge nodes included in the edge node network to which the first video set is to be pushed.
[0050] Specifically, the CDN can use all stored videos as the first videos to be pushed, or it can select videos with a high historical request volume (i.e., high popularity) from all stored videos as the first videos to be pushed, so as to improve cache utilization. For example, the historical request volume corresponding to each video can be obtained, and the video with a historical request volume greater than a preset request volume threshold can be used as the first video 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 an edge node in the edge node network.
[0051] Exemplarily, "obtaining the first video set to be pushed" in S110 may include: obtaining a historical video set for which requests exist within the current historical period; determining the first video set to be pushed based on the historical request volume corresponding to each historical video in the historical video set and a preset request volume threshold.
[0052] The current historical period may be the historical period closest to the current push cycle. For example, the current historical period may refer to the last hour. The non-peak request period is divided into multiple push cycles using a second preset duration as the granularity. The non-peak request period may refer to a period other than the peak request period. The peak request period may refer to a time period with a peak request volume. For example, the peak request period is 20:00-21:00, and the non-peak request period is 0:00-20:00 and 21:00-24:00. Within the non-peak request period, each second preset duration, such as 5 minutes, is used as a push cycle. This divides the non-peak request period into multiple push cycles, and video push is performed within each push cycle, thereby achieving periodic push and further improving video push performance. The current push cycle may refer to the push cycle currently in progress. The historical request volume may refer to the number of video requests by users within the current historical period, that is, the number of user visits.
[0053] Specifically, for the current push cycle, the historical request volume corresponding to each historical video in the current historical period can be compared with the preset request volume threshold, and the historical videos greater than or equal to the preset request volume threshold are used as the first videos to be pushed to obtain the first video set. Historical videos less than the preset request volume threshold are not pushed in the current push cycle. Periodic push during non-request peak periods indicates that some videos will be pushed and stored on edge nodes when they are away from the request peak period. However, as the prediction time span increases, the prediction accuracy of video popularity will decrease significantly, so that only using video popularity for push will result in uneven load on edge nodes.
[0054] S120: Predict each first video in the first video set, and determine a predicted request volume of each first video during a request peak period.
[0055] The request volume can be the number of times a user requests a video, i.e., the number of user visits. The predicted request volume is the predicted request volume during a subsequent peak request period. A higher predicted request volume indicates a higher video popularity and heat.
[0056] Specifically, a regression prediction can be performed on the video content data and historical request data for each first video over a past period of time to obtain the predicted request volume for each first video during the peak request period. The video content data may include, but is not limited to, video bitrate, video size, encoding method, video resolution, video content category, video length, video release time, and video publisher information. The historical request data can include the video request volume for a recent period of time. For example, historical request volume within the past 24 hours can be obtained at a granularity of one hour.
[0057] 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 integrate the video content data and historical request data to predict the predicted request volume for the first video during the peak request period and output the predicted request volume. By utilizing the regression prediction model, the predicted request volume for each first video during the peak request period can be determined more accurately and quickly.
[0058] S130: Determine the number of copies corresponding to each first video based on the predicted request amount and the second videos cached by each first edge node in the first edge node set.
[0059] The second video may refer to a video currently cached in the first edge node. There may be multiple second videos. The number of copies may refer to the number of copies of the same video. Each copy of the video is cached on an edge node, and the number of copies is equal to the number of edge nodes currently requiring the cache of the video. In the case of periodic push, the number of copies may refer to the incremental number of copies that need to be pushed during the current push cycle, compared to previously pushed video copies.
[0060] Specifically, for each first video, the second video cached by 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, that is, the number of copies of the first video that have been pushed. The predicted request volume for the first video during the peak request period can be used as the number of pushed copies corresponding to the first video, that is, the total number of copies required in the edge node network. The difference obtained by subtracting the number of pushed copies from the number of first edge nodes is determined as the number of copies corresponding to the first video.
[0061] S140: Determine a second edge node set and a cache replacement space corresponding to each second edge node based on the cache occupied space and the number of copies corresponding to each first video, and the current bandwidth utilization and node cache space corresponding to each first edge node.
[0062] Among them, the cache occupied space corresponding to the first video may refer to the file size of the first video. The current bandwidth utilization may be the bandwidth utilization determined based on the current most recent historical request data. For example, the current bandwidth utilization may refer to the bandwidth utilization of the first edge node in the last push cycle. The node cache space may refer to the total storage space size of the first edge node. The current bandwidth utilization and the 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 second edge node set 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 a replaceable cache space so that the newly pushed first video can be cached after the cache space is cleared.
[0063] Specifically, the total cache occupied space can be determined based on the cache occupied space and the number of copies corresponding to each first video. Based on the current bandwidth utilization corresponding to each first edge node, a second edge node that can cache the first video is screened out from all first edge nodes. Based on the current bandwidth utilization and node cache space corresponding to each second edge node, the total cache occupied space is dynamically allocated to determine the cache replacement space corresponding to 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 that can be allocated to improve bandwidth utilization and avoid excessive load.
[0064] S150: Determine a third edge node to which each first video is to be pushed based on the first video representation vector, cache occupied 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 cached by each second edge node.
[0065] The first video representation vector may 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 may be an information vector used to represent the second video. The first video representation vector and the second video representation vector may 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 each copy of the video can be pushed to a third edge node.
[0066] Specifically, based on the first video representation vector corresponding to each first video and the second video representation vector corresponding to the second video cached by each second edge node, it can be used to measure the popularity trend between each two first videos or the popularity trend between each first video and the second video cached by each second edge node. For example, two videos with smaller distances between their video representation vectors have similar popularity trends. Videos with similar popularity trends need to be stored on different edge nodes respectively, so as to effectively avoid excessive load on the edge nodes in a short period of time, thereby ensuring load balancing. Based on the video similarity, the cache replacement space corresponding to each second edge node, and the cache occupied space and the number of copies corresponding to each first video, the first videos and the second edge nodes are reasonably matched, and the third edge node to which each first video is to be pushed is determined, so that load balancing of the edge nodes can be achieved.
[0067] S160: Based on the number of copies corresponding to each first video and the third edge node, copy and push each first video during a non-request peak period.
[0068] 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 the first video, and each first video copy can be pushed to a corresponding third edge node during non-peak request periods, thereby completing video push and ensuring load balancing of edge nodes, thereby improving bandwidth utilization. For example, during periodic push, at the end of the current push cycle, an incremental copy of each first video is pushed based on the number of copies corresponding to each first video and the third edge node.
[0069] The technical solution of the disclosed embodiments predicts each first video in a set of first videos to be pushed, and determines a predicted request volume for each first video during a peak request period. The number of copies corresponding to each first video is determined based on the predicted request volume and the second videos cached by each first edge node in the set of first edge nodes. The cache replacement space corresponding to each first video and the current bandwidth utilization and node cache space of each first edge node is determined. The third edge node to which each first video is to be pushed is determined based on the first video representation vector, cache usage, and number of copies corresponding to each first video, and the second video representation vector and cache replacement space corresponding to the second videos cached by each second edge node. Furthermore, each first video copy is pushed to the corresponding third edge node during a non-peak request period based on the number of copies corresponding to each first video. This allows for reasonable matching of videos to be pushed and edge nodes by considering differences in edge node cache performance, avoiding situations where stronger edge nodes fail to fully utilize their capabilities and weaker edge nodes are overloaded. This achieves load balancing among edge nodes, effectively ensuring video acquisition efficiency and improving user experience.
[0070] Based on the above technical solution, S130 may include: for each first video, based on the second video cached by each first edge node in the first edge node set, determining the number of first edge nodes that have cached the first video; based on the predicted request amount corresponding to the first video and the preset number of parallel request nodes, determining the number of pushed copies corresponding to the first video; based on the number of pushed copies and the number of first edge nodes, determining the number of copy copies corresponding to the first video.
[0071] The preset number of parallel request nodes, n, can be set in advance based on business needs. Each user request requires at least the number of parallel connected edge nodes to ensure that each user request can be responded to by at least n edge nodes. The number of pushed copies can refer to the total number of edge nodes in the edge node network that need to cache the same video, that is, the total number of pushed copies of the same video.
[0072] Specifically, for each first video, the second video cached by each first edge node in the first edge node set can be compared with the first video to determine whether the first video has been cached in each first edge node, and the number of first edge nodes that have currently cached the first video can be counted. The predicted request amount of the first video during the peak request period can be multiplied by the preset number of parallel request nodes, and the multiplication result obtained is used as the number of pushed copies corresponding to the first video. The difference obtained by subtracting the number of first edge nodes from the number of pushed copies is determined as the number of copies corresponding to the first video. By using the preset number of parallel request nodes, the number of copies that need to be pushed for each first video can be obtained more accurately, further improving the video push effect.
[0073] Based on the above technical solution, S140 may include: determining the total cache occupied space corresponding to the first video set based on the cache occupied space and the number of copy copies corresponding to each first video; detecting whether the current bandwidth utilization corresponding to each first edge node is less than the preset bandwidth utilization threshold, and taking the first edge node less than the preset bandwidth utilization threshold as the second edge node to obtain the second edge node set; determining the bandwidth utilization difference between the current bandwidth utilization corresponding to each second edge node and the preset bandwidth utilization threshold; determining 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.
[0074] Specifically, the total cache space occupied by each first video can be multiplied by the number of copies. The total cache space occupied by all first videos can be added together to obtain the total cache space occupied by 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 highly loaded and no new videos need to be deployed. If the current bandwidth utilization is less than the preset bandwidth utilization threshold, the first edge node is under low load and new videos need to be deployed to improve bandwidth utilization. First edge nodes with bandwidth utilization less than the preset bandwidth utilization threshold are designated as second edge nodes, thereby obtaining a second set of edge nodes capable of deploying new videos. The current bandwidth utilization of each second edge node is subtracted from the preset bandwidth utilization threshold to obtain a bandwidth utilization difference. Based on the bandwidth utilization difference and node cache space corresponding to each second edge node, the total cache space is allocated to determine the cache replacement space corresponding to each second edge node. For example, the larger the bandwidth utilization difference or the node cache space, the larger the cache replacement space that can be allocated to improve bandwidth utilization and avoid excessive load.
[0075] 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 occupied space corresponding to the first video set, so that each pushed video copy can be cached in the second edge node set.
[0076] For example, determining 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 may 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 corresponding to each second edge node; adding the maximum cache replacement spaces corresponding to all second edge nodes to obtain the total cache replacement space, and dividing 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; and multiplying the cache replacement ratio corresponding to each second edge node by the total cache occupied space to obtain the cache replacement space corresponding to each second edge node. By distributing the total cache occupied space according to the cache replacement ratio, the life cycle of videos cached on different cache nodes can be evenly increased.
[0077] Based on the above technical solution, S150 may include: clustering and grouping 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 cached by each second edge node; 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 and cache replacement space corresponding to each second edge node, and the cache occupied space and number of copies corresponding to each first video.
[0078] The central video representation vector can be used to represent the overall information of the first video group, and the average video representation vector can be used to represent the overall information of all second videos cached by each second edge node.
[0079] Specifically, based on the first video representation vector corresponding to each first video, the first video set is clustered and grouped, 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 second videos cached by each second edge node are averaged to obtain the average video representation vector corresponding to each second edge node. Based on the center representation vector corresponding to each first video group and the average video representation vector corresponding to each second edge node, the similarity between each first video and the second video cached by the second edge node can be measured, and based on the similarity, the cache replacement space corresponding to each second edge node, and the cache occupied space and the number of copies corresponding to each first video, the first video is matched to the second edge node that is the least similar and has sufficient cache replacement space to store the first video, and these second edge nodes are used as the third edge nodes to which the first video is to be pushed, thereby achieving load balancing of the edge nodes.
[0080] Figure 2 is a flow chart of a video push method provided by an embodiment of the present disclosure. Based on the aforementioned disclosed embodiments, this disclosed embodiment further optimizes the step of "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 and cache replacement space corresponding to each second edge node, and the cache occupied space and number of copies corresponding to each first video." Explanations of terms that are identical or corresponding to those in the aforementioned disclosed embodiments are omitted here.
[0081] As shown in FIG2 , the video push method specifically includes the following steps:
[0082] S210: Obtain a first video set to be pushed and a first edge node set corresponding to the first video set.
[0083] S220: Predict each first video in the first video set, and determine a predicted request volume for each first video during a request peak period.
[0084] S230: Determine the number of copies corresponding to each first video based on the predicted request amount and the second videos cached by each first edge node in the first edge node set.
[0085] S240: Determine a second edge node set and a cache replacement space corresponding to each second edge node based on the cache occupied space and the number of copies corresponding to each first video, and the current bandwidth utilization and node cache space corresponding to each first edge node.
[0086] S250: Cluster and group 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.
[0087] Specifically, based on the first video representation vector corresponding to each first video, the first video set can be clustered and grouped, such as by 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.
[0088] S260: Determine an average video representation vector corresponding to each second edge node based on the second video representation vector corresponding to the second video cached by each second edge node.
[0089] Specifically, the second video representation vectors corresponding to all second videos cached by each second edge node may be averaged to obtain an average video representation vector corresponding to each second edge node.
[0090] S270: Based on the central representation vector corresponding to each first video group, obtain a current central representation vector corresponding to the current first video group in which the current first video is located.
[0091] Each first video to be pushed can be used as a current first video, and steps S270-S290 can be performed to determine the third edge node to which each first video is to be pushed. The current first video group can refer to the first video group in which the current first video is located. The current center representation vector refers to the center video representation vector corresponding to the current first video group.
[0092] S280: Determine the vector distance between the current central representation vector and the average video representation vector corresponding to each second edge node, and arrange the second edge nodes in descending order based on the vector distance to obtain a second edge node sequence.
[0093] The vector distance can be used to represent the popularity similarity between the current first video and the second video cached by 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 by the second edge node.
[0094] 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 based on the cosine method. Based on the vector distance, the second edge nodes are arranged in descending order to obtain a second edge node sequence with gradually decreasing vector distances. The popularity similarity between the cached second video in the second edge node in the second edge node sequence and the current first video gradually increases, that is, 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 ensure the maximization of the popularity difference and avoid videos of the same popularity being cached on the same edge node, thereby ensuring load balancing of user requests.
[0095] S290: Determine a 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 occupied space corresponding to the current first video, and the current number of copies.
[0096] Specifically, based on the order of the second edge node sequence, second edge nodes with the current number of copies can be selected in sequence, and the cache replacement space corresponding to the selected second edge nodes is larger than the current cache occupied space corresponding to the current first video, to ensure that the selected second edge nodes have sufficient space to cache the current first video. All selected second edge nodes are used as third edge nodes to which the current first video is to be pushed, thereby achieving load balancing of the edge nodes.
[0097] S291: Based on the number of copies corresponding to each first video and the third edge node, push a copy of each first video during a non-request peak period.
[0098] The technical solution of the embodiment of the present disclosure arranges the second edge nodes in descending order based on the vector distance between the current central representation vector and the average video representation vector corresponding to each second edge node to obtain a second edge node sequence, and selects the second edge node with the current number of copies based on the order of the second edge node sequence, and the cache replacement space corresponding to the selected second edge node is larger than the current cache occupied space, thereby achieving reasonable matching between the second edge node and the first video and ensuring load balancing of the edge nodes.
[0099] Based on the above technical solution, S290 may include: determining a target selection number greater than the current copy number based on the current copy number corresponding to the current first video; selecting the target selection number of target second edge nodes 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; determining the third edge node to which the current first video is to be pushed based on the current copy number, the maximum upload bandwidth corresponding to each target second edge node, and the node cache space.
[0100] The maximum upload bandwidth can be used to characterize the upload bandwidth bottleneck of an edge node. The maximum upload bandwidth 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 replicas.
[0101] Specifically, the current number of copies corresponding to the current first video can be multiplied by a preset amplification factor to obtain 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 selection number of target second edge nodes can be selected in sequence, and the cache replacement space corresponding to the selected second edge nodes is greater than the current cache occupied 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 comprehensive performance, the current number of copies, 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 re-screening based on the maximum upload bandwidth and node cache space, it is possible to further avoid the situation where the capabilities of some edge nodes with stronger performance are not fully utilized and the edge nodes with weaker performance are overloaded, thereby achieving load balancing.
[0102] Exemplarily, 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; arranging the target second edge nodes in descending order based on the unit space upload bandwidth to obtain a target second edge node sequence, and determining the third edge node to which the current first video is to be pushed based on the target second edge node sequence and the current number of copies.
[0103] 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 corresponding to each target second edge node. The larger the unit space upload bandwidth, the higher the 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 gradually decreasing unit space upload bandwidth. The target second edge nodes with the number of previous copies in the target second edge node sequence are used as the third edge nodes to which the current first video is to be pushed, thereby obtaining the third edge node with the strongest comprehensive performance for video push, further ensuring the load balancing of the edge nodes.
[0104] Figure 3 is a flowchart of a video push method provided by an embodiment of the present disclosure. Based on the aforementioned disclosed embodiments, this disclosed embodiment optimizes the step of "obtaining a set of first videos to be pushed and a set of first edge nodes corresponding to the first video set." Furthermore, the step of "predicting each first video in the first video set and determining a predicted request volume for each first video during a peak request period" is also optimized. Explanations of terms that are identical or corresponding to those in the aforementioned disclosed embodiments are not repeated here.
[0105] As shown in FIG3 , the video push method specifically includes the following steps:
[0106] S310: Obtain a set of historical videos requested in the current area.
[0107] Different user requests for the same video have different geographical distributions, and different edge nodes also have different geographical distributions. This allows the entire geographic area to be divided into multiple regions, with independent popularity prediction and video push performed for each region. This reduces the number of cross-regional requests and further ensures video acquisition efficiency. For example, the country can be divided into six regions: North China, East China, Northeast China, South China, Northwest China, and Southwest China. Each region can be used as the current region, and popularity prediction and video push can be performed for each region by executing steps S310-S392.
[0108] Specifically, a set of historical videos requested in the current region during the current historical period can be obtained. For example, when periodically pushing, the set of historical videos requested in the current historical period can be obtained, and the set of historical videos in the current region can be determined based on the user's geographic location for each request for each historical video.
[0109] S320: Determine a first video set to be pushed in the current area based on a historical request volume corresponding to each historical video in the historical video set and a preset request volume threshold.
[0110] Specifically, the historical request volume corresponding to each historical video in the current historical period can be compared with a preset request volume threshold, and the historical videos in the current area that are greater than or equal to the preset request volume threshold are used as the first videos to be pushed to obtain a first video set.
[0111] S330: Combine edge nodes located in the current area to obtain a first edge node set corresponding to the first video set.
[0112] Specifically, based on the deployment address location of each edge node in the edge node network, each edge node located in the current area is used as the first edge node to obtain a first edge node set, so that a copy of the first video set can be pushed to the first edge node set located in the same area, thereby realizing regional granularity popularity prediction and resource allocation, and further ensuring load balancing of edge nodes in each area.
[0113] S340: Obtain video content data and historical request data corresponding to each first video in the first video set.
[0114] Video content data may include, but is not limited to, video bitrate, video size, encoding method, video resolution, video content category, video length, video release time, and video publisher information. Historical request data may include the number of user requests from the current region over a recent period. For example, historical request data for the past 24 hours can be obtained at a granularity of one hour.
[0115] S350: Determine the current prediction network model corresponding to the current area.
[0116] Specifically, a prediction network model can be pre-trained based on sample request data corresponding to a region, thereby establishing a corresponding relationship between the region and the prediction network model. The prediction network model can be used to predict the number of video requests within the region during peak request periods. For example, the prediction network model can be, but is not limited to, an XGBoost (eXtreme Gradient Boosting) model. In actual use, based on the corresponding relationship between the region and the prediction network model, the current prediction network model corresponding to the current region can be directly obtained.
[0117] It's important to note that current popularity prediction methods perform global predictions. However, in reality, not all video requests are evenly distributed across regions. On the contrary, most video requests exhibit a regional skew, meaning that the majority of users requesting the same video are concentrated in a few regions. Therefore, to improve the accuracy of popularity predictions, we need to perform popularity prediction and model training on a regional basis, rather than globally.
[0118] Exemplarily, S350 may include: determining a target time window corresponding to the current prediction moment, wherein a plurality of time windows are divided into a first preset duration as a granularity within a non-request peak period; and determining a current prediction network model corresponding to the current area under the target time window based on a correspondence between the area under each time window and the prediction network model.
[0119] Specifically, the number of prediction network models is not only related to the number of regions, but also to the interval between the prediction moment and the request peak period. Because at different moments in the non-request peak period, the underlying quantitative relationship between the input training data and the peak popularity is different, it is necessary to train the prediction network model separately for different prediction moments to ensure the accuracy of popularity prediction. For example, the non-request peak period is divided into multiple time windows with a first preset time length (such as 1 hour) as the granularity, that is, it is necessary to train a prediction network model for each time window in the non-request peak period, and in addition, it is necessary to train an independent prediction network model for each region, so the number of prediction network models that need to be trained is the product of the number of time windows and the number of regions.
[0120] The training process of each prediction network model is as follows: obtain the sample request data corresponding to each area in each time window, input the sample request data into the prediction network model to be trained, and obtain the output predicted request volume during the request peak period, such as Among them, the set of classification and regression decision trees F={f(x)=w q(x)}(q:R m →{1,2,…,T},w∈R T ), q is the tree structure of sample mapping to leaf nodes, T is the number of leaf nodes, and w is the real number score of leaf nodes. The objective function of training the prediction network model can be divided into the error function term L and the model complexity function term Ω, which can be expressed as Obj = L + Ω, where γT in Ω is the L1 regularization term, is the L2 regularization term. The model parameters are adjusted by minimizing the objective function to obtain the prediction network model after training.
[0121] In actual use, the target time window for the current prediction moment can be determined. Based on the pre-obtained correspondences between regions and prediction network models for each time window, the target correspondence between the regions within the target time window and the prediction network model can be determined. Based on the target correspondences between regions and prediction network models, the current prediction network model corresponding to the current region is obtained. By taking into account differences in prediction moments, the accuracy of popularity prediction can be further improved.
[0122] S360: Input the video content data and historical request data into the current prediction network model corresponding to the current area for prediction.
[0123] Specifically, for each first video, the historical request data and video content data corresponding to the first video that do not require encoding, such as video ID, video length, video likes, bit rate, and other purely digital or encoded data, can be directly input into the current prediction network model. Data in the video content data that requires encoding, such as encoding method, resolution, video type, and other non-digital data, can be one-hot encoded before being input into the current prediction network model.
[0124] S370: Determine the predicted request volume of each first video within the request peak period based on the output of the current prediction network model.
[0125] Specifically, the current prediction network model can perform popularity prediction on the input video content data and historical request data, obtaining and outputting the predicted request volume for the first video during the peak request period. This allows the output of the current prediction network model to obtain the predicted request volume for each first video during the peak request period. By performing popularity prediction at the regional granularity, the accuracy of popularity predictions for each region can be improved, further enhancing the accuracy of video push notifications.
[0126] S380: Determine the number of copies corresponding to each first video based on the predicted request amount and the second videos cached by each first edge node in the first edge node set.
[0127] S390: Determine a second edge node set and a cache replacement space corresponding to each second edge node based on the cache occupied space and the number of copies corresponding to each first video, and the current bandwidth utilization and node cache space corresponding to each first edge node.
[0128] S391. Determine a third edge node to which each first video is to be pushed based on the first video representation vector, cache occupied 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 cached by each second edge node.
[0129] S392: Based on the number of copies corresponding to each first video and the third edge node, copy and push each first video during a non-request peak period.
[0130] The technical solution of the disclosed embodiments improves the accuracy of popularity predictions for each region by performing popularity predictions at a regional granularity, further improving the accuracy of video push notifications. By pushing copies of the first video set to the first set of edge nodes located in the same region, regional resource allocation is achieved, further ensuring load balancing among edge nodes in each region.
[0131] FIG4 is a flow chart of a video push method provided by an embodiment of the present disclosure. Based on the aforementioned disclosed embodiments, this disclosed embodiment further describes the process of determining a first video representation vector corresponding to each first video. Explanations of terms that are identical or corresponding to those in the aforementioned disclosed embodiments are omitted here.
[0132] As shown in FIG4 , the video push method specifically includes the following steps:
[0133] S410: Obtain a first video set to be pushed and a first edge node set corresponding to the first video set.
[0134] S420: Predict each first video in the first video set, and determine a predicted request volume for each first video during a request peak period.
[0135] S430: Determine the number of copies corresponding to each first video based on the predicted request amount and the second videos cached by each first edge node in the first edge node set.
[0136] S440: Determine a second edge node set and a cache replacement space corresponding to each second edge node based on the cache occupied space and the number of copies corresponding to each first video, and the current bandwidth utilization and node cache space corresponding to each first edge node.
[0137] S450: Obtain a first representation vector library, where the first representation vector library includes: a third video representation vector corresponding to each third video.
[0138] The third video may be a video that was requested within the most recent first historical period. For example, the third video may be a video requested by a user within the past week. The third video representation vector may be obtained by embedding the video content data corresponding to each third video into a knowledge graph.
[0139] Specifically, all third videos requested within the most recent first historical period can be pre-obtained, and a knowledge graph can be constructed based on the video content data corresponding to each third video. A knowledge graph is a heterogeneous graph in which nodes represent entities and edges represent relationships between entities. This can provide rich contextual information for representation learning in content enhancement models. By mapping the video content data of a video into a knowledge graph, universal and compact contextual information can be obtained. For example, Figure 5 shows an example of a knowledge graph. As shown in Figure 5, the knowledge graph can be constructed using six content features: author ID, video ID, video category, video length, resolution, and release time. In the knowledge graph, each edge is represented as a triple (head entity, relationship, tail entity), indicating a specific relationship between the head entity and the tail entity. For example, (FID-1, Author, Alice) indicates that Alice is the author of FID-1. Knowledge graph embedding learning can map entities and relationships into low-dimensional representation vectors, encoding the graph structure and semantic information in these low-dimensional representation vectors. This allows the third video representation vector corresponding to each third video to be obtained, thereby constructing a first representation vector library.
[0140] For example, in order to accurately learn the video representation vector, the TransR model can be used to model entities and relationships in independent spaces respectively, and the entities are projected from the entity space to the relationship space through the projection matrix to train the video representation vector. For example, first obtain the video content data of all the third videos requested in the past week, and then input them into the TransR model for training to obtain each third video representation vector, and store them in the first representation vector library, such as KG_library. It should be noted that the distance between the two representation vectors is inversely proportional to the popularity similarity of the two videos. The stronger the similarity, the more similar the popularity trend, that is, the two videos should be stored separately in different edge nodes.
[0141] S460: Obtain a first video representation vector corresponding to each first video from a first representation vector library.
[0142] Specifically, the first video representation vector corresponding to each first video may be obtained from a pre-built first representation vector library KG_library.
[0143] Exemplarily, S460 may include: if the first video representation vector corresponding to the target first video does not exist in the first representation vector library, obtaining a second representation vector library; and 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.
[0144] The target first video may refer to a first video for which no representation vector exists in the first representation vector library. The second representation vector library may include: a fourth video representation vector corresponding to each fourth video. The fourth video may refer to a video for which there was a request within the most recent second historical period, and the historical request volume is greater than a preset request volume threshold. The second historical period is less than the first historical period. For example, the fourth video may refer to a video requested by a user within the last four hours. The fourth video representation vector may be obtained by embedding learning based on collaborative filtering of the fourth video requested by each user.
[0145] Specifically, new videos are created during the periodic push process. These new videos do not have corresponding vectors in the first representation vector library, necessitating real-time updates to obtain the new video representation vectors. However, this real-time update approach is extremely expensive. To address this, collaborative filtering embedding learning can be introduced to capture the implicit relationships between videos from users' collaborative request behaviors. This allows for the construction of a second representation vector library based on collaborative filtering, such as CF_library, to supplement the missing representation vectors for new videos in the first representation vector library KG_library, significantly reducing the update cost.
[0146] For example, the construction process of the second representation vector library CF_library is as follows: first, based on user collaborative features, the videos requested by different users in the most recent second historical period are divided into independent video sets. Videos in the same set are more closely related because they are accessed by the same user. However, in all sets, videos with a historical request volume less than or equal to a preset request volume threshold are filtered out, 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 vectors of each fourth video and store them in the second representation vector library, thereby constructing the second representation vector library CF_library.
[0147] Exemplarily, 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 the fifth video that exists simultaneously in the first representation vector library and the second representation vector library; obtaining the selected 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 selected 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.
[0148] Specifically, determine the fifth video that exists simultaneously in the first representation vector library KG_library and the second representation vector library CF_library. The representation vector corresponding to the target first video f obtained from the second representation vector library is used as the corresponding to-be-selected 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 to-be-selected 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′, thereby obtaining the sixth video f′ 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, so that the second representation vector library can be used to supplement the missing video representation vectors in the first representation vector library.
[0149] S470: Determine a third edge node to which each first video is to be pushed based on the first video representation vector, cache occupied 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 cached by each second edge node.
[0150] S480: Based on the number of copies corresponding to each first video and the third edge node, push a copy of each first video during a non-request peak period.
[0151] The technical solution of the embodiment of the present disclosure can more accurately represent video vectors and further improve the video push effect by utilizing the video content data corresponding to the third video requested in the most recent first historical period to perform knowledge graph embedding learning.
[0152] Based on the above technical solution, S460 may include: detecting whether each first video is included in the first representation vector library, 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.
[0153] Specifically, it is possible to detect whether each first video is included in the first representation vector library, and determine the ratio of the number of first videos included in the first representation vector library to the total number of first videos as the first video hit rate. If the first video hit rate is less than the preset hit rate threshold, it indicates that there are more videos without corresponding representation vectors, and the first representation vector library needs to be updated. At this time, all the third videos that have been requested in the most recent first historical period can be used for embedding learning of the knowledge graph, and the entire knowledge graph can be retrained to obtain an updated first representation vector library, and the first video representation vector corresponding to each first video can be obtained in the updated first representation vector library. If the first video hit rate is greater than or equal to the preset hit rate threshold, collaborative filtering can be used to obtain the second representation vector library, and based on the second representation vector library, the missing video representation vectors in the first representation vector library can be supplemented. The specific supplementation process can be found in the above description 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 vector.
[0154] Figure 6 is a structural schematic diagram of a video push device provided by an embodiment of the present disclosure. As shown in Figure 6, the device specifically includes: a set acquisition module 610, a predicted request quantity 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.
[0155] Among them, the set acquisition module 610 is used to obtain the first video set to be pushed and the first edge node set corresponding to the first video set; the predicted request amount determination module 620 is used to predict each first video in the first video set and determine the predicted request amount of each first video during the request peak period; the copy number determination module 630 is used to determine the number of copy copies corresponding to each first video based on the predicted request amount and the second video cached by each first edge node in the first edge node set; the cache replacement space determination module 640 is used to determine the number of copy copies corresponding to each first video based on the cache occupied space corresponding to each first video and the number of copy copies, as well as the number of copies of each first video. The current bandwidth utilization and node cache space corresponding to an edge node are used to determine the second edge node set 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 characterization vector corresponding to each first video, the cache occupied space and the number of copies, and the second video characterization vector and the cache replacement space corresponding to the second video cached by each second edge node; the first video pushing module 660 is used to copy and push each first video during a non-request peak period based on the number of copies corresponding to each first video and the third edge node.
[0156] The technical solution provided by the embodiments of the present disclosure predicts each first video in a set of first videos to be pushed, and determines a predicted request volume for each first video during a peak request period. The solution also determines 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 set of first edge nodes. The solution also determines the cache replacement space corresponding to the set of second edge nodes and each second edge node based on the cache occupied space and 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. The solution also determines the third edge node to which each first video is to be pushed based on the first video representation vector, cache occupied space, and number of copies corresponding to each first video, and the second video representation vector and cache replacement space corresponding to the second videos cached by each second edge node. Furthermore, the solution pushes each first video copy to the corresponding third edge node during a non-peak request period based on the number of copies corresponding to each first video. This solution, by taking into account differences in edge node cache performance, reasonably matches videos to be pushed with edge nodes, avoiding situations where stronger edge nodes fail to fully utilize their capabilities and weaker edge nodes are overloaded. This solution achieves load balancing among edge nodes, effectively ensuring video acquisition efficiency and improving user experience.
[0157] Based on the above technical solution, the set acquisition module 610 is specifically configured to:
[0158] Obtain a set of historical videos that have been requested in the current area; determine a first set of videos to be pushed in the current area based on the historical request volume corresponding to each historical video in the historical video set and a preset request volume threshold; combine each edge node located in the current area to obtain a first edge node set corresponding to the first video set.
[0159] Based on the above technical solutions, the predicted request volume determination module 620 includes:
[0160] a data acquisition unit, configured to acquire video content data and historical request data corresponding to each first video in the first video set;
[0161] A current prediction network model determining unit, configured to determine a current prediction network model corresponding to a current region;
[0162] A data input unit, configured to input the video content data and the historical request data into a current prediction network model corresponding to a current region for prediction;
[0163] The predicted request amount determining unit is used to determine the predicted request amount of each first video within the request peak period based on the output of the current prediction network model.
[0164] Based on the above technical solutions, the current prediction network model determination unit is specifically used to:
[0165] Determine a target time window corresponding to the current prediction moment, wherein a plurality of time windows are divided into a first preset time length as a granularity within a non-request peak period; and determine a current prediction network model corresponding to the current area under the target time window based on a correspondence between the area under each time window and the prediction network model.
[0166] Based on the above technical solutions, the copy number determination module 630 is specifically configured to:
[0167] For each first video, based on the second video cached by each first edge node in the first edge node set, the number of first edge nodes that have cached the first video is determined; based on the predicted request amount corresponding to the first video and the preset number of parallel request nodes, the number of pushed copies corresponding to the first video is determined; based on the number of pushed copies and the number of the first edge nodes, the number of copy copies corresponding to the first video is determined.
[0168] Based on the above technical solutions, the cache replacement space determination module 640 includes:
[0169] a total cache occupied space determining unit, configured to determine a total cache occupied space corresponding to the first video set based on the cache occupied space corresponding to each first video and the number of copies;
[0170] A second edge node determination unit is configured to detect whether a current bandwidth utilization corresponding to each first edge node is less than a preset bandwidth utilization threshold, and to use the first edge node whose bandwidth utilization is less than the preset bandwidth utilization threshold as a second edge node to obtain a second edge node set;
[0171] a bandwidth utilization difference determination unit, configured to determine a bandwidth utilization difference between a current bandwidth utilization corresponding to each second edge node and a preset bandwidth utilization threshold;
[0172] The cache replacement space determining unit is configured 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.
[0173] Based on the above technical solutions, the cache replacement space determination unit is specifically configured to:
[0174] Multiply the node cache space corresponding to each second edge node and 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, 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 occupied space to obtain the cache replacement space corresponding to each second edge node.
[0175] Based on the above technical solutions, the third edge node determination module 650 includes:
[0176] a clustering and grouping unit, configured to cluster and group the first video set based on the first video representation vector corresponding to each first video, to obtain a plurality of first video groups and a central video representation vector corresponding to each first video group;
[0177] an average video representation vector determining unit, configured to determine an average video representation vector corresponding to each second edge node based on the second video representation vector corresponding to the second video cached by each second edge node;
[0178] 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 central representation vector corresponding to each first video group, the average video representation vector corresponding to each second edge node and the cache replacement space, and the cache occupied space and the number of copy copies corresponding to each first video.
[0179] Based on the above technical solutions, the third edge node determination unit includes:
[0180] a current central representation vector acquisition subunit, configured to acquire, based on the central representation vector corresponding to each first video group, a current central representation vector corresponding to the current first video group in which the current first video is located;
[0181] a second edge node arrangement subunit, configured to determine a vector distance between the current center representation vector and an average video representation vector corresponding to each second edge node, and arrange the second edge nodes in descending order based on the vector distance to obtain a second edge node sequence;
[0182] 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 occupied space corresponding to the current first video, and the current number of copy copies.
[0183] Based on the above technical solutions, the third edge node determines a subunit, including:
[0184] A target selection quantity determination submodule, configured to determine a target selection quantity that is greater than the current number of copies based on the current number of copies corresponding to the current first video;
[0185] a target second edge node selection submodule, configured to sequentially select the target selection number of target second edge nodes based on the order of the second edge node sequence, wherein the cache replacement space corresponding to the target second edge node is larger than the current cache occupied space corresponding to the current first video;
[0186] The third edge node determination submodule is used to determine 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.
[0187] Based on the above technical solutions, the third edge node determines a submodule, which is specifically used to:
[0188] 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 arranged 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 copies, the third edge node to which the current first video is to be pushed is determined.
[0189] On the basis of the above technical solutions, the device also includes:
[0190] A first representation vector library acquisition module is configured to acquire a first representation vector library, the first representation vector library comprising: a third video representation vector corresponding to each third video, wherein the third video is a video requested within a recent first historical period; the third video representation vector is obtained by embedding learning of a knowledge graph based on video content data corresponding to each third video;
[0191] The first video representation vector determining module is configured to obtain a first video representation vector corresponding to each first video from the first representation vector library.
[0192] Based on the above technical solutions, the first video representation vector determination module includes:
[0193] A second representation vector library acquisition unit is configured to acquire a second representation vector library if the first video representation vector corresponding to the target first video does not exist in the first representation vector library, wherein the second representation vector library includes: a fourth video representation vector corresponding to each fourth video, wherein the fourth video is a video that has been requested within a recent second historical period and whose historical request volume is greater than a preset request volume threshold; the second historical period is less than the first historical period; and the fourth video representation vector is obtained by performing collaborative filtering embedding learning based on the fourth video requested by each user;
[0194] The first video representation vector determining unit is configured to determine a first video representation vector corresponding to the target first video based on the first representation vector library and the second representation vector library.
[0195] Based on the above technical solutions, the first video representation vector determination unit is specifically configured to:
[0196] Determine the fifth video that exists simultaneously in the first characterization vector library and the second characterization vector library; obtain the selected video characterization vector corresponding to the target first video and the fifth video characterization vector corresponding to each fifth video from the second characterization vector library; based on the selected video characterization vector and the fifth video characterization vector, determine the distance between the target first video and each fifth video, and determine the fifth video with the smallest distance as the sixth video; obtain the sixth video characterization vector corresponding to the sixth video from the first characterization vector library, and determine the sixth video characterization vector as the first video characterization vector corresponding to the target first video.
[0197] Based on the above technical solutions, the first video representation vector determination module is specifically configured to:
[0198] Detect whether each first video is included in the first characterization vector library and determine the first video hit rate; if the first video hit rate is less than a preset hit rate threshold, update the first characterization vector library and obtain the first video characterization vector corresponding to each first video from the updated first characterization vector library; if the first video hit rate is greater than or equal to the preset hit rate threshold, determine the first video characterization vector corresponding to each first video based on the first characterization vector library and the second characterization vector library.
[0199] The video push device provided in the embodiments of the present disclosure can execute the video push method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0200] 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-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0201] FIG7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG7 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG7 ) 500 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG7 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0202] As shown in FIG7 , the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0203] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 7 shows the electronic device 500 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0204] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0205] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0206] The electronic device provided by the embodiment of the present disclosure and the video push method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0207] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the video push method provided in the above embodiment is implemented.
[0208] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0209] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0210] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0211] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a first video set to be pushed and a first edge node set corresponding to the first video set; predicts each first video in the first video set and determines the predicted request amount of each first video during the request peak period; determines the number of copies corresponding to each first video based on the predicted request amount and the second videos cached by each first edge node in the first edge node set; determines the second edge node set and the cache replacement space corresponding to each second edge node based on the cache occupied space and the number of copies corresponding to each first video, and the current bandwidth utilization and node cache space corresponding to each first edge node; determines the third edge node to be pushed to each first video based on the first video representation vector corresponding to each first video, the cache occupied space and the number of copies, and the second video representation vector and the cache replacement space corresponding to the second video cached by each second edge node; and copies and pushes each first video during the non-request peak period based on the number of copies corresponding to each first video and the third edge node.
[0212] Computer program code for performing the operations of the present disclosure may 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, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0213] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0214] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0215] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0216] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0217] According to one or more embodiments of the present disclosure, [Example 1] provides a video push method, including:
[0218] Obtaining a first video set to be pushed and a first edge node set corresponding to the first video set;
[0219] Predicting each first video in the first video set, and determining a predicted request amount for each first video during a peak request period;
[0220] Determining a number of copies corresponding to each first video based on the predicted request amount and the second video cached by each first edge node in the first edge node set;
[0221] Determine a second edge node set and a cache replacement space corresponding to each second edge node based on the cache occupied space and the number of copies corresponding to each first video, and the current bandwidth utilization and node cache space corresponding to each first edge node;
[0222] Determining a third edge node to which each first video is to be pushed based on a first video representation vector corresponding to each first video, the cache occupied space, and the number of copies, and a second video representation vector corresponding to a second video cached by each second edge node and the cache replacement space;
[0223] Based on the number of copies corresponding to each first video and the third edge node, a copy of each first video is pushed during a non-request peak period.
[0224] According to one or more embodiments of the present disclosure, [Example 2] provides a video push method, further comprising:
[0225] Optionally, obtaining the first video set to be pushed and the first edge node set corresponding to the first video set includes:
[0226] Get the requested historical video collection in the current region;
[0227] Determining a first video set to be pushed in the current area based on a historical request volume corresponding to each historical video in the historical video set and a preset request volume threshold;
[0228] Each edge node located in the current area is combined to obtain a first edge node set corresponding to the first video set.
[0229] According to one or more embodiments of the present disclosure, [Example 3] provides a video push method, further comprising:
[0230] Optionally, predicting each first video in the first video set to determine a predicted request volume of each first video during a peak request period includes:
[0231] Obtaining video content data and historical request data corresponding to each first video in the first video set;
[0232] Determine the current prediction network model corresponding to the current area;
[0233] Inputting the video content data and the historical request data into a current prediction network model corresponding to the current region for prediction;
[0234] Based on the output of the current prediction network model, a predicted request volume of each first video within a request peak period is determined.
[0235] According to one or more embodiments of the present disclosure, [Example 4] provides a video push method, further comprising:
[0236] Optionally, determining a current prediction network model corresponding to the current area includes:
[0237] Determine a target time window corresponding to the current prediction moment, wherein the non-request peak period is divided into multiple time windows with a first preset duration as a granularity;
[0238] Based on the correspondence between the regions in each time window and the prediction network model, a current prediction network model corresponding to the current region in the target time window is determined.
[0239] According to one or more embodiments of the present disclosure, [Example 5] provides a video push method, further comprising:
[0240] Optionally, determining the number of copies corresponding to each first video based on the predicted request amount and the second videos cached by each first edge node in the first edge node set includes:
[0241] For each first video, based on the second video cached by each first edge node in the first edge node set, determining the number of first edge nodes that have cached the first video;
[0242] Determining the number of pushed copies corresponding to the first video based on the predicted request volume corresponding to the first video and the preset number of parallel request nodes;
[0243] The number of copies corresponding to the first video is determined based on the number of pushed copies and the number of the first edge nodes.
[0244] According to one or more embodiments of the present disclosure, [Example 6] provides a video push method, further comprising:
[0245] Optionally, determining the set of second edge nodes and the cache replacement space corresponding to each second edge node based on the cache occupied space and the number of copies corresponding to each first video, and the current bandwidth utilization and node cache space corresponding to each first edge node includes:
[0246] Determining a total cache occupied space corresponding to the first video set based on the cache occupied space corresponding to each first video and the number of copies;
[0247] Detecting whether a 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 whose bandwidth utilization rate is less than the preset bandwidth utilization rate threshold as second edge nodes to obtain a second edge node set;
[0248] Determine a bandwidth utilization difference between a current bandwidth utilization corresponding to each second edge node and a preset bandwidth utilization threshold;
[0249] Based on the total cache occupied space, the node cache space corresponding to each second edge node, and the bandwidth utilization difference, a cache replacement space corresponding to each second edge node is determined.
[0250] According to one or more embodiments of the present disclosure, [Example 7] provides a video push method, further comprising:
[0251] Optionally, determining 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 includes:
[0252] Multiplying the node cache space corresponding to each second edge node and the corresponding bandwidth utilization difference to obtain the maximum cache replacement space corresponding to each second edge node;
[0253] Adding the maximum cache replacement spaces corresponding to all second edge nodes to obtain a total cache replacement space, and dividing the maximum cache replacement space corresponding to each second edge node by the total cache replacement space to obtain a cache replacement ratio corresponding to each second edge node;
[0254] The cache replacement ratio corresponding to each second edge node is multiplied by the total cache occupied space to obtain the cache replacement space corresponding to each second edge node.
[0255] According to one or more embodiments of the present disclosure, [Example 8] provides a video push method, further comprising:
[0256] Optionally, determining 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 occupied space, and the number of copies, and the second video representation vector corresponding to the second video cached by each second edge node and the cache replacement space includes:
[0257] Clustering and grouping the first video set based on the first video representation vector corresponding to each first video to obtain a plurality of first video groups and a central video representation vector corresponding to each first video group;
[0258] Determining an average video representation vector corresponding to each second edge node based on the second video representation vector corresponding to the second video cached by each second edge node;
[0259] Based on the central representation vector corresponding to each first video group, the average video representation vector corresponding to each second edge node and the cache replacement space, and the cache occupied space and the number of copies corresponding to each first video, determine the third edge node to which each first video is to be pushed.
[0260] According to one or more embodiments of the present disclosure, [Example 9] provides a video push method, further comprising:
[0261] Optionally, 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 and the cache replacement space, and the cache occupied space and the number of copies corresponding to each first video includes:
[0262] Based on the central representation vector corresponding to each first video group, obtaining a current central representation vector corresponding to the current first video group where the current first video is located;
[0263] determining a vector distance between the current center representation vector and an average video representation vector corresponding to each second edge node, and arranging the second edge nodes in descending order based on the vector distance to obtain a second edge node sequence;
[0264] Based on the second edge node sequence, the cache replacement space corresponding to each second edge node, the current cache occupied space corresponding to the current first video, and the current number of copies, a third edge node to which the current first video is to be pushed is determined.
[0265] According to one or more embodiments of the present disclosure, [Example 10] provides a video push method, further comprising:
[0266] Optionally, determining a 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 occupied space corresponding to the current first video, and the current number of copies includes:
[0267] Determining a target selection quantity that is greater than the current number of copies corresponding to the current first video based on the current number of copies;
[0268] Based on the order of the second edge node sequence, sequentially selecting the target selection number of target second edge nodes, wherein the cache replacement space corresponding to the target second edge nodes is larger than the current cache occupied space corresponding to the current first video;
[0269] Based on the current number of copies, the maximum upload bandwidth corresponding to each target second edge node, and the node cache space, the third edge node to which the current first video is to be pushed is determined.
[0270] According to one or more embodiments of the present disclosure, [Example 11] provides a video push method, further comprising:
[0271] 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:
[0272] Determine the unit space upload bandwidth corresponding to each target second edge node based on the maximum upload bandwidth and node cache space corresponding to each target second edge node;
[0273] Based on the unit space upload bandwidth, the target second edge nodes are arranged in descending order to obtain a 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.
[0274] According to one or more embodiments of the present disclosure, [Example 12] provides a video push method, further comprising:
[0275] Optionally, before determining 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 occupied space, and the number of copies, and the second video representation vector corresponding to the second video cached by each second edge node and the cache replacement space, the method further includes:
[0276] Obtaining a first representation vector library, the first representation vector library comprising: a third video representation vector corresponding to each third video, wherein the third video is a video requested within a recent first historical period; the third video representation vector is obtained by embedding learning of a knowledge graph based on video content data corresponding to each third video;
[0277] A first video representation vector corresponding to each first video is obtained from the first representation vector library.
[0278] According to one or more embodiments of the present disclosure, [Example 13] provides a video push method, further comprising:
[0279] Optionally, obtaining the first video representation vector corresponding to each first video from the first representation vector library includes:
[0280] If the first video representation vector corresponding to the target first video does not exist in the first representation vector library, a second representation vector library is obtained, where the second representation vector library includes: a fourth video representation vector corresponding to each fourth video, wherein the fourth video is a video that has been requested within a recent second historical period and whose historical request volume is greater than a preset request volume threshold; the second historical period is less than the first historical period; and the fourth video representation vector is obtained by performing collaborative filtering embedding learning based on the fourth video requested by each user;
[0281] A first video representation vector corresponding to the target first video is determined based on the first representation vector library and the second representation vector library.
[0282] According to one or more embodiments of the present disclosure, [Example 14] provides a video push method, further comprising:
[0283] 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:
[0284] Determining a fifth video that exists in both the first characterization vector library and the second characterization vector library;
[0285] Obtaining, from the second representation vector library, a candidate video representation vector corresponding to the target first video and a fifth video representation vector corresponding to each fifth video;
[0286] determining, based on the candidate video representation vector and the fifth video representation vector, a distance between the target first video and each fifth video, and determining the fifth video with the smallest distance as the sixth video;
[0287] A sixth video representation vector corresponding to the sixth video is obtained from the first representation vector library, and the sixth video representation vector is determined as the first video representation vector corresponding to the target first video.
[0288] According to one or more embodiments of the present disclosure, [Example 15] provides a video push method, further comprising:
[0289] Optionally, obtaining the first video representation vector corresponding to each first video from the first representation vector library includes:
[0290] detecting whether each first video is included in the first representation vector library, and determining a hit rate of the first video;
[0291] If the first video hit rate is less than a preset hit rate threshold, updating the first representation vector library, and obtaining a first video representation vector corresponding to each first video from the updated first representation vector library;
[0292] If the first video hit rate is greater than or equal to a preset hit rate threshold, a first video representation vector corresponding to each first video is determined based on the first representation vector library and the second representation vector library.
[0293] According to one or more embodiments of the present disclosure, [Example 16] provides a video push device, including:
[0294] A set acquisition module, configured to acquire a first video set to be pushed and a first edge node set corresponding to the first video set;
[0295] a predicted request amount determination module, configured to predict each first video in the first video set and determine a predicted request amount for each first video during a request peak period;
[0296] a copy number determination module, configured to determine the number of copies corresponding to each first video based on the predicted request amount and the second video cached by each first edge node in the first edge node set;
[0297] a cache replacement space determination module, configured to determine a set of second edge nodes and a cache replacement space corresponding to each second edge node based on the cache occupied space and the number of copies corresponding to each first video, and the current bandwidth utilization and node cache space corresponding to each first edge node;
[0298] A third edge node determination module is configured to determine a third edge node to which each first video is to be pushed based on a first video representation vector corresponding to each first video, the cache occupied space, and the number of copies, and a second video representation vector corresponding to a second video cached by each second edge node and the cache replacement space;
[0299] The first video pushing module is configured to push a copy of each first video during a non-request peak period based on the number of copies corresponding to each first video and the third edge node.
[0300] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0301] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0302] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
[0303] The disclosed embodiments provide a video push method, apparatus, device, and storage medium. The method includes: determining the number of copies of each first video to be pushed based on the predicted request volume of each first video to be pushed during a request peak period and the second videos cached by each first edge node; determining the cache replacement space of each second edge node based on the cache occupied space and the number of copies of each first video and the current bandwidth utilization and node cache space of each first edge node; determining the third edge node to which each first video is to be pushed based on each first video representation vector, cache occupied space, and the number of copies, and the second video representation vector and cache replacement space cached by each second edge node; and copying and pushing each first video during a non-request peak period based on the number of copies and the third edge node, thereby achieving load balancing of edge nodes and effectively ensuring video acquisition speed.
Claims
1. A video push method, wherein: include: Acquire a first video set to be pushed and a first edge node set corresponding to the first video set; Predicting each first video in the first video set, and determining a predicted request amount of each first video during a request peak period; Determine the number of copies corresponding to each first video based on the predicted request amount and the second videos cached by each first edge node in the first edge node set; Determine a second edge node set and a cache replacement space corresponding to each second edge node based on the cache occupied space corresponding to each first video and the number of copies, and the current bandwidth utilization and node cache space corresponding to each first edge node; Determine a third edge node to which each first video is to be pushed based on a first video characterization vector corresponding to each first video, the cache occupied space and the number of copies, and a second video characterization vector corresponding to a second video cached by each second edge node and the cache replacement space; Based on the number of copies corresponding to each first video and the third edge node, a copy of each first video is pushed during a non-request peak period.
2. The video push method according to claim 1, wherein: The obtaining of a first video set to be pushed and a first edge node set corresponding to the first video set includes: Get the historical video collection that has the request in the current area; Determine a first video set to be pushed in the current area based on a historical request amount corresponding to each historical video in the historical video set and a preset request amount threshold; Each edge node located in the current area is combined to obtain a first edge node set corresponding to the first video set.
3. The video push method according to claim 2, wherein: The predicting each first video in the first video set to determine the predicted request amount of each first video in the request peak period includes: Obtaining 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 area; Inputting the video content data and the historical request data into a current prediction network model corresponding to the current area for prediction; Based on the output of the current prediction network model, a predicted request volume of each first video within a request peak period is determined.
4. The video push method according to claim 3, wherein: The determining of the current prediction network model corresponding to the current area includes: Determine a target time window corresponding to the current prediction moment, wherein a plurality of time windows are divided into a first preset time length as a granularity within the non-request peak period; Based on the correspondence between the regions in each time window and the prediction network model, a current prediction network model corresponding to the current region in the target time window is determined.
5. The video push method according to claim 1, wherein: The determining the number of copies corresponding to each first video based on the predicted request amount and the second video cached by each first edge node in the first edge node set includes: For each first video, based on the second video 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 amount corresponding to the first video and the preset number of parallel request nodes, determine the The number of push copies corresponding to a video; Based on the number of pushed 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, wherein: The determining of the second edge node set and the cache replacement space corresponding to each second edge node based on the cache occupied space corresponding to each first video and the number of copies, and the current bandwidth utilization and node cache space corresponding to each first edge node includes: Determine a total cache occupied space corresponding to the first video set based on the cache occupied space corresponding to each first video and the number of the copies; Detect whether the current bandwidth utilization rate corresponding to each first edge node is less than a preset bandwidth utilization rate threshold, and use the first edge nodes less than the preset bandwidth utilization rate threshold as second edge nodes to obtain a second edge node set; Determine a bandwidth utilization difference between a current bandwidth utilization corresponding to each second edge node and a preset bandwidth utilization threshold; Based on the total cache occupied space, the node cache space corresponding to each second edge node and the bandwidth utilization difference, a cache replacement space corresponding to each second edge node is determined.
7. The video push method according to claim 6, wherein: The determining, based on the total cache occupied space, the node cache space corresponding to each second edge node, and the bandwidth utilization difference, of the cache replacement space corresponding to each second edge node comprises: Multiplying the node cache space corresponding to each second edge node and the corresponding bandwidth utilization difference to obtain the maximum cache replacement space corresponding to each second edge node; Add up the maximum cache replacement spaces corresponding to all second edge nodes to obtain the total cache replacement space. The maximum cache replacement space corresponding to each second edge node is divided by the total cache replacement space to obtain a cache replacement ratio corresponding to each second edge node; The cache replacement ratio corresponding to each second edge node is multiplied by the total cache occupied space to obtain the cache replacement space corresponding to each second edge node.
8. The video push method according to claim 1, wherein: The determining, based on the first video characterization vector corresponding to each first video, the cache occupied space and the number of copies, and the second video characterization vector corresponding to the second video cached by each second edge node and the cache replacement space, of the third edge node to which each first video is to be pushed includes: Based on the first video representation vector corresponding to each first video, clustering and grouping the first video set to obtain a plurality of first video groups and a central video representation vector corresponding to each first video group; Determine an average video representation vector corresponding to each second edge node based on the second video representation vector corresponding to the second video cached by 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 and the cache replacement space, and the cache occupied space and the number of copies corresponding to each first video, determine the third edge node to which each first video is to be pushed.
9. The video push method according to claim 8, wherein: The method of 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 and the cache replacement space, and the cache occupied space and the number of copies corresponding to each first video, comprises: Based on the central representation vector corresponding to each first video group, obtaining a current central representation vector corresponding to the current first video group where the current first video is located; Determine the average video representation vector corresponding to the current center representation vector and each second edge node and arranging the second edge nodes in descending order based on the vector distance to obtain a second edge node sequence; Based on the second edge node sequence, the cache replacement space corresponding to each second edge node, the current cache occupied space corresponding to the current first video and the current number of copy copies, determine the third edge node to which the current first video is to be pushed.
10. The video push method according to claim 9, wherein: The determining, based on the second edge node sequence, the cache replacement space corresponding to each second edge node, the current cache occupied space corresponding to the current first video, and the current number of copies, of a third edge node to which the current first video is to be pushed includes: Based on the current number of copies corresponding to the current 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, sequentially selecting the target selection number of target second edge nodes, wherein the cache replacement space corresponding to the target second edge nodes is larger than the current cache occupied space corresponding to 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, the third edge node to which the current first video is to be pushed is determined.
11. The video push method according to claim 10, wherein: The determining, based on the current number of copies, the maximum upload bandwidth corresponding to each target second edge node, and the node cache space, of the third edge node to which the current first video is to be pushed includes: Determine the unit space upload bandwidth corresponding to each target second edge node based on the maximum upload bandwidth and the node cache space corresponding to each target second edge node; Based on the unit space upload bandwidth, the target second edge nodes are arranged in descending order to obtain A target second edge node sequence is obtained, and a 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.
12. The video push method according to any one of claims 1 to 11, wherein: Before determining 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 occupied space and the number of copies, and the second video representation vector corresponding to the second video cached by each second edge node and the cache replacement space, the method further includes: Obtain a first representation vector library, the first representation vector library comprising: a third video representation vector corresponding to each third video, wherein the third video is a video requested in a recent first historical period; the third video representation vector is obtained by embedding learning of a knowledge graph based on video content data corresponding to each third video; A first video representation vector corresponding to each first video is obtained from the first representation vector library.
13. The video push method according to claim 12, wherein: The acquiring 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, a second representation vector library is obtained, wherein 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 has been requested in the most recent second historical period and whose historical request amount is greater than a preset request amount threshold; the second historical period is less than the first historical period; and the fourth video representation vector is obtained by embedded learning based on collaborative filtering of the fourth video requested by each user; Based on the first representation vector library and the second representation vector library, a first video representation vector corresponding to the target first video is determined.
14. The video push method according to claim 13, wherein: The determining, based on the first representation vector library and the second representation vector library, a first video representation vector corresponding to the target first video includes: Determine a fifth video that exists in both the first characterization vector library and the second characterization vector library; Acquire, from the second representation vector library, a candidate video representation vector corresponding to the target first video and a fifth video representation vector corresponding to each fifth video; Based on the candidate video representation vector and the fifth video representation vector, determining the distance between the target first video and each fifth video, and determining the fifth video with the smallest distance as the sixth video; A sixth video representation vector corresponding to the sixth video is obtained from the first representation vector library, and the sixth video representation vector is determined as the first video representation vector corresponding to the target first video.
15. The video push method according to claim 12, wherein: The acquiring the first video representation vector corresponding to each first video from the first representation vector library includes: Detecting whether each first video is included in the first characterization vector library, and determining a hit rate of the first video; If the hit rate of the first video 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 a preset hit rate threshold, a first video representation vector corresponding to each first video is determined based on the first representation vector library and the second representation vector library.
16. A video push device, wherein: include: A set acquisition module, used to acquire a first video set to be pushed and a first edge node set corresponding to the first video set; A predicted request amount determination module, used to predict each first video in the first video set and determine the predicted request amount of each first video in a request peak period; A copy quantity determination module, used to determine the number of copies corresponding to each first video based on the predicted request amount and the second video cached by each first edge node in the first edge node set; A cache replacement space determination module, configured to determine a second edge node set and a cache replacement space corresponding to each second edge node based on the cache occupied space corresponding to each first video and the number of copies, and the current bandwidth utilization and node cache space corresponding to each first edge node; A 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 occupied space and the number of copies, and the second video representation vector corresponding to the second video cached by each second edge node and the cache replacement space; The first video pushing module is used to push a copy of each first video during a non-request peak period based on the number of copies corresponding to each first video and the third edge node.
17. An electronic device, wherein: The electronic device comprises: one or more processors; a 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 pushing method as described in any one of claims 1-15.
18. A storage medium comprising computer executable instructions, wherein: The computer executable instructions are used to execute the video pushing method as described in any one of claims 1-15 when executed by a computer processor.
Citation Information
Patent Citations
Device and method for optimizing access to contents by users
CN101897184A
Multi-movable-duplicate mechanism applied to distributed storage and access method thereof
CN102752381A
P2P streaming media copying method based on popularity
CN103458315A
Edge network node optimization method, edge network node optimization device and edge node equipment
CN112953746A
Utility optimal collaborative cache management method under CDN-P2P hybrid architecture
CN113453038A
Cited By
Node state combined local cache resource optimization method and system
CN120343045A
