CN110971962B - Slice caching method and device and storage medium - Google Patents

Slice caching method and device and storage medium Download PDF

Info

Publication number
CN110971962B
CN110971962B CN201911209107.6A CN201911209107A CN110971962B CN 110971962 B CN110971962 B CN 110971962B CN 201911209107 A CN201911209107 A CN 201911209107A CN 110971962 B CN110971962 B CN 110971962B
Authority
CN
China
Prior art keywords
video
slice
cache
slices
target video
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911209107.6A
Other languages
Chinese (zh)
Other versions
CN110971962A (en
Inventor
邓军
王�琦
程志鹏
李立峰
徐嵩
杜欧杰
蒋伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
MIGU Video Technology Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Video Technology Co Ltd
MIGU Culture Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, MIGU Video Technology Co Ltd, MIGU Culture Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201911209107.6A priority Critical patent/CN110971962B/en
Publication of CN110971962A publication Critical patent/CN110971962A/en
Application granted granted Critical
Publication of CN110971962B publication Critical patent/CN110971962B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4335Housekeeping operations, e.g. prioritizing content for deletion because of storage space restrictions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Abstract

The embodiment of the invention relates to the technical field of Internet, and discloses a slice caching method, a slice caching device and a storage medium, wherein the slice caching method comprises the following steps: downloading a video slice of a target video; storing the downloaded video slices of the target video in a cache; judging whether the video slices in the cache meet preset conditions or not; if the preset conditions are met, a weight value is given to each video slice of the target video in the cache; and deleting the video slices of the target video in the cache according to the weight value. The method is not only beneficial to solving the problem of overlong cache time during secondary playing, but also can solve the problem that new video slices cannot be cached due to the fact that the number of stored video slices is too large.

Description

Slice caching method and device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to a slice caching method, a slice caching device and a storage medium.
Background
When the mobile terminal plays the online video, the video data needs to be loaded and buffered first, and the video data is played based on the buffered data. In the existing online playing scheme, when a user plays a favorite video for the second time, data buffering needs to be performed again, so that when the same video is played at the same terminal, network resources are repeatedly occupied, and particularly when a network signal is not good, buffering time is long, buffering times are many, and user experience is poor.
However, the inventor finds that in the prior art, if a video slice that has already been played is cached, too many video slices are stored in the cache, so that a new video slice cannot be cached, and subsequent watching of a user is affected.
Disclosure of Invention
An object of embodiments of the present invention is to provide a slice caching method, an apparatus, and a storage medium, which are not only beneficial to solve the problem of too long caching time during playback, but also capable of solving the problem of not being able to cache a new video slice due to too many stored video slices.
In order to solve the above technical problem, an embodiment of the present invention provides a slice caching method, including: downloading a video slice of a target video; storing the downloaded video slices of the target video in a cache; judging whether the video slices in the cache meet preset conditions or not; if the preset conditions are met, a weight value is given to each video slice of the target video in the cache; and deleting the video slices of the target video in the cache according to the weight value.
The embodiment of the invention also provides a slice caching device, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the slice caching method.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the above-mentioned slice caching method.
Compared with the prior art, the embodiment of the invention provides a slice caching method, the video slices of the downloaded target video are stored in the cache, so that when a user plays the viewed video slices for the second time, the user can directly search and play the viewed video slices from the cache, the video slices do not need to be downloaded again from a server, the waiting time of the user is reduced, the playing jam is not easy to cause, and the user experience is improved; in the embodiment, when the video slices in the cache meet the preset condition, a weighted value is given to each video slice in the cache, and the video slices of the target video in the cache are eliminated according to the weighted values, so that the video slices are not required to be downloaded from the server again when the user plays the video slices for the second time, and the problem that the new video slices cannot be cached due to too many video slices in the cache is solved.
In addition, deleting the video slice of the target video in the cache according to the weight value specifically comprises the following steps: and deleting the video slice with the minimum weight value in the target video in the cache. In the scheme, the video slice with the minimum weight value is deleted to accommodate the downloading of the new video slice.
In addition, a weight value is assigned to each video slice of the target video in the cache, and the method specifically includes: obtaining an index table of a target video, wherein the index table at least comprises: sequence numbers of all video slices of the target video; obtaining dotting information of a target video, wherein the dotting information at least comprises: the distribution time of important content in the target video; determining the serial number of the video slice matched with the distribution time according to the index table, and establishing a set; determining a currently played video slice; determining the serial number of the currently played video slice and the serial number of each video slice of the target video in the cache according to the index table; and according to the serial number of the currently played video slice, the serial number of each video slice of the target video in the set and the cache, giving a weight value to each video slice of the target video in the cache.
In addition, the weight value is determined by the following formula:
Figure BDA0002297650680000021
wherein i represents a sequence number of a video slice of the target video in the cache; v (i) video with sequence number i in the bufferWeighting values of the slices; r represents the sequence number of the currently playing video slice; v. ofmA set of representations; floor (a, b, c) indicates if a is in [ b, c ]]If a is smaller than b, the value is b, and if a is larger than c, the value is c; k is a constant.
In addition, whether the video slice in the cache meets the preset conditions is judged, and the method specifically comprises the following steps: acquiring the total number of video slices in a cache; judging whether the total number reaches a preset upper limit or not; and if the total number reaches the preset upper limit, the preset condition is met.
In addition, before judging whether the total number reaches the preset upper limit, the method further comprises the following steps: acquiring the number of video slices which are not played in a cache; and determining that the number of the video slices which are not played is less than a preset threshold value. According to the scheme, the number of played video slices in the cache is large, and the success rate of finding the viewed video slices during secondary review by a user is improved.
In addition, after deleting the video slice of the target video in the cache according to the weight value, the method further comprises the following steps: when an exit request is received, judging whether the playing of the currently played video slice is finished; if the playing is not finished, determining the currently played video slice and the first video slice; and deleting other video slices except the currently played video slice and the first video slice in the cache. According to the scheme, the user can conveniently continue to watch the video in the subsequent process, and a room for caching is provided for playing other videos.
In addition, after storing the downloaded video slice of the target video in the cache, the method further includes: receiving a review request of a user, wherein the review request comprises: the time is looked back; and searching the video slice matched with the review time from the cache in response to the review request.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a flow chart illustrating a method of slice caching according to a first embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method of slice caching according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for slice caching according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The first embodiment of the present invention relates to a slice caching method, and the core of the present embodiment is that the slice caching method includes: downloading a video slice of a target video; storing the downloaded video slices of the target video in a cache; judging whether the video slices in the cache meet preset conditions or not; if the preset conditions are met, a weight value is given to each video slice of the target video in the cache; and deleting the video slices of the target video in the cache according to the weight value. The downloaded video slice of the target video is stored in the cache, so that when the viewed video slice is played for the second time, the viewed video slice can be directly searched from the cache and played without downloading the video slice again from the server, the waiting time of a user is reduced, the playing jam is not easy to cause, and the user experience is improved; in addition, in the embodiment, when the video slices in the cache meet the preset condition, a weight value is given to each video slice in the cache, and the video slices of the target video in the cache are eliminated according to the weight values, so that the problem that the video slices in the cache are too many to cache new video slices is solved. Therefore, the embodiment is beneficial to solving the problem of overlong cache time during secondary playing and solving the problem that new video slices cannot be cached due to too many stored video slices.
The following describes implementation details of the slice caching method in this embodiment in detail, and the following is only provided for easy understanding and is not necessary for implementing this embodiment.
A flow diagram of a slice caching method in this embodiment is shown in fig. 1:
step 101: video slices of the target video are downloaded.
Specifically, when a user request for playing a target video is received, an index table of the target video, which is also called an m3u8 list, is downloaded from a server side, and includes a sequence number of a video slice of the target video and an address where the video slice is located. Where each video slice corresponds to video content for a certain time period. The player can download the video slices of the target video from the addresses where the video slices are located in sequence from the first video slice; the player can also receive a playing request of a user, and starts to watch from a certain time point, at this time, the player can determine the video slice matched with the time point according to the time point which is requested to watch by the user, and sequentially downloads the video slice of the target video from the address where the video slice is located from the video slice. It should be noted that after downloading one video slice, the downloaded video slice starts to be played while other video slices continue to be downloaded.
Step 102: and storing the downloaded video slices of the target video in a cache.
Specifically, the downloaded video slices of the target video are stored in the cache, that is, the video slices that have been played are stored in the cache without temporarily deleting the video slices that have been played during the playing of the video slices of the target video. The cache in this embodiment at least includes: and caching the disk.
Step 103: and judging whether the video slices in the cache meet preset conditions or not. If the preset condition is met, executing step 104; if the preset condition is not met, the step 102 is returned to for execution.
In this embodiment, the determining whether the video slice in the cache meets the preset condition specifically includes: acquiring the total number of video slices in a cache; judging whether the total number reaches a preset upper limit or not; and if the total number reaches the preset upper limit, the preset condition is met.
Specifically, whether the total number of video slices in the cache reaches a preset upper limit or not can be determined by acquiring the total number of video slices in the cache, where the preset upper limit represents that the cache is full and a new video slice cannot be continuously accommodated in the cache, and then step 104 is executed: a weight value is assigned to each video slice of the target video in the cache. If the cache is not full, the process returns to step 102 to continue downloading new video slices until the cache is full of video slices, and then step 104 is continued. The preset upper limit may be 30, and of course, a person skilled in the art may determine the preset upper limit according to the actual buffer size of the player.
Further, before determining whether the total number reaches a preset upper limit, the method further includes: acquiring the number of video slices which are not played in a cache; and determining that the number of the video slices which are not played is less than a preset threshold value.
Specifically, before judging whether the total number of the video slices in the cache reaches a preset upper limit, whether the number of the video slices which are not played in the cache is downloaded and played is judged, the preset threshold value can be a smaller value set by a user, so that under the condition that the number of the video slices which are not played in the cache is small and the number of the played video slices is large, whether the number of the video slices in the cache reaches the preset upper limit is judged, whether the video slices in the cache are deleted is determined, the number of the played video slices in the cache is ensured to be large, and the success rate of finding the watched video slices in the secondary review of the user is improved.
Step 104: a weight value is assigned to each video slice of the target video in the cache.
In this embodiment, assigning a weight value to each video slice of a target video in a cache specifically includes: obtaining an index table of a target video, wherein the index table at least comprises: sequence numbers of all video slices of the target video; obtaining dotting information of a target video, wherein the dotting information at least comprises: the distribution time of important content in the target video; determining the serial number of the video slice matched with the distribution time according to the index table, and establishing a set; determining a currently played video slice; determining the serial number of the currently played video slice and the serial number of each video slice of the target video in the cache according to the index table; and according to the serial number of the currently played video slice, the serial number of each video slice of the target video in the set and the cache, giving a weight value to each video slice of the target video in the cache.
Specifically, the weight value is determined by the following formula:
Figure BDA0002297650680000051
wherein i represents a sequence number of a video slice of the target video in the cache; v (i) represents the weight value of the video slice with the sequence number i in the cache; r represents the sequence number of the currently playing video slice; v. ofmA set of representations; floor (a, b, c) indicates if a is in [ b, c ]]If a is smaller than b, the value is b, and if a is larger than c, the value is c; k is a constant.
Specifically, in the present embodiment, when a weight value is given to each video slice, the larger the weight value is, the smaller the probability of deletion is; the smaller the weight value, the greater the probability of being deleted. Since the first video slice of the target video may contain the audio/video format of the target video, when deleting the video slice, the first video slice cannot be easily deleted, and in order to ensure that the first video slice is not easily deleted in the present embodiment, the weight value assigned to the first video slice, that is, the video slice with the sequence number of 0, is 100.
Obtaining dotting information of a target video from a server, wherein the dotting information at least comprises: the distribution time of the important content in the target video is that the important content in the target video is generally some wonderful video time points in the video, so that the probability that the user reviews the wonderful video time points is high. In this embodiment, a set is set for these highlight video time points, and the set includes: the sequence number of the video slice that matches the highlight video time point, that is, the video slice corresponding to the time period in which the highlight video time point falls. When the video slice in the cache belongs to the set, a larger weight value is given to the video slice; when a video slice in the cache does not belong to the set, a smaller weight value is assigned to the video slice.
In this embodiment, the current playing video slice t is also passedrWith video slices t in the cacheiJudging whether the video slice is played or not according to the sequence of the serial numbers, if so, judging whether the video slice is played or not<r, the video slices in the cache are indicated to be played; if i is larger than or equal to r, the video slice in the cache is not played or is playing. Then a higher weight value is given to the video slices which are not played or are playing in the cache; a smaller weight value is assigned to the video slice already played in the buffer.
For example, the following steps are carried out: suppose there are 10 video slices in the buffer, which are: t is t0、t1、t2、t3、t4、t5、t6、t7、t8、t9And video slices t in the cache2、t4、t9Belonging to the above-mentioned group. Suppose t of a video slice currently being playedr=t7K is 10, then, t is0Weight of slice is 100, t1Weight of slice is 4, t2Weight of slice is 55, t3Weight of slice is 6, t4Weight of slice 57, t5Weight of slice 8, t6Weight of slice 9, t7Weight of slice is 100, t8Weight of slice is 99, t9The slice weight value is 100. Assuming that the number of video slices in the buffer has reached the upper limit of 10, the obsolete slice may be determined to be t1Slicing to accommodate the next video slice t10
Step 105: and deleting the video slices of the target video in the cache according to the weight value.
In this embodiment, deleting the video slice of the target video in the cache according to the weight value specifically includes: and deleting the video slice with the minimum weighted value in the target video in the cache, thereby deleting the video slice with the next importance so as to accommodate the downloading of the new video slice.
Further, after storing the downloaded video slice of the target video in the cache, the method further includes: receiving a review request of a user, wherein the review request comprises: the time is looked back; and searching the video slice matched with the review time from the cache in response to the review request. Specifically, by receiving a review request of a user, video slices matched with review time are searched from a cache according to the request of the user, that is, video slices corresponding to a time period in which the review time falls, and since a plurality of played video slices are stored in the cache, the video slices matched with the review time are likely to be stored in the cache, so that convenience is provided for secondary review of the user, the user can jump to play directly, the video slices do not need to be downloaded again from a server, the waiting time of the user is shortened, and the playing jam is not easy to cause.
Compared with the prior art, the embodiment of the invention provides a slice caching method, the video slices of the downloaded target video are stored in the cache, so that when the viewed video slices are played for the second time, the viewed video slices can be directly searched from the cache and played, the video slices do not need to be downloaded again from the server, the waiting time of a user is reduced, the playing jam is not easy to cause, and the user experience is improved; in addition, in the embodiment, when the video slices in the cache meet the preset condition, a weight value is given to each video slice in the cache, and the video slices of the target video in the cache are eliminated according to the weight values, so that the problem that the video slices in the cache are too many to cache new video slices is solved. Therefore, the embodiment is beneficial to solving the problem of overlong cache time during secondary playing and solving the problem that new video slices cannot be cached due to too many stored video slices.
A second embodiment of the present invention relates to a slice caching method. The second embodiment is substantially the same as the first embodiment, except that after deleting a video slice of a target video in a cache according to a weight value, the method further includes: when an exit request is received, judging whether the playing of the currently played video slice is finished; if the playing is not finished, determining the currently played video slice and the first video slice; and deleting other video slices except the currently played video slice and the first video slice in the cache.
A flow chart of the slice caching method in this embodiment is shown in fig. 2, and specifically includes:
step 201: video slices of the target video are downloaded.
Step 202: and storing the downloaded video slices of the target video in a cache.
Step 203: and judging whether the video slices in the cache meet preset conditions or not. If the preset condition is met, executing step 204; if the preset condition is not satisfied, the process returns to step 202.
Step 204: a weight value is assigned to each video slice of the target video in the cache.
Step 205: and deleting the video slices of the target video in the cache according to the weight value.
Steps 201 to 205 are substantially the same as steps 101 to 105 in the first embodiment, and are not described again in this embodiment.
Step 206: and when the quit request is received, judging whether the playing of the currently played video slice is finished. If not, go to step 207; if the playing is finished, the process is finished.
Specifically, when a quit request of a user is received, that is, when the user wants to quit the currently viewed video slice, it is first determined whether the currently played video slice is played completely, where the playing completion includes a situation that the video is played to the end of the slice, because the user generally cannot view the end of the slice, the user can also consider that the playing of the current video slice is completed. If not, go to step 207: determining a currently played video slice and a first video slice; if the playing is finished, the process is finished.
Step 207: a currently playing video slice and a first video slice are determined.
Step 208: and deleting other video slices except the currently played video slice and the first video slice in the cache.
With respect to step 207 and step 208, specifically, when the currently playing video slice is not completely played but the user wants to exit from the video, the currently playing video slice and the first video slice are determined. Since the first video slice may contain the audio-video format of the video, the first video slice needs to be preserved; since the user is likely to continue watching the unviewed video slice subsequently, the currently played video slice needs to be retained, so as to facilitate the user to continue watching subsequently. And deleting other video slices except the currently played video slice and the first video slice in the cache, thereby providing room for caching the playing of other videos.
Compared with the prior art, the embodiment of the invention provides a slice caching method, which is characterized in that when the currently played video slice is not played completely but a user wants to quit the video, the currently played video slice and a first video slice are determined. Since the first video slice may contain the audio-video format of the video, the first video slice needs to be preserved; since the user is likely to continue watching the unviewed video slice subsequently, the currently played video slice needs to be retained, so as to facilitate the user to continue watching subsequently. And deleting other video slices except the currently played video slice and the first video slice in the cache, thereby providing room for caching the playing of other videos.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A third embodiment of the present invention relates to an apparatus for slice caching, as shown in fig. 3, including at least one processor 301; and a memory 302 communicatively coupled to the at least one processor 301; the memory 302 stores instructions executable by the at least one processor 301, and the instructions are executed by the at least one processor 301, so that the at least one processor 301 can execute the slice caching method.
Where the memory 302 and the processor 301 are coupled in a bus, the bus may comprise any number of interconnected buses and bridges, the buses coupling one or more of the various circuits of the processor 301 and the memory 302. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 301 is transmitted over a wireless medium through an antenna, which further receives the data and transmits the data to the processor 301.
The processor 301 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 302 may be used to store data used by processor 301 in performing operations.
The fourth embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the slice caching method.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (9)

1. A method of slice caching, comprising:
downloading a video slice of a target video;
storing the downloaded video slices of the target video in a cache;
judging whether the video slices in the cache meet preset conditions or not;
if the preset condition is met, giving a weight value to each video slice of the target video in the cache;
deleting the video slices of the target video in the cache according to the weight value;
wherein the weight value is determined by the following formula:
Figure FDA0003360178670000011
wherein i represents a sequence number of a video slice of the target video in the cache; v (i) represents the weight value of the video slice with the sequence number i in the cache; r represents the sequence number of the currently playing video slice; v. ofmRepresenting a set comprising sequence numbers of video slices matching distribution times of important content in a target video; floor (a, b, c) indicates if a is in [ b, c ]]If a is smaller than b, the value is b, and if a is larger than c, the value is c; k is a constant.
2. The slice caching method according to claim 1, wherein the deleting the video slice of the target video in the cache according to the weight value specifically includes: deleting the video slice with the smallest weight value in the target video in the cache.
3. The slice caching method according to claim 1, wherein the assigning a weight value to each video slice of the target video in the cache specifically comprises:
obtaining an index table of the target video, wherein the index table at least comprises: sequence numbers of all video slices of the target video;
obtaining dotting information of the target video, wherein the dotting information at least comprises: the distribution time of important content in the target video;
determining the serial number of the video slice matched with the distribution time according to the index table, and establishing a set;
determining a currently played video slice;
determining the serial number of the currently played video slice and the serial number of each video slice of the target video in the cache according to the index table;
and according to the serial number of the currently played video slice, the serial numbers of the video slices of the target video in the set and the cache, giving a weight value to each video slice of the target video in the cache.
4. The slice caching method according to claim 1, wherein the determining whether the video slice in the cache meets a preset condition specifically comprises:
acquiring the total number of the video slices in a cache;
judging whether the total number reaches a preset upper limit or not;
and if the total number reaches the preset upper limit, the preset condition is met.
5. The slice caching method according to claim 4, wherein before determining whether the total number reaches a preset upper limit, the method further comprises:
acquiring the number of video slices which are not played in a cache;
determining that the number of unplayed video slices is less than a preset threshold.
6. The method for slice caching according to claim 1, wherein after deleting the video slices of the target video in the cache according to the weight value, the method further comprises:
when an exit request is received, judging whether the playing of the currently played video slice is finished;
if the playing is not finished, determining the currently played video slice and the first video slice;
and deleting other video slices except the currently played video slice and the first video slice in the cache.
7. The slice caching method of claim 1, wherein after storing the downloaded video slices of the target video in the cache, further comprising:
receiving a review request of a user, wherein the review request comprises: the time is looked back;
and searching the video slice matched with the review time from the cache in response to the review request.
8. An apparatus for slice caching, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of slice caching as claimed in any one of claims 1 to 7.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of slice caching as claimed in any one of claims 1 to 7.
CN201911209107.6A 2019-11-30 2019-11-30 Slice caching method and device and storage medium Active CN110971962B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911209107.6A CN110971962B (en) 2019-11-30 2019-11-30 Slice caching method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911209107.6A CN110971962B (en) 2019-11-30 2019-11-30 Slice caching method and device and storage medium

Publications (2)

Publication Number Publication Date
CN110971962A CN110971962A (en) 2020-04-07
CN110971962B true CN110971962B (en) 2022-03-22

Family

ID=70032441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911209107.6A Active CN110971962B (en) 2019-11-30 2019-11-30 Slice caching method and device and storage medium

Country Status (1)

Country Link
CN (1) CN110971962B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445727B (en) * 2020-11-27 2023-08-25 鹏城实验室 Edge cache replacement method and device based on viewport characteristics
CN114417055A (en) * 2021-12-28 2022-04-29 北京华夏电通科技股份有限公司 Video playing method and device, computer equipment and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3396639B2 (en) * 1998-09-30 2003-04-14 株式会社東芝 Hierarchical storage device and hierarchical storage control method
CN101635734A (en) * 2008-07-22 2010-01-27 上海聚力传媒技术有限公司 Method and device for storing and managing downloaded data on non-volatile storage medium
US8601216B2 (en) * 2010-08-31 2013-12-03 Oracle International Corporation Method and system for removing cache blocks
US8762479B2 (en) * 2011-06-06 2014-06-24 Cleversafe, Inc. Distributing multi-media content to a plurality of potential accessing devices
CN103150385A (en) * 2013-03-15 2013-06-12 杭州智屏软件有限公司 Real-time video recording caching technology based on memory
TWI561090B (en) * 2015-04-14 2016-12-01 Synology Inc Method for managing video recording storage space in a surveillance system, and associated apparatus
CN104967861B (en) * 2015-05-27 2019-01-22 上海赛特斯信息科技股份有限公司 Video caching system and method in CDN network
CN107430551B (en) * 2015-12-01 2020-10-23 华为技术有限公司 Data caching method, storage control device and storage equipment
CN107623709A (en) * 2016-07-15 2018-01-23 北京金山云网络技术有限公司 A kind of document down loading method and device
CN107197359B (en) * 2017-05-18 2021-01-08 百度在线网络技术(北京)有限公司 Video file caching method and device
CN108063818B (en) * 2017-12-18 2021-05-14 深圳市中科明望通信软件有限公司 Data downloading method, device, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN110971962A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
US20210160577A1 (en) Method for playing video, electronic device and storage medium
RU2632410C2 (en) Preliminary caching in cdn controlled by application
US10659504B2 (en) System and method for client-initiated playlist shuffle in a media content environment
US11496546B2 (en) File download manager
CN111246302B (en) Method, device and terminal for downloading data by browser
EP2897060B1 (en) Subtitle processing method, device and system, and storage medium
CN102843605A (en) Video play method and device thereof
CN110971962B (en) Slice caching method and device and storage medium
US20170195387A1 (en) Method and Electronic Device for Increasing Start Play Speed
CN111107438B (en) Video loading method and device and electronic equipment
CN113055451A (en) Resource downloading method and device, electronic equipment and storage medium
US20160308923A1 (en) Method and system for playing live broadcast streaming media
CN103873926A (en) Method and system for downloading and playing media file
CN109862100B (en) Method and device for pushing information
KR101595783B1 (en) SYSTEMS and METHODS for DYNAMIC DATA STORAGE
US11638046B2 (en) Intelligent download of content
CN110290396B (en) Video processing method, device, system, equipment and storage medium
CN109639813B (en) Video file transmission processing method and device, electronic equipment and storage medium
US8015295B2 (en) Communication system, communication device, program and communication method
KR102521753B1 (en) A method for playing content streamed over a network in a player on a client device
CN106375319A (en) Audio and video transcoding scheduling method, apparatus, device and system
US9092328B2 (en) Terminal capable of extending storage space and method extending storage space thereof
CN111031117B (en) Multimedia file downloading method and related device
US20190245925A1 (en) Information processing device, information processing method, program, and storage medium
CN114666627A (en) Method and device for preloading streaming media video, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant