Video caching method and related device
By predicting user needs and dynamically adjusting the video cache level, the problem of outdated or redundant video cache content in the prior art is solved, and the video loading speed and user experience are improved.
Patent Information
- Application Number
- CN202510307886.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-17
AI Technical Summary
The existing video caching strategy is difficult to accurately match user needs in multi-user and high-traffic scenarios, resulting in outdated or redundant cached content, increasing video loading delay and bandwidth usage.
By obtaining user viewing behavior, video playback device status and network environment information, the target video clip that the user will watch is predicted and preloaded into the target cache layer at the corresponding level for cache. The cache layer sets the storage amount based on the video clip access frequency, demand degree and priority coefficient.
It improves the effectiveness of cached content, reduces lag during video loading, improves cache hit rate, and reduces cache redundancy, thereby improving video loading speed and user viewing experience.
Smart Images

Figure CN120166252A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video caching, and more specifically, to a video caching method and related devices. Background Art
[0002] Most existing video caching strategies preload based on the access frequency or popularity of video segments. However, this static method is prone to causing the cached content to become outdated or redundant. Especially in multi-user and high-traffic scenarios, since the cached videos do not accurately meet the user needs, it is easy to cause unnecessary bandwidth occupation and video transmission delay, and it is easy to have a lag phenomenon during the video loading process, thus affecting the video loading speed and user viewing experience. Summary of the Invention
[0003] In view of this, the present invention discloses a video caching method and related devices to achieve accurate docking of cached videos with user needs, reduce caching redundancy, and improve the video loading speed and user viewing experience.
[0004] A video caching method includes:
[0005] Obtaining user viewing behavior, video playback device status, and network environment information;
[0006] Predicting a target video segment that the user is about to watch based on the user viewing behavior, the video playback device status, and the network environment information;
[0007] Preloading the target video segment into a target cache layer at a corresponding level for caching, where the target cache layer is one of multiple different-level cache layers configured between a content delivery network node and the user side, and each cache layer sets a cache storage capacity based on the video segment access frequency, the video segment demand degree, and the video segment priority coefficient.
[0008] Optionally, the predicting a target video segment that the user is about to watch based on the user viewing behavior, the video playback device status, and the network environment information includes:
[0009] Determining a weighted total weight of user behavior based on the user viewing behavior, the video playback device status, and the network environment information;
[0010] Feeding the weighted total weight of user behavior into a configured video segment prediction model to predict the target video segment that the user is about to watch.
[0011] Optionally, the feeding the weighted total weight of user behavior into a configured video segment prediction model to predict the target video segment that the user is about to watch includes:
[0012] The expression of the video segment prediction model is as follows:
[0013]
[0014] In the formula, represents the predicted target video segment, and Y t represents the user's historical viewing data, represents the prediction function, and V t represents the feature information at time point t, γ represents the regularization coefficient, which characterizes the complexity penalty term of the video segment prediction model, and W user represents the total weighted weight of the user behavior, R(V) represents the complexity penalty term of the video segment prediction model, and T represents the time step.
[0015] Optionally, it further includes:
[0016] Update the video segments cached in each cache layer according to the video segment life cycle and / or the user's current viewing requirements, obtain the cache update change amount, and clear the expired video segments.
[0017] Optionally, it further includes:
[0018] Based on the cache update change amount, adopt a collaborative mechanism to perform distributed cache collaboration on the content distribution network nodes and the user side to obtain the cache collaboration optimization target.
[0019] Optionally, it further includes:
[0020] In different cache levels, adaptively adjust the cache policy according to the cache loading speed expectation value and cache loading speed variance in the real-time network environment.
[0021] Optionally, it further includes:
[0022] In different cache levels, adaptively adjust the cache policy according to the video segment loading information fed back by the user to obtain the feedback adjustment amount, where the video segment loading information includes: the actual loading delay time of the video segment and the expected loading delay time of the video segment.
[0023] A video caching device includes:
[0024] An acquisition unit for acquiring user viewing behavior, video playback device status, and network environment information;
[0025] A video segment prediction unit for predicting the target video segment that the user is about to watch based on the user viewing behavior, the video playback device status, and the network environment information;
[0026] A cache unit for preloading the target video segment into the target cache layer at the corresponding level for caching, where the target cache layer is one of multiple different levels of cache layers configured between the content delivery network node and the user side, and the cache storage capacity of each cache layer is set based on the video segment access frequency, the video segment demand degree, and the video segment priority coefficient.
[0027] A computer storage medium storing at least one instruction, where when the at least one instruction is executed by a processor, the above-mentioned video caching method is implemented.
[0028] An electronic device, the electronic device includes: a memory and a processor;
[0029] The memory is used for storing at least one instruction;
[0030] The processor is used for executing the at least one instruction to implement the above-mentioned video caching method.
[0031] As can be seen from the above technical solutions, the present invention discloses a video caching method and related device, which obtain user viewing behavior, video playback device status, and network environment information, predict the target video segment that the user is about to watch based on the user viewing behavior, video playback device status, and network environment information, preload the target video segment into the target cache layer at the corresponding level for caching, and the target cache layer is one of multiple different levels of cache layers configured between the content delivery network node and the user side, and the cache storage capacity of each cache layer is set based on the video segment access frequency, the video segment demand degree, and the video segment priority coefficient. This application uses an intelligent prediction and prefetch mechanism, combines user viewing behavior, video playback device status, and network environment information, predicts the target video segment that the user is about to watch and performs pre-caching in advance, ensuring the effectiveness of the cached content and reducing the stuttering phenomenon during video loading; and in response to the dynamic demand for caching during video transmission, a multi-level caching strategy is adopted between the content delivery network node and the user side to optimize the cached content, and the cache storage capacity is set according to the video segment access frequency, the video segment demand degree, and the video segment priority coefficient, thereby effectively improving the cache hit rate and reducing cache redundancy. Therefore, this application improves the video loading speed and user viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for describing the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the disclosed drawings without creative efforts.
[0033] Figure 1 A flowchart of a video caching method disclosed in an embodiment of the present invention;
[0034] Figure 2 A flowchart of a method for predicting a target video segment that a user is about to watch, disclosed in an embodiment of the present invention;
[0035] Figure 3 Another flowchart of a video caching method disclosed in an embodiment of the present invention;
[0036] Figure 4 A schematic structural diagram of a video caching device disclosed in an embodiment of the present invention;
[0037] Figure 5 A schematic structural diagram of an electronic device disclosed in an embodiment of the present invention. Detailed implementation manners
[0038] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0039] An embodiment of the present invention discloses a video caching method and related devices. Through an intelligent prediction and prefetch mechanism, combined with user viewing behavior, video playback device status, and network environment information, the target video segment that the user is about to watch is predicted and pre-cached in advance, ensuring the effectiveness of the cached content and reducing the stuttering phenomenon that occurs during the video loading process; and in response to the dynamic caching requirements during the video transmission process, a multi-level caching strategy is adopted between the content distribution network nodes and the user side to optimize the cached content, and the cache storage capacity is set according to the video segment access frequency, video segment demand degree, and video segment priority coefficient, thereby effectively improving the cache hit rate and reducing cache redundancy. Therefore, this application improves the video loading speed and user viewing experience.
[0040] Refer to Figure 1 , a flowchart of a video caching method disclosed in an embodiment of the present application. The method includes:
[0041] Step S101, obtain user viewing behavior, video playback device status, and network environment information.
[0042] User viewing behavior may include: video viewing duration, user activity when watching the video, etc.
[0043] The video playback device status includes: device performance, etc.
[0044] The network environment information includes: network latency, etc.
[0045] Step S102: Based on the user's viewing behavior, the video playback device status, and the network environment information, predict the target video segment that the user is about to watch.
[0046] It should be noted that the video playback device is the device used by the user to watch videos, that is, the video playback device is the user device. Therefore, the video playback device status, such as device performance, can be regarded as a kind of user behavior feature.
[0047] The network environment information is also the network used by the user when watching videos, which can be WIFI or a mobile network, specifically determined by the user. Therefore, the network environment information, such as network latency, can also be regarded as a kind of user behavior feature.
[0048] Therefore, based on the user's viewing behavior, the video playback device status, and the network environment information, a user behavior portrait can be created, and based on this user behavior portrait, the target video segment that the user is about to watch can be predicted.
[0049] Step S103: Preload the target video segment into the target cache layer at the corresponding level for caching.
[0050] Among them, the target cache layer is one of the multiple different-level cache layers configured between the Content Delivery Network (CDN) nodes and the user side. Each cache layer sets the cache storage capacity based on the video segment access frequency, the video segment demand degree, and the video segment priority coefficient.
[0051] Specifically, the content delivery network covers a layer of intelligent virtual network on the basis of the existing Internet, publishes the content of the website to a large number of acceleration nodes all over the world, enabling users to obtain the required content nearby. This method can avoid problems such as slow user access response speed and poor content availability caused by small network bandwidth, large user access volume, and uneven distribution of network points, thereby improving the user access experience.
[0052] Based on this, this application configures multiple cache layers between the Content Delivery Network (CDN) nodes and the user side, and different cache layers store video segments at different levels.
[0053] The configuration of each cache layer sets the cache storage capacity based on the video segment access frequency, the video segment demand degree, and the video segment priority coefficient.
[0054] The expression of the cache layer is as follows:
[0055]
[0056] In the formula, C layer,i represents the i-th layer cache, λ i represents the access frequency of video segments, v i represents the demand degree of video segments, α i represents the priority coefficient of video segments, and N represents the number of cache levels.
[0057] Taking the configuration of 5 cache layers between the content distribution network node and the user side as an example, see Table 1.
[0058] Table 1
[0059]
[0060] In summary, this application discloses a video caching method, which obtains user viewing behavior, video playback device status, and network environment information, predicts the target video segment that the user is about to watch based on the user viewing behavior, video playback device status, and network environment information, and preloads the target video segment into the target cache layer of the corresponding level for caching. The target cache layer is one of multiple different-level cache layers configured between the content distribution network node and the user side, and each cache layer sets the cache storage capacity based on the access frequency of video segments, the demand degree of video segments, and the priority coefficient of video segments. Through the intelligent prediction and prefetch mechanism, this application combines the user viewing behavior, video playback device status, and network environment information to predict the target video segment that the user is about to watch and pre-cache it in advance, ensuring the effectiveness of the cached content and reducing the stuttering phenomenon during the video loading process; and aiming at the dynamic demand for caching during the video transmission process, a multi-level caching strategy is adopted between the content distribution network node and the user side to optimize the cached content, and the cache storage capacity is set according to the access frequency of video segments, the demand degree of video segments, and the priority coefficient of video segments, thereby effectively improving the cache hit rate and reducing cache redundancy. Therefore, this application improves the video loading speed and user viewing experience.
[0061] In one embodiment, see Figure 2 , the flowchart of a method for predicting the target video segment that the user is about to watch disclosed in the embodiment of this application, that is, step S102 may specifically include:
[0062] Step S201: Determine the weighted total weight of user behavior based on the user viewing behavior, video playback device status, and network environment information.
[0063] In practical applications, the user viewing behavior, video playback device status, and network environment information are obtained in real time, and the weighted total weight of user behavior as the user behavior portrait is determined by analyzing the viewing history, device performance, and network status of each user.
[0064] Among them, the expression of the weighted total weight of user behavior is as follows:
[0065]
[0066] In the formula, W user represents the weighted total weight of user behavior, M represents the number of user behavior characteristics, β i represents the weight of the i-th user behavior characteristic, and X i represents the value of the i-th user behavior characteristic.
[0067] Suppose it is determined that the user has the following behavior characteristics based on the user's viewing behavior, video playback device status, and network environment information:
[0068] Table 2
[0069]
[0070] Based on Table 1, it can be seen that the weighted total weight of user behavior is: W user = 3 + 20 + 16 + 9 = 48.
[0071] It should be particularly noted that the video playback device in this application is the user device. Therefore, the performance of the user device can be regarded as a kind of user behavior characteristic.
[0072] Similarly, the network environment information is: the network used by the user when watching the video, which can be WIFI or mobile network. There will be differences in the corresponding network latency times when the network is WIFI or mobile network. Therefore, network latency can also be regarded as a kind of user behavior characteristic.
[0073] Step S202: Input the weighted total weight of the user behavior into the configured video segment prediction model to predict the target video segment that the user is about to watch.
[0074] Among them, the expression of the video segment prediction model is as follows:
[0075]
[0076] In the formula, represents the predicted target video segment, Y t represents the user's historical viewing data, represents the prediction function, V t represents the feature information at time point t, γ represents the regularization coefficient, which characterizes the complexity penalty term of the video segment prediction model, W user represents the weighted total weight of the user behavior, R(V) represents the complexity penalty term of the video segment prediction model, and T represents the time step.
[0077] Among them, V tThe feature information at time point t may include: video clip ID, user ID, viewing time, viewing frequency, etc. V t As one of the inputs to the prediction function V t The selection of directly affects the prediction function The prediction accuracy of.
[0078] Assume that the video clip prediction model predicts that the target video clips to be viewed by the user are: video clip 001, video clip 002, and video clip 003, and based on the corresponding video clip access frequency, video clip demand level, and video clip priority coefficient, it is determined that video clip 001 corresponds to cache layer Layer1, video clip 002 corresponds to cache layer Layer2, and video clip 003 corresponds to cache layer Layer3. Then, video clip 001 is pre-loaded into cache layer Layer1, video clip 002 is pre-loaded into cache layer Layer2, and video clip 003 is pre-loaded into cache layer Layer3 to ensure that the corresponding video clips can be quickly loaded when the user views them.
[0079] It should be noted that the target video clips Will be used for pre-loading of subsequent cache content.
[0080] In one embodiment, referring to Figure 3 , another flowchart of the video caching method disclosed in the embodiments of the present application. After step S103, it may further include:
[0081] Step S104: Update the video clips cached in each cache layer according to the video clip life cycle and / or the user's current viewing needs, obtain the cache update change amount, and clear the expired video clips.
[0082] In practical applications, in the present application, as the video clip life cycle changes and the user's viewing needs change, the cache content will be updated in real time. For example, when the video clip life cycle ends or the user no longer views, the relevant cache will become invalid and be cleared.
[0083] The cache update process is implemented through the expression shown in formula (4):
[0084]
[0085] In the formula, ΔC update Represents the cache update change amount, Represents the change rate of the i-th cache content over time, δ expired (C i ) Represents the invalidation flag of the i-th cache content, and L represents the number of cache contents.
[0086] Assume that segment 001 expires after 1 hour in the cache, segment 002 expires after 2 hours in the cache, and segment 003 expires after 0.5 hour in the cache. Its update process is shown in Table 3:
[0087] Table 3
[0088]
[0089] In one embodiment, the video caching method may further include:
[0090] Based on the cache update change amount, a collaborative mechanism is adopted to perform distributed cache collaboration on the content distribution network nodes and the user side to obtain a cache collaboration optimization target.
[0091] In this application, distributed cache collaboration is implemented between the content distribution network nodes and the user side to synchronize cache data in real time and reduce redundant requests.
[0092] The collaborative optimization is implemented through the expression shown in formula (5):
[0093]
[0094] In the formula, represents the cache collaboration optimization target, K represents the number of cache nodes, represents the expected cache hit rate, and α i represents the video segment priority coefficient, which is used to adjust the expected cache hit rate of the i-th video segment element for the contribution to the cache collaboration optimization target , reflecting the importance or priority of the expected benefit, represents the variance of the cache hit rate, and β i represents the weight of the i-th user behavior characteristic, which is used to adjust the variance of the cache hit rate of the i-th video segment element for the impact on the cache collaboration optimization target , reflecting the degree of risk aversion.
[0095] Suppose there are 3 cache nodes working together, and the collaborative result is optimized through the adjustment coefficient of the expected cache hit rate, the expected cache hit rate, and the variance of the cache hit rate, as shown in Table 4:
[0096] Table 4
[0097]
[0098] In one embodiment, the video caching method may further include:
[0099] In different cache levels, adaptively adjust the cache policy according to the expected value of the cache loading speed and the variance of the cache loading speed in the real-time network environment.
[0100] Preferably, based on the cache collaborative optimization goal, in different cache levels, adaptively adjust the cache policy according to the expected value of the cache loading speed and the variance of the cache loading speed in the real-time network environment.
[0101] In this application, for different cache levels, by adaptively adjusting the cache policy according to the expected value of the cache loading speed and the variance of the cache loading speed in the real-time network environment, the cache hit rate is effectively improved, cache redundancy is reduced, and thus the video loading speed and the user viewing experience are improved.
[0102] The process of adaptively adjusting the cache policy according to the expected value of the cache loading speed and the variance of the cache loading speed in the real-time network environment can be represented by the following optimization goal:
[0103]
[0104] In the formula, Π adjust represents the adaptive adjustment strategy, represents the expected value of the cache loading speed, Var(S load (Π)) represents the variance of the cache loading speed, and λ represents the regularization coefficient.
[0105] For adaptively adjusting the cache policy according to the expected value of the cache loading speed and the variance of the cache loading speed in the real-time network environment, refer to the embodiments shown in Table 5.
[0106] Table 5
[0107]
[0108]
[0109] In one embodiment, the video caching method may further include:
[0110] In different cache levels, adaptively adjust the cache policy according to the video segment loading information fed back by the user to obtain a feedback adjustment amount.
[0111] Among them, the video segment loading information can be determined according to the video loading delay, stuttering, etc., and the video segment loading information includes: the actual loading delay time of the video segment and the expected loading delay time of the video segment.
[0112] In practical applications, on the basis of adaptively adjusting the cache policy according to the expected value of the cache loading speed and the variance of the cache loading speed in the real-time network environment, the cache policy can be adaptively adjusted again according to the video segment loading information fed back by the user to obtain a feedback adjustment amount.
[0113] The feedback adjustment amount is shown by formula (7):
[0114]
[0115] In the formula, F feedback represents the feedback adjustment amount, δ i represents the feedback weight, L i represents the actual loading delay time of the i-th video segment, is the expected loading delay time of the i-th video segment, and N represents the number of video segments.
[0116] Suppose the actual loading delay time of segment 001 feedback by the user is 50 ms, the expected loading delay time of the video segment is 30 ms, the actual loading delay time of segment 002 is 40 ms, and the expected loading delay time of the video segment is 30 ms. The adjustment process is as follows:
[0117] Table 6
[0118]
[0119] In this application, for different cache levels, the cache policy is adaptively adjusted according to the video segment loading information feedback by the user in real time, which can optimize the cached content, improve the video transmission efficiency, reduce latency and stuttering, and thus improve the user's viewing experience.
[0120] Corresponding to the above method embodiment, this application also discloses a video caching device.
[0121] See Figure 4 , a schematic structural diagram of a video caching device disclosed in an embodiment of this application. The device may include:
[0122] An acquisition unit 301, configured to acquire user viewing behavior, video playback device status, and network environment information.
[0123] The user viewing behavior may include: video viewing duration, user activity when viewing the video, etc.
[0124] The video playback device status includes: device performance, etc.
[0125] The network environment information includes: network latency, etc.
[0126] A video segment prediction unit 302, configured to predict a target video segment that the user is about to view based on the user viewing behavior, the video playback device status, and the network environment information.
[0127] It should be noted that the video playback device is the device used by the user to watch videos, that is, the video playback device is the user device. Therefore, the status of the video playback device, such as device performance, can be regarded as a kind of user behavior feature.
[0128] The network environment information, that is, the network used by the user when watching videos, can be WIFI or a mobile network, which is specifically determined by the user. Therefore, the network environment information, such as network latency, can also be regarded as a kind of user behavior feature.
[0129] Therefore, based on the user's viewing behavior, the status of the video playback device, and the network environment information, a user behavior portrait can be created, and based on this user behavior portrait, the target video segment that the user is about to watch can be predicted.
[0130] The cache unit 303 is used to preload the target video segment into the target cache layer at the corresponding level for caching.
[0131] Among them, the target cache layer is one of the multiple different-level cache layers configured between the content delivery network node and the user side. Each cache layer sets the cache storage capacity based on the video segment access frequency, the video segment demand degree, and the video segment priority coefficient.
[0132] Specifically, the content delivery network covers a layer of intelligent virtual network on the basis of the existing Internet, publishes the content of the website to a large number of acceleration nodes all over the world, so that users can obtain the required content nearby. This method can avoid the problems of slow user access response speed and poor content availability caused by small network bandwidth, large user access volume, and uneven distribution of network points, thus improving the user access experience.
[0133] Based on this, the present application configures multiple cache layers between the content delivery network (CDN) node and the user side, and different cache layers store video segments at different levels.
[0134] The configuration of each cache layer sets the cache storage capacity based on the video segment access frequency, the video segment demand degree, and the video segment priority coefficient.
[0135] In summary, the present application discloses a video caching device, which obtains user viewing behavior, video playback device status, and network environment information, predicts the target video segment that the user is about to watch based on the user viewing behavior, video playback device status, and network environment information, preloads the target video segment into the target cache layer of the corresponding level for caching, and the target cache layer is one of multiple different-level cache layers configured between the content delivery network node and the user side. Each cache layer sets the cache storage capacity based on the video segment access frequency, video segment demand degree, and video segment priority coefficient. The present application, through an intelligent prediction and prefetch mechanism, combines user viewing behavior, video playback device status, and network environment information to predict the target video segment that the user is about to watch and perform pre-caching in advance, ensuring the effectiveness of the cached content and reducing the stuttering phenomenon during video loading; and in response to the dynamic demand for caching during video transmission, a multi-level caching strategy is adopted between the content delivery network node and the user side to optimize the cached content, and the cache storage capacity is set according to the video segment access frequency, video segment demand degree, and video segment priority coefficient, thereby effectively improving the cache hit rate and reducing cache redundancy. Therefore, the present application improves the video loading speed and user viewing experience.
[0136] In one embodiment, the video segment prediction unit 302 may specifically be used for:
[0137] Determine the weighted total weight of user behavior based on the user viewing behavior, the video playback device status, and the network environment information;
[0138] Send the weighted total weight of user behavior into the configured video segment prediction model to predict the target video segment that the user is about to watch.
[0139] Among them, the expression of the video segment prediction model is as follows:
[0140]
[0141] In the formula, represents the predicted target video segment, Y t represents the user's historical viewing data, represents the prediction function, V t represents the feature information at time point t, γ represents the regularization coefficient, which represents the complexity penalty term of the video segment prediction model, W user represents the weighted total weight of user behavior, R(V) represents the complexity penalty term of the video segment prediction model, and T represents the time step.
[0142] In one embodiment, the video caching device may further include:
[0143] An update unit, configured to update the video segments cached in each of the cache layers according to the video segment life cycle and / or the current viewing requirements of the user, obtain a cache update change amount, and clear the expired video segments.
[0144] In one embodiment, the video caching device may further include:
[0145] A collaborative optimization unit, configured to perform distributed cache collaboration on the content distribution network node and the user side by using a collaborative mechanism based on the cache update change amount, and obtain a cache collaboration optimization target.
[0146] In one embodiment, the video caching device may further include:
[0147] A cache policy adjustment unit, configured to adaptively adjust the cache policy according to the cache loading speed expectation value and the cache loading speed variance in the real-time network environment at different cache levels.
[0148] In one embodiment, the video caching device may further include:
[0149] A feedback adjustment amount determination unit, configured to adaptively adjust the cache policy according to the video segment loading information fed back by the user at different cache levels, and obtain a feedback adjustment amount, where the video segment loading information includes: the actual loading delay time of the video segment and the expected loading delay time of the video segment.
[0150] It should be noted that for the specific working principles of the components in the device embodiment, please refer to the corresponding parts of the method embodiment, which will not be elaborated here.
[0151] Corresponding to the above embodiments, the present application also discloses a computer storage medium, where the computer storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the steps shown in the method embodiment of video caching are implemented.
[0152] A computer storage medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. The computer storage medium can be a machine-readable signal medium or a machine-readable storage medium. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include electrical connections based on 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0153] Corresponding to the above embodiments, as Figure 5 shown, the present invention further provides an electronic device, which may include: a processor 1 and a memory 2;
[0154] wherein, the processor 1 and the memory 2 communicate with each other through a communication bus 3;
[0155] The processor 1 is configured to execute at least one instruction;
[0156] The memory 2 is configured to store at least one instruction;
[0157] The processor 1 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0158] The memory 2 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0159] Wherein, the processor executes at least one instruction to implement the steps shown in the embodiments of the video cache method.
[0160] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0161] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other.
[0162] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. A video caching method, characterized in that: include: Obtain user viewing behavior, video playback device status, and network environment information; Based on the user's viewing behavior, the state of the video playback device and the network environment information, predicting a target video segment that the user is going to watch; The target video clip is preloaded into a target cache layer of a corresponding level for caching, wherein the target cache layer is one of a plurality of cache layers of different levels configured between a content distribution network node and a user terminal, and each cache layer sets a cache storage capacity based on a video clip access frequency, a video clip demand degree, and a video clip priority coefficient.
2. The video caching method according to claim 1, characterized in that: The predicting, based on the user's viewing behavior, the state of the video playback device, and the network environment information, of a target video segment that the user is going to watch includes: Determine a total weight of user behavior based on the user viewing behavior, the state of the video playback device and the network environment information; The weighted total weight of the user behavior is sent to the configured video segment prediction model to predict the target video segment that the user is going to watch.
3. The video caching method according to claim 2, characterized in that: The step of sending the weighted total weight of the user behavior to a configured video segment prediction model to predict the target video segment that the user is going to watch includes: The expression of the video segment prediction model is as follows: In the formula, represents the predicted target video segment, Y t Represents the user's historical viewing data. represents the prediction function, V t represents the feature information at time point t, W user represents the total weight of the user behavior, γ represents the regularization coefficient, characterizes the complexity penalty term of the video segment prediction model, R(V) represents the complexity penalty term of the video segment prediction model, and T represents the time step.
4. The video caching method according to any one of claims 1 to 3, characterized in that: Also includes: According to the life cycle of the video clips and / or the current viewing needs of the user, the video clips cached in each of the cache layers are updated to obtain a cache update variation, and invalid and expired video clips are cleared.
5. The video caching method according to claim 4, characterized in that: Also includes: Based on the cache update variation, a coordination mechanism is adopted to perform distributed cache coordination on the content distribution network node and the user end, so as to obtain a cache coordination optimization target.
6. The video caching method according to claim 1, characterized in that: Also includes: In different cache levels, the cache strategy is adaptively adjusted according to the expected value and variance of cache loading speed in the real-time network environment.
7. The video caching method according to claim 1 or 6, characterized in that: Also includes: In different cache levels, the cache strategy is adaptively adjusted according to the video clip loading information fed back by the user to obtain a feedback adjustment amount, wherein the video clip loading information includes: the actual loading delay time of the video clip and the expected loading delay time of the video clip.
8. A video caching device, characterized in that: include: An acquisition unit, used to acquire user viewing behavior, video playback device status and network environment information; A video segment prediction unit, configured to predict a target video segment that a user is going to watch based on the user's viewing behavior, the state of the video playback device, and the network environment information; A cache unit is used to preload the target video clip into a target cache layer of a corresponding level for caching, wherein the target cache layer is one of a plurality of cache layers of different levels configured between a content distribution network node and a user terminal, and each cache layer sets a cache storage capacity based on a video clip access frequency, a video clip demand degree, and a video clip priority coefficient.
9. A computer storage medium, characterized in that: The computer storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the video caching method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: The electronic device comprises: a memory and a processor; The memory is used to store at least one instruction; The processor is used to execute the at least one instruction to implement the video caching method according to any one of claims 1 to 7.