Video content caching method, device, equipment, medium and program product
By analyzing the additional information of the video link, it generates adaptive video preloading, which solves the problem of wasted bandwidth of preloaded video content and realizes normal video playback under less bandwidth.
Patent Information
- Application Number
- CN202311516731.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, the fixed content corresponding to the preloaded video content is fixed in size, resulting in serious bandwidth waste.
By obtaining the video link of the target video, parsing the link additional information, generating adaptive video preloads, and performing video preload caches to avoid bandwidth waste caused by fixed content occupancy.
On the premise of consuming less bandwidth, ensure the video playback speed and achieve normal playback of the target video.
Smart Images

Figure CN120017932A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a video content caching method, apparatus, device, medium, and program product. Background Art
[0002] At present, with the continuous development of short videos, short videos have become a very important part of people's lives, providing people with rich entertainment and life assistance. For video playback, the usual method is: first, set the fixed content size corresponding to the preloaded video content. Then, when the video corresponding to the preloaded video content is about to be played, play the preloaded video content first to ensure that there is no delay in starting.
[0003] However, the inventors have found that when the above method is used to play videos, the following technical problems often occur:
[0004] The fixed content size corresponding to the preloaded video content is a fixed value. The problem of the fixed content size being large may occur, resulting in serious bandwidth waste.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose video content caching methods, devices, equipment, media, and program products to solve the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a video content caching method, including: obtaining a video link corresponding to a target video; parsing link additional information corresponding to the above video link; generating a video preload amount for the above target video based on the above link additional information, wherein the above video preload amount is a cache amount for preloading and caching the target video; executing preloading of the video content corresponding to the above target video to obtain video preload content having a corresponding load amount equal to the above video preload amount; and caching the above video preload content.
[0009] Optionally, the above-mentioned link additional information includes: video initial loading content occupancy information and video bit rate; and the above-mentioned video preloading amount for the above-mentioned target video is generated based on the above-mentioned link additional information, including: generating target duration video occupancy information based on the above-mentioned video bit rate and a preset value; generating the above-mentioned video preloading amount based on the above-mentioned target duration video occupancy information and the above-mentioned video initial loading content occupancy information.
[0010] Optionally, the parsing of the link additional information corresponding to the video link includes: creating preloading task information for the video link; and performing link parsing for the video link according to the preloading task corresponding to the preloading task information to obtain the link additional information.
[0011] Optionally, the above-mentioned link additional information is generated by the following steps: performing video transcoding processing on the received target video to obtain image occupancy information corresponding to at least one target key frame image, header file occupancy information for the at least one target key frame image and the above-mentioned video bit rate; generating the above-mentioned video preliminary loaded content occupancy information based on the above-mentioned image occupancy information and the above-mentioned header file occupancy information; generating the above-mentioned link additional information based on the above-mentioned video preliminary loaded content occupancy information and the above-mentioned video bit rate.
[0012] Optionally, the method further includes: fusing the link additional information and the video loading link corresponding to the target video to generate the video link; and sending the video link to the video playback terminal.
[0013] Optionally, the method further includes: in response to detecting playback information for the target video, playing pre-cached video preloading content, and continuing to load the remaining video content to achieve video playback of the target video, wherein the remaining video content is the video content corresponding to the target video after removing the video preloading content.
[0014] In a second aspect, some embodiments of the present disclosure provide a video content caching device, comprising: an acquisition unit, configured to acquire a video link corresponding to a target video; a parsing unit, configured to parse link additional information corresponding to the above video link; a generation unit, configured to generate a video preload amount for the above target video based on the above link additional information, wherein the above video preload amount is a cache amount for preloading and caching the target video; an execution unit, configured to execute preloading of the video content corresponding to the above target video, and obtain video preload content whose corresponding load amount is the above video preload amount; and a cache unit, configured to cache the above video preload content.
[0015] Optionally, the above-mentioned link additional information includes: video initial loading content occupancy information and video bit rate; and the generation unit can be configured to: generate target duration video occupancy information according to the above-mentioned video bit rate and a preset value; generate the above-mentioned video preloading size information according to the above-mentioned target duration video occupancy information and the above-mentioned video initial loading content occupancy information.
[0016] Optionally, the parsing unit may be configured to: create preloading task information for the video link; and perform link parsing for the video link according to the preloading task corresponding to the preloading task information to obtain the link additional information.
[0017] Optionally, the above-mentioned link additional information is generated by the following steps: performing video transcoding processing on the received target video to obtain image occupancy information corresponding to at least one target key frame image, header file occupancy information for the at least one target key frame image and the above-mentioned video bit rate; generating the above-mentioned video initial loaded content occupancy information based on the above-mentioned image occupancy information and the above-mentioned header file occupancy information; generating the above-mentioned link additional information based on the above-mentioned video initial loaded content occupancy information and the above-mentioned video bit rate.
[0018] Optionally, the steps also include: the method also includes: fusing the link additional information and the video loading link corresponding to the target video to generate the video link; and sending the video link to the video playback terminal.
[0019] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0020] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0021] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner in the above-mentioned first aspect when executed by a processor.
[0022] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the video content caching method of some embodiments of the present disclosure, by adaptively preloading the target video, the normal playback of the target video can be effectively achieved under the premise of consuming less bandwidth and ensuring the start-up speed. Specifically, the reason for the serious waste of bandwidth when the relevant target video is played normally is that the fixed content occupied size corresponding to the preloaded video content is a fixed value, and the problem of large fixed content occupied size may occur, resulting in serious bandwidth waste. Based on this, the video content caching method of some embodiments of the present disclosure first obtains the video link corresponding to the target video. Here, obtaining the video link is not only used to obtain the video to be played, but also used to parse the size information of the video content to be preloaded later. Then, the link additional information corresponding to the above video link is parsed for subsequent determination of the size information of the preloaded video content. Furthermore, according to the above link additional information, the video preload amount for the above target video can be accurately generated. Among them, the above video preload amount is the cache amount for preloading the target video. Here, according to the video situation of the target video, the corresponding video preload amount can be adaptively generated, avoiding the problem of bandwidth waste caused by the fixed content size, so that the target video can be preloaded under the premise of less bandwidth in the future to ensure the normal playback of the target video. Next, the preloading of the video content corresponding to the above-mentioned target video is performed to obtain the video preload content with the corresponding loading amount as the above-mentioned video preload amount to ensure the normal playback of the subsequent target video. Finally, the above-mentioned video preload content is cached so that the subsequent playback device can obtain the video preload content that does not need to be loaded in real time to avoid the problem of slow playback speed. In summary, by linking additional information, the video preload size information for the target video can be adaptively generated, so that the normal playback of the target video can be effectively achieved under the premise of consuming less bandwidth and ensuring the playback speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0024] Figure 1 is a schematic diagram of an application scenario of a video content caching method according to some embodiments of the present disclosure;
[0025] Figure 2 is a flow chart of some embodiments of the video content caching method according to the present disclosure;
[0026] Figure 3is a schematic diagram of obtaining image occupancy information corresponding to a key frame image in some embodiments of the video content caching method disclosed herein;
[0027] Figure 4 is a schematic diagram of obtaining header file occupancy information in some embodiments of the video content caching method disclosed in the present invention;
[0028] Figure 5 is a flow chart of other embodiments of the video content caching method according to the present disclosure;
[0029] Figure 6 is a schematic diagram of the structure of some embodiments of the video content caching device according to the present disclosure;
[0030] Figure 7 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0031] Embodiments of the present disclosure will be described in more detail below 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 being limited to the embodiments set forth herein. On the contrary, 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 only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0032] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present 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.
[0034] It should be noted that the modifications of "one" and "plurality" 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, it should be understood as "one or more".
[0035] 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.
[0036] With regard to the collection, storage, and use of the information (such as linked additional information) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting information security impact assessments, fulfilling the obligation to inform the information subject, and obtaining the authorization and consent of the personal information subject in advance.
[0037] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0038] Figure 1 It is a schematic diagram of an application scenario of a video content caching method according to some embodiments of the present disclosure.
[0039] exist Figure 1 In the application scenario, first, the electronic device 101 can obtain the video link 103 corresponding to the target video 102. In this application scenario, the video link 103 can be "https: / / jvod.*** / c087325f945.mp4?preinfo=196014-2197000". Then, the electronic device 101 can parse the link additional information 104 corresponding to the above video link 103. In this application scenario, the link additional information 104 can be "preinfo=196014-2197000". Next, the electronic device 101 can generate the video preloading size information 105 for the above target video 102 according to the above link additional information 104. In this application scenario, the video preloading amount 105 can be "198726". Among them, the above video preloading amount 105 is the cache amount for preloading the target video 102. Furthermore, the electronic device 101 may perform preloading of the video content corresponding to the target video 102, and obtain the video preloading content 106 whose corresponding loading amount is the video preloading amount 105. Finally, the electronic device 101 may cache the video preloading content 106.
[0040] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0041] It should be understood that Figure 1 The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.
[0042] Continue to refer Figure 2, shows a process 200 of some embodiments of the video content caching method according to the present disclosure. The video content caching method comprises the following steps:
[0043] Step 201, obtaining a video link corresponding to a target video.
[0044] In some embodiments, the execution subject of the above-mentioned video content caching method (for example Figure 1 The electronic device 101 shown in the figure can obtain the video link corresponding to the target video through a wired connection or a wireless connection. The target video can be a video to be played. In practice, the target video can be a short video. The video link can be a download link (Uniform Resource Locator, URL) corresponding to the target video.
[0045] Step 202: parse the link additional information corresponding to the video link.
[0046] In some embodiments, the execution subject may parse the additional link information corresponding to the video link. The additional link information may be additional information included in the video link that is associated with the video loading size information. In practice, the additional link information may include: the total duration of the target video, the total size occupied by the target video, and the image position of each key frame image.
[0047] As an example, the execution subject may use a preset regularization formula to parse the link additional information corresponding to the video link. The preset regularization formula is a formula set based on the connection form of the link and used to extract the link additional information.
[0048] In some optional implementations of some embodiments, parsing the link additional information corresponding to the video link may include the following steps:
[0049] In the first step, the execution subject may create preloading task information for the video link. The preloading task information may be task information corresponding to the preloading task. In practice, the task information may be a task identifier. The preloading task may be a task related to preloading the video. In practice, the preloading task includes: a parsing task corresponding to the link additional information. The parsing task corresponding to the link additional information may be a task for parsing the link additional information from the video link.
[0050] In a second step, the execution subject may perform link resolution for the video link according to the preloading task corresponding to the preloading task information to obtain the link additional information.
[0051] As an example, the execution subject may perform link parsing for the video link according to the parsing task corresponding to the link additional information to obtain the link additional information.
[0052] In some optional implementations of some embodiments, the above-mentioned link additional information is generated by the following steps:
[0053] In the first step, the received target video is transcoded to obtain the image occupancy information corresponding to at least one target key frame image, the header file occupancy information for the at least one target key frame image, and the video bit rate. The target key frame image may be a frame image in the target video whose corresponding content is key content. Specifically, the number of images of the target key frame image included in the at least one target key frame image may be preset. Specifically, the number of images corresponding to the at least one target key frame image is "1". It should be noted that the target video includes: a key frame image sequence. The at least one target key frame image may be the first at least one image in the key frame image sequence. For example, the at least one target key frame image may be the first key frame image in the target video. The image occupancy information may be the sum of the byte sizes of the images corresponding to the target key frame images included in the at least one target key frame image. The header file occupancy information may be the total image occupancy information corresponding to at least one image before the at least one target key frame image in the mook file in the target video. For example, the target video includes an image sequence. The image sequence includes: a first image, a second image, a third image, a fourth image, a fifth image, a sixth image, and a seventh image. The at least one target key frame image is the sixth image. The header file occupancy information may be the sum of the total byte sizes of the images corresponding to the first image, the second image, the third image, the fourth image, and the fifth image. In practice, the mook file includes image offset position information corresponding to the image. The image offset position information may represent the image position of the image in the image sequence included in the target video.
[0054] In practice, first, the above-mentioned execution subject can use the target video transcoding software to generate multiple transcoded files for the target video. Then, find at least one target key frame image from the multiple transcoded files. Then, determine the image occupancy information corresponding to the at least one target key frame image. Then, obtain the image offset position information for at least one target key frame image from the mook file in the multiple transcoded files. Then, determine the header file occupancy information corresponding to the image offset position information. Then, obtain the video byte occupancy size and the total video duration corresponding to the target video from the multiple transcoded files. Finally, divide the video byte size by the video duration to obtain the video bit rate.
[0055] As an example, Figure 3As shown in FIG. 1 , a schematic diagram of obtaining image occupancy information corresponding to a key frame image is shown. Among them, the key frame image can be Figure 3 The image corresponding to the "stsz file" in the image occupancy information of the image corresponding to the "stsz file" is "64708 bytes".
[0056] As an example, Figure 4 As shown in FIG. 1 , a schematic diagram of obtaining the header file occupancy information is shown. Among them, the key frame image is Figure 3 The image corresponding to the "stsz file" in the header file can be the total image occupancy information corresponding to the image file corresponding to the "stco file" before the key frame image. The total image occupancy information can be "131306 bytes".
[0057] The second step is to generate the above-mentioned video preliminary loading content occupancy information based on the above-mentioned image occupancy information and the above-mentioned header file occupancy information.
[0058] As an example, the execution subject may add the image occupancy information and the header file occupancy information to obtain the first added information as the video initial loading content occupancy information. For example, the image occupancy information is 64708 bytes. The header file occupancy information is 131306 bytes. Then the video initial loading content occupancy information may be 196014 bytes.
[0059] The third step is to generate the above-mentioned link additional information according to the above-mentioned video preliminary loading content occupancy information and the above-mentioned video bit rate.
[0060] As an example, the execution subject may concatenate the video initial loading content occupancy information and the video bit rate to generate link additional information. For example, the video initial loading content occupancy information is 196014 bytes. The video bit rate is 2197000 kbs. Then the link additional information may be "196014-2197000".
[0061] Optionally, after the "third step", the above steps further include:
[0062] In the first step, the link additional information and the video loading link corresponding to the target video are merged to generate the video link.
[0063] As an example, the link additional information and the video loading link corresponding to the target video may be spliced to obtain a spliced link as a video link.
[0064] The second step is to send the video link to a video playback terminal. The video playback terminal may be a terminal for playing videos. For example, the video playback terminal may be a terminal for playing short videos.
[0065] Step 203: Generate a video preload amount for the target video according to the link additional information.
[0066] In some embodiments, the execution subject may generate a video preload amount for the target video according to the link additional information. The video preload amount is a cache amount for preloading the target video. That is, the video preload amount may represent the byte occupancy of the video content preloaded by the target video.
[0067] As an example, the additional information for the link includes: the size of the video occupied in bytes and the total duration of the video corresponding to the target video. First, the above-mentioned execution entity can multiply the size of the video occupied in bytes by the first ratio to obtain the multiplied occupied byte size information. Then, the corresponding frame image in the target video corresponding to the multiplied occupied bytes is determined as the first target image. Next, the total duration of the video is multiplied by the second ratio to obtain the multiplied duration ratio. Next, the corresponding frame image in the target video corresponding to the above-mentioned multiplied duration ratio is determined as the second target image. Furthermore, the image with the earliest corresponding image time is filtered out from the first target image and the second target image as the video preloading cutoff image. Finally, the image byte size information corresponding to the image sequence in the target video before the video preloading cutoff image is determined as the video preloading amount.
[0068] In some optional implementations of some embodiments, the preloading task further includes: a video preloading amount generation task. The video preloading amount generation task may be a task for generating a video preloading amount according to link additional information.
[0069] And the execution subject may utilize the video preload amount generation task to generate the video preload amount for the target video according to the link additional information.
[0070] Step 204 , executing preloading of the video content corresponding to the target video, and obtaining the video preloading content corresponding to the loading amount equal to the video preloading amount.
[0071] In some embodiments, the execution subject may preload the video content corresponding to the target video to obtain the video preload content corresponding to the video preload amount, wherein the video preload content may be a sub-video in the target video.
[0072] In some optional implementations of some embodiments, the preloading task further includes: a preloading execution task. The preloading execution task may be a task for preloading video content.
[0073] And the execution subject can use the preloading execution task to execute the preloading of the video content corresponding to the target video, and obtain the video preloading content whose corresponding loading amount is the video preloading amount information.
[0074] Step 205: cache the video preloaded content.
[0075] In some embodiments, the execution entity may cache the video preloaded content.
[0076] As an example, the above execution entity may cache the video preload content locally.
[0077] In some optional implementations of some embodiments, after step 205, the steps further include:
[0078] In response to detecting the playback information for the target video, the execution subject may play the pre-cached video preload content and continue to load the remaining video content to achieve the video playback of the target video. The remaining video content is the video content corresponding to the target video minus the video preload content.
[0079] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the video content caching method of some embodiments of the present disclosure, by adaptively preloading the target video, the normal playback of the target video can be effectively achieved under the premise of consuming less bandwidth and ensuring the start-up speed. Specifically, the reason for the serious waste of bandwidth when the relevant target video is played normally is that the fixed content occupied size corresponding to the preloaded video content is a fixed value, and the problem of large fixed content occupied size may occur, resulting in serious bandwidth waste. Based on this, the video content caching method of some embodiments of the present disclosure first obtains the video link corresponding to the target video. Here, obtaining the video link is not only used to obtain the video to be played, but also used to parse the size information of the video content to be preloaded later. Then, the link additional information corresponding to the above video link is parsed for subsequent determination of the size information of the preloaded video content. Furthermore, according to the above link additional information, the video preload amount for the above target video can be accurately generated. Among them, the above video preload amount is the cache amount for preloading the target video. Here, according to the video situation of the target video, the corresponding video preload amount can be adaptively generated, avoiding the problem of bandwidth waste caused by the fixed content size, so that the target video can be preloaded under the premise of less bandwidth in the future to ensure the normal playback of the target video. Next, the preloading of the video content corresponding to the above-mentioned target video is performed to obtain the video preload content with the corresponding loading amount as the above-mentioned video preload amount to ensure the normal playback of the subsequent target video. Finally, the above-mentioned video preload content is cached so that the subsequent playback device can obtain the video preload content that does not need to be loaded in real time to avoid the problem of slow playback speed. In summary, by linking additional information, the video preload size information for the target video can be adaptively generated, so that the normal playback of the target video can be effectively achieved under the premise of consuming less bandwidth and ensuring the playback speed.
[0080] Further references Figure 5 , shows a process 500 of another embodiment of the video content caching method according to the present disclosure. The video content caching method comprises the following steps:
[0081] Step 501, obtaining a video link corresponding to a target video.
[0082] Step 502: parse the link additional information corresponding to the video link.
[0083] Step 503: Generate target duration video occupancy information according to the above video bit rate and preset value.
[0084] In some embodiments, an execution entity (e.g. Figure 1The electronic device 101 shown can generate the target duration video occupancy information according to the above video bit rate and the preset value. The above link additional information includes: video initial loading content occupancy information and video bit rate. The video initial loading content occupancy information can be the content occupancy information of the preliminarily determined video loading content. For example, the preset value can be 80. The target duration video occupancy information can be the information occupied by the target duration video.
[0085] As an example, the execution subject may divide the video bit rate by the preset value to obtain the target duration video occupancy information.
[0086] Step 504: Generate the video preload amount according to the target duration video occupancy information and the video initial loading content occupancy information.
[0087] In some embodiments, the execution subject may generate the video preload amount according to the target duration video occupancy information and the video initial loading content occupancy information.
[0088] As an example, the execution subject may add the target duration video occupancy information and the video initial loading content occupancy information to obtain the video preloading amount.
[0089] Step 505 , executing preloading of the video content corresponding to the target video, and obtaining the video preloading content corresponding to the video size corresponding to the video preloading size information.
[0090] Step 506: cache the video preloaded content.
[0091] In some embodiments, the specific implementation of steps 501-502, 505-506 and the technical effects thereof can be referred to in Figure 2 The steps 201-202 and 204-205 in the corresponding embodiment are not described in detail here.
[0092] from Figure 5 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 5 The process 500 of the video content caching method in some corresponding embodiments can effectively achieve normal playback of the target video while ensuring no waste of bandwidth and ensuring the start-up speed by linking the video initial loading content occupancy information and video bit rate included in the additional information.
[0093] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a video content caching device. These device embodiments are similar to Figure 2Corresponding to the method embodiments shown, the video content caching device can be specifically applied to various electronic devices.
[0094] like Figure 6 As shown, a video content caching device 600 includes: an acquisition unit 601, a parsing unit 602, a generating unit 603, an executing unit 604 and a caching unit 605. The acquisition unit 601 is configured to acquire a video link corresponding to a target video; the parsing unit 602 is configured to parse the link additional information corresponding to the video link; the generating unit 603 is configured to generate a video preload amount for the target video according to the link additional information, wherein the video preload amount is a cache amount for preloading and caching the target video; the executing unit 604 is configured to execute the preloading of the video content corresponding to the target video, and obtain the video preload content corresponding to the video preload amount; the caching unit 605 is configured to cache the video preload content.
[0095] In some optional implementations of some embodiments, the above-mentioned link additional information includes: video initial loading content occupancy information and video bit rate; and the generation unit 603 can be further configured to: generate target duration video occupancy information based on the above-mentioned video bit rate and a preset value; generate the above-mentioned video preloading amount based on the above-mentioned target duration video occupancy information and the above-mentioned video initial loading content occupancy information.
[0096] In some optional implementations of some embodiments, the parsing unit 602 may be further configured to: create preloading task information for the video link; perform link parsing for the video link according to the preloading task corresponding to the preloading task information to obtain the link additional information.
[0097] In some optional implementations of some embodiments, the apparatus 600 further includes a playback unit (not shown in the figure). The playback unit may be configured to: in response to detecting playback information for the target video, play the pre-cached video preload content, and continue to load the remaining video content to achieve video playback of the target video, wherein the remaining video content is the video content corresponding to the target video minus the video preload content.
[0098] It is understandable that the units described in the video content cache device 600 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the video content caching device 600 and the units included therein, and will not be described in detail here.
[0099] Reference below Figure 7 , which shows an electronic device (eg, Figure 1 Schematic diagram of the structure of the electronic device 101)700. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0100] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory 702 or a program loaded from a storage device 708 into a random access memory 703. Various programs and data required for the operation of the electronic device 700 are also stored in the random access memory 703. The processing device 701, the read-only memory 702, and the random access memory 703 are connected to each other via a bus 704. An input / output interface 705 is also connected to the bus 704.
[0101] Typically, the following devices may be connected to the input / output interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0102] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be loaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a read-only memory 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0103] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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 some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This 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. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit 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 of the above.
[0104] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may 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 future developed network.
[0105] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. 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 the video link corresponding to the target video; parses the link additional information corresponding to the video link; generates a video preload amount for the target video according to the link additional information, wherein the video preload amount is the cache amount for preloading the target video; performs preloading of the video content corresponding to the target video, and obtains the video preload content corresponding to the video preload amount; and caches the video preload content.
[0106] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including 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 separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0107] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart 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.
[0108] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be provided in a processor, for example, may be described as: a processor including an acquisition unit, a parsing unit, a generation unit, an execution unit, and a cache unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the acquisition unit may also be described as a "unit for acquiring a video link corresponding to a target video".
[0109] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, 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 chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0110] Some embodiments of the present disclosure further provide a computer program product, including a computer program, which implements any of the above-mentioned video content caching methods when executed by a processor.
[0111] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A video content caching method, comprising: Get the video link corresponding to the target video; Parsing the link additional information corresponding to the video link; Generate a video preload amount for the target video according to the link additional information, wherein the video preload amount is a cache amount for preloading the target video; Execute preloading of video content corresponding to the target video to obtain video preloading content corresponding to a loading amount equal to the video preloading amount; The video preloaded content is cached.
2. The method according to claim 1, wherein: The link additional information includes: video initial loading content occupancy information and video bit rate; and The step of generating a video preload amount for the target video according to the link additional information includes: Generate target duration video occupancy information according to the video bit rate and a preset value; The video preload amount is generated according to the target duration video occupancy information and the video initial loading content occupancy information.
3. The method according to claim 1, wherein: The parsing of the link additional information corresponding to the video link includes: Creating preloading task information for the video link; According to the preloading task corresponding to the preloading task information, link parsing is performed for the video link to obtain the link additional information.
4. The method according to claim 2, wherein: The link additional information is generated by the following steps: Performing video transcoding processing on the received target video to obtain image occupancy information corresponding to at least one target key frame image, header file occupancy information for the at least one target key frame image, and the video bit rate; Generate the video preliminary loading content occupancy information according to the image occupancy information and the header file occupancy information; The link additional information is generated according to the video initial loading content occupancy information and the video bit rate.
5. The method according to claim 4, further comprising: Merging the link additional information and the video loading link corresponding to the target video to generate the video link; The video link is sent to the video playback terminal.
6. The method according to claim 1, further comprising: In response to detecting playback information for the target video, pre-cached video preloaded content is played, and loading of remaining video content is continued to achieve video playback of the target video, wherein the remaining video content is the video content corresponding to the target video after removing the video preloaded content.
7. A video content caching device, comprising: An acquisition unit, configured to acquire a video link corresponding to a target video; A parsing unit, configured to parse the link additional information corresponding to the video link; A generating unit is configured to generate a video preloading amount for the target video according to the link additional information, wherein the video preloading amount is a cache amount for preloading the target video; An execution unit is configured to execute preloading of the video content corresponding to the target video, and obtain video preloading content whose corresponding loading amount is the video preloading amount; The cache unit is configured to cache the video preloaded content.
8. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.