Method and apparatus for caching media item in playback application, and device and medium

WO2025214233A1PCT designated stage Publication Date: 2025-10-16BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/086988
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-07
Filing Date
2025-04-02
Publication Date
2025-10-16

AI Technical Summary

Technical Problem

When existing media playback applications pre-download media items, the download process is prone to failure, resulting in the inability to provide visual effects that meet user expectations and the inability to flexibly select media quality suitable for client devices.

Method used

Based on the status of the client device, the quality indicators of the media items supported by the playback application are determined, and a matching target version is selected from multiple candidate versions and downloaded to the cache space for playback when the playback application is restarted.

Benefits of technology

Improves media playback stability and user experience, reduces startup latency, and ensures that high-quality media items suitable for the client device can be played directly upon restart.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025086988_16102025_PF_FP_ABST
    Figure CN2025086988_16102025_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a method and apparatus for caching a media item in a playback application, and a device and a medium. The method comprises: in response to determining that a cache space of a playback application satisfies a predetermined condition, determining a media item to be downloaded to the cache space, the cache space being used for caching a media item, and the media item being played back upon restart of the playback application; on the basis of a device state of a client device, determining a quality index of a media item supported by the playback application, and the playback application running on the client device; from among a plurality of candidate versions of the media item, selecting a target version matching the quality index; and downloading the target version to the cache space for use in playing back the target version of the media item upon restart of the playback application. According to exemplary implementations of the present disclosure, a target version that is more suitable for presentation in the playback application can be selected from among a plurality of versions of a media item on the basis of a device state.
Need to check novelty before this filing date? Find Prior Art

Description

Method, apparatus, device and medium for caching media item in a playback application

[0001] This application claims priority to the Chinese patent application No. 202410411684.8, filed on April 7, 2024, entitled “Method, apparatus, device and medium for caching media item in a playback application”, the entire content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] Exemplary implementations of the present disclosure generally relate to data caching, and in particular, to a method, apparatus, device and computer readable storage medium for caching media item in a playback application. BACKGROUND

[0003] Various media playback applications have been developed, for example, which can be utilized to play media items such as videos, audios, etc. In order to achieve better playback effect, one or more media items can be downloaded in advance so as to directly play the local media item that has been downloaded when needed. However, the downloading process is affected by various factors, which can cause the downloading process to fail and / or other problems. SUMMARY

[0004] In a first aspect of the present disclosure, a method for caching media item in a playback application is provided. In the method, in response to determining that a cache space of the playback application satisfies a predetermined condition, a media item to be downloaded to the cache space is determined, the cache space is used to cache the media item, and the media item is played in response to the playback application being restarted. Based on a device status of a client device, a quality indicator of a media item supported by the playback application is determined, the playback application is running on the client device. From a plurality of candidate versions of the media item, a target version matching the quality indicator is selected. The target version is downloaded to the cache space for playing the target version of the media item in response to the playback application being restarted.

[0005] In a second aspect of the present disclosure, an apparatus for caching media item in a playback application is provided. The apparatus comprises: a first determining module configured to determine, in response to determining that a cache space of the playback application satisfies a predetermined condition, a media item to be downloaded to the cache space, the cache space being used to cache the media item, and the media item being played in response to the playback application being restarted; a second determining module configured to determine, based on a device status of a client device, a quality indicator of a media item supported by the playback application, the playback application being running on the client device; a selecting module configured to select, from a plurality of candidate versions of the media item, a target version matching the quality indicator; and a downloading module configured to download the target version to the cache space for playing the target version of the media item in response to the playback application being restarted.

[0006] In a third aspect of the disclosure, an electronic device is provided. The electronic device includes at least one processing unit and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to the first aspect of the disclosure.

[0007] In a fourth aspect of the disclosure, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, causes the processor to implement the method according to the first aspect of the disclosure.

[0008] It is to be understood that the details set forth herein are not intended to limit the key or critical features of the implementations of the disclosure, nor are they intended to limit the scope of the disclosure. Other features of the disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0009] The above and other features, advantages and aspects of the implementations of the disclosure will become more apparent by describing in detail some implementations thereof in conjunction with the accompanying drawings, in which:

[0010] FIG. 1 shows a block diagram of a playback environment according to one example implementation of the disclosure;

[0011] FIG. 2 shows a block diagram of caching media items in a playback application according to some implementations of the disclosure;

[0012] FIG. 3 shows a block diagram of determining quality indicators supported by a playback application based on a device state according to some implementations of the disclosure;

[0013] FIG. 4 shows a block diagram of a mapping relationship according to some implementations of the disclosure;

[0014] FIG. 5 shows a flowchart of a method for caching media items in a playback application according to some implementations of the disclosure;

[0015] FIG. 6 shows a block diagram of an apparatus for caching media items in a playback application according to some implementations of the disclosure; and

[0016] FIG. 7 shows a block diagram of a device capable of implementing multiple implementations of the disclosure. DETAILED DESCRIPTION

[0017] Implementations of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings. While several implementations of the present disclosure are described, it should be understood that the present disclosure can be embodied in many other forms and should not be construed as limited to the implementations set forth herein; rather, these implementations are provided so that this disclosure will be thorough and complete, and fully convey the scope of the present disclosure to those skilled in the art. It should be understood that the drawings and implementations described are for illustrative purposes only and are not intended to limit the scope of the present disclosure.

[0018] In the description of implementations of the present disclosure, the term "includes" and its derivatives mean "including but not limited to". The term "based on" means "based at least in part on". The term "one implementation" or "the implementation" means "at least one implementation". The term "some implementations" means "at least some implementations". Other explicit or implicit definitions can also be included below. As used herein, the term "model" can represent the relationship between various data. For example, the above-mentioned relationship can be obtained based on various technical solutions known at present and / or to be developed in the future.

[0019] It can be understood that the data involved in the technical solutions of the present disclosure (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of relevant laws and regulations and relevant provisions.

[0020] It can be understood that before using the technical solutions disclosed by the embodiments of the present disclosure, the type of personal information involved in the present disclosure, the scope of use, the scene of use, etc. should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.

[0021] For example, in response to receiving the active request of the user, prompt information is sent to the user to explicitly prompt the user that the operation requested to be executed will require the acquisition and use of the personal information of the user. Thus, the user can voluntarily choose whether to provide personal information to the software or hardware such as electronic device, application program, server or storage medium, etc. that executes the operation of the technical solutions of the present disclosure according to the prompt information.

[0022] As an optional but non-limiting implementation, in response to receiving the active request of the user, the way of sending prompt information to the user, for example, can be the way of pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry selection controls for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0023] It can be understood that the above-mentioned notification and user authorization process is only illustrative, and does not limit the implementations of the present disclosure, and other ways that meet the relevant laws and regulations can also be applied to the implementations of the present disclosure.

[0024] The term "in response to" as used herein refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of the execution of a subsequent action performed in response to the event or condition is not necessarily strongly correlated with the time at which the event occurs or the condition is satisfied. For example, in some cases, the subsequent action can be performed immediately upon the occurrence of the event or the satisfaction of the condition; in other cases, the subsequent action can be performed after a period of time has elapsed since the occurrence of the event or the satisfaction of the condition.

[0025] Example environment

[0026] A variety of media playback applications have been developed, which can be used to play media items such as videos, audios, etc. To achieve better playback effect, one or more media items can be downloaded in advance so as to directly play the downloaded media items when needed. The playback application can be run at a client device, and a user can start the playback application to access media items such as videos, short videos, audios, etc. For ease of description, the application environment of the present disclosure will be described below by taking videos as an example of media items.

[0027] The application environment according to one example implementation of the present disclosure is described with reference to FIG. 1, which shows a block diagram 100 of a playback environment according to one example implementation of the present disclosure. As shown in FIG. 1, after the playback application is started, a page 110 can be presented, and the page can include media items 112 received from a server device. At the end of the viewing (and / or in other cases), the user can exit the playback application. After that, the user can restart the playback application, at which time the playback application can provide a page 120 and play a media item 122. However, due to network delay and other reasons, it can take some time to receive the media item 122 from the server device, which causes the user to have to wait.

[0028] To reduce the waiting time after startup, a technical solution of pre-downloading media items has been proposed. However, the playback application can only download the media items specified in advance. If the media items specified in advance involve a high quality index (e.g., a high-definition version), the downloading process can fail and cause the absence of the pre-downloaded local media items when the playback application is started next time, thereby still requiring the remote acquisition of the media items from the server device. If the media items specified in advance involve a low quality index (e.g., a low-definition version), the visual effect that meets the user's expectation cannot be provided. At this time, it is desirable to cache media data in the playback application in a more flexible and effective manner.

[0029] Summary of the caching process

[0030] To at least partially address the deficiencies in the prior art, according to one example implementation of the present disclosure, a method for caching media items in a playing application is proposed. An overview of one example implementation of the present disclosure is described with reference to FIG. 2, which shows a block diagram 200 for caching media items in a playing application according to some implementations of the present disclosure.

[0031] As shown in FIG. 2, a playing application can run at a client device 210, and a server device 220 can include a large number of media items. To suit for client devices with different configurations, for a certain media item, the server device 220 can provide a plurality of candidate versions with different quality indicators. For example, media item 222 can be a high definition version, media item 224 can be a low definition version, and so on. The client device 210 can interact with the server device 220, and receive media items from the server device 220. At the client device 210, a cache space 216 dedicated for playing application restart can be provided, which can be used to cache media items 218, and the media items 218 can be played in response to the playing application being restarted. In other words, after the playing application is started, the media items 218 in the cache space 216 will be played first.

[0032] According to one example implementation of the present disclosure, in response to determining that the cache space of the playing application meets a predetermined condition, a media item to be downloaded to the cache space can be determined. Here, the predetermined condition can be set by a user of the playing application, or have a default value. For example, if it is determined that the cache space 216 is empty, or the number of included media items 218 does not meet a predetermined threshold (e.g., 2 or other number), a media item to be downloaded can be determined. Further, based on the device status 212 of the client device 210, the quality indicator 214 of a media item supported by the playing application running at the client device 210 can be determined. In turn, a target version matching the quality indicator can be selected from a plurality of candidate versions of the media item. The target version (i.e., media item 218) can be downloaded to the cache space 216 for playing the target version of the media item in response to the playing application being restarted.

[0033] With the example implementation of the present disclosure, a target version more suitable for presentation in the playing application can be selected from a plurality of versions of a media item based on the device status 212 of the client device. In other words, upon the playing application being restarted, a high quality media item more suitable for the client device can be presented directly.

[0034] Details of the caching process

[0035] Having described the overview of one example implementation according to the present disclosure, more information about the caching process will be provided in the following. According to one example implementation of the present disclosure, the device status can include multiple aspects, more information is described with reference to FIG. 3. This FIG. 3 illustrates a block diagram 300 for determining a quality indicator supported by a playback application based on a device status according to some implementations of the present disclosure. As shown in FIG. 3, the device status 212 can include multiple status components, and the multiple status components can include at least any of a network status 310 of the client device, a processor status 320 of the client device, a memory status 330 of the client device, a thread status 340 in the client device, and a working status 350 of the playback application.

[0036] According to one example implementation of the present disclosure, the network status 310 of the client device can indicate, for example, available bandwidth, ideal bandwidth, occupied bandwidth, and the like. The processor status 320 of the client device can indicate, for example, available resource amount of a central processor and / or a graphic processor, busy degree, and the like. The memory status 330 of the client device can indicate available memory size, available memory proportion, and the like. The thread status 340 in the client device can indicate, for example, busy or idle status of a main thread and / or other auxiliary threads, and the working status 350 of the playback application can indicate, for example, whether the playback application is in a foreground running state, and the like. With the example implementation of the present disclosure, the multiple aspects of the client device can be fully utilized to measure the device status 212, so that the quality indicator of the selected media item is more matched to the device status, i.e., more suitable for being decoded and played at the client device.

[0037] According to one example implementation of the present disclosure, determining the quality indicator includes determining a status indicator of the client device based on the multiple status components. For ease of description, in the following, the process of determining the status indicator will be described with the network status (e.g., network speed), the processor status (e.g., CPU usage rate in percentage), the memory status (e.g., available memory amount), and the thread status (e.g., busy degree of the main thread represented by a length of a frame freezing time) as examples.

[0038] According to one example implementation of the present disclosure, in the process of determining the status indicator, the multiple status components can be converted to multiple quantized representations respectively; and the status indicator can be generated based on the multiple quantized representations. Specifically, each status component can have a respective unit, and the respective status components can be normalized to generate the corresponding quantized representations.

[0039] Specifically, the symbol a can be used to represent the network speed. The symbol b can be used to represent the CPU busy level, which can be divided into three levels, for example: 50%-100%, 10%-50%, and 0%-10% (quantized values are 0, 2, and 4, respectively, or other values). The symbol c can be used to represent the available memory, which can be divided into five levels, for example: 0-1 GB, 1-2 GB, 2-4 GB, 4-8 GB, and greater than 8 GB (quantized values are 1, 2, 3, 4, and 5, respectively, or other values). The symbol d can be used to represent the frame freezing time, which measures the main thread busy level. According to the frame freezing time per minute, there can be five levels: 0 s, 0-2 s, 2-8 s, 8-20 s, and greater than 20 s (quantized values are 0, 2, 4, 6, and 8, respectively, or other values). The symbol e can be used to represent the working state of the playback application, for example, 1 represents the foreground state and 0 represents the background state (quantized values are 0 and 1, respectively, or other values).

[0040] Further, the multiple state components can be converted to the state indicator using the following Formula 1. x = f(a, b, c, d, e) Formula 1

[0041] In Formula 1, x represents the state indicator, and a, b, c, d, and e represent the network speed, the CPU busy level, the available memory, the frame freezing time, and the working state, respectively, and f represents a function associated with a, b, c, d, and e. According to one example implementation of the present disclosure, each specific parameter in f can be determined based on a first-order function. For example, Formula 1 can be expressed as: x = a + b * 100 kb / s + c * 150 kb / s - d * 50 kb / s + e * 100 kb / s Formula 2 It should be understood that Formula 2 is merely exemplary, and alternatively and / or additionally, different coefficients (e.g., coefficients w a ,w b ,w c ,w d ,w e ) can be set for a, b, c, d, and e, respectively, to determine different formulas. It should be understood that the value of the state indicator can decrease as the frame freezing time increases, and can increase as other state components increase. With the example implementation of the present disclosure, multiple state components of the client device can be fully considered to determine the state indicator of the client device in a more accurate manner, and thus to determine the video quality supported by the playback application.

[0042] According to one example implementation of the present disclosure, the state indicator can be mapped to the quality indicator. Specifically, the device state 212 can be mapped to the quality indicator 214 based on the mapping relationship 320 shown in FIG. 3. With the example implementation of the present disclosure, the quality of the supported download can be represented in a more accurate manner. More details are described with reference to FIG. 4, which shows a block diagram 400 of a mapping relationship according to some implementations of the present disclosure. As shown in FIG. 4, the horizontal axis represents the state indicator x of the client device, and the vertical axis represents the quality indicator y of the supported media item, and there can exist a mapping relationship 410 between the two as represented by a quadratic curve. Specifically, the quality indicator can be determined based on the following equation 3: y = k2x + k1x + k0 Equation 3 2 + k1x + k0 Equation 3

[0043] In equation 3, y represents the quality indicator, x represents the state indicator, and k2, k1, k0 represent the coefficients of the variables, respectively. The above coefficients can be determined based on a variety of manners known in the past and / or to be developed in the future, thereby determining the association between the quality indicator and the state indicator. Specifically, the coefficients can have the following settings: k2 = 4.099 * 10 -9 , k1 = 0.073, and k0 = -174827.725. It should be appreciated that the above settings are merely exemplary, and alternatively and / or additionally, the coefficients can have other values different from the above settings.

[0044] It should be appreciated that although the above describes the association between the quality indicator and the state indicator with a quadratic curve. Alternatively and / or additionally, the above mapping relationship 320 can be determined based on machine learning techniques. For example, each state component can be mapped to a corresponding feature space in order to generate a corresponding feature representation (e.g., embedding). Further, a machine learning model can be generated based on a variety of network model architectures known in the past and / or to be developed in the future, and the model can be trained with historical data, thereby determining the mapping relationship.

[0045] According to one example implementation of the present disclosure, the quality indicator specifies at least one of the following: resolution, bitrate, and combination of resolution and bitrate of the target version. With the example implementation of the present disclosure, the quality of the video can be measured in a more accurate and effective manner. Specifically, the quality of the video can be measured with the video resolution, for example, the quality indicator of the video can be represented based on the following table 1.

[0046] Table 1 Example of quality indicator

[0047] Alternatively and / or additionally, the quality of the video can be measured by the bitrate of the video, for example, the quality indicator of the video can be represented based on Table 2 as follows.

[0048] Table 2 Examples of quality indicators

[0049] Alternatively and / or additionally, the quality of the video can be measured by both the resolution and the bitrate of the video, for example, the quality indicator of the video can be represented based on Table 3 as follows.

[0050] Table 3 Examples of quality indicators

[0051] According to one example implementation of the present disclosure, in the process of selecting the target version, a plurality of candidate quality indicators respectively associated with a plurality of candidate versions can be determined, and further the target quality indicator can be compared with the plurality of candidate quality indicators to select the target version. With the example implementation of the present disclosure, the process of determining the quality indicator of the target version can be converted into a simple mathematical calculation process, so as to select the target version in a more simple and effective manner.

[0052] According to one example implementation of the present disclosure, the quality indicators can be divided into levels of "low definition" (level 1), "medium definition" (level 2) and "high definition" (level N1) based on Table 1. The higher the state indicator of the client device is, the higher the supported quality indicator is. For example, assuming that the state indicator is lower than a certain lower threshold, the corresponding quality indicator can be determined as "low definition"; assuming that the state indicator is higher than a certain upper threshold, the corresponding quality indicator can be determined as "high definition"; and assuming that the state indicator is between the lower threshold and the upper threshold, the corresponding quality indicator can be determined as "medium definition".

[0053] Alternatively and / or additionally, when the quality of the video is measured by the bitrate, the bitrate supported by the playback application can be determined, and then the version close to the supported bitrate is selected from the plurality of candidate versions of the media item as the target version. For example, in the example shown in Table 3, assuming that the bitrate determined based on Formula 3 is 1100 kb / s, the version corresponding to the quality indicator "Level N3" can be selected. That is, the version of the video with the bitrate of 1200 kb / s and the resolution of 1280*720 can be selected. With the example implementation of the present disclosure, the supported video quality can be selected in a more accurate manner.

[0054] According to one example implementation of the present disclosure, a target version of a media item can be downloaded from a server device, and then the downloaded media item can be stored to a cache space. It should be appreciated that the cache space herein is not for storing content for regular play, but is dedicated for storing a media item that will be played after the next restart of the media play application. In this way, the media item can be played immediately after the next restart is completed, thereby reducing user waiting time.

[0055] According to one example implementation of the present disclosure, a target version of a media item is played in response to determining that the play application is restarted. Specifically, the media item can be decoded in real time as the media item is played. In this way, the decoding process can be performed at a decoding rate supported by the play application, thereby ensuring stability of video play.

[0056] Further, the target version is removed from the cache space in response to determining that the target version has been played. It should be appreciated that a media item in the cache space is only consumed once, and after the media item has been played, the media item can be removed from the cache space. It should be appreciated that during the play of the cached media item, the above-described process can be re-executed, i.e., the state of the client device can be determined and another media item can be downloaded from the server device for play upon the next restart of the play application.

[0057] With the example implementation of the present disclosure, a target version that is more suitable for presentation in the play application can be selected from a plurality of versions of a media item based on a device state 212 of the client device. In other words, upon restart of the play application, a media item with a high quality that is more suitable for the client device can be presented directly.

[0058] Example process

[0059] FIG. 5 illustrates a flowchart of a method 500 for caching a media item in a play application according to some implementations of the present disclosure. At block 510, in response to determining that a cache space of a play application satisfies a predetermined condition, a media item to be downloaded to the cache space is determined, the cache space is for caching media items that are played in response to the play application being restarted. At block 520, a quality indicator of a media item supported by a play application is determined based on a device state of a client device, the play application is running on the client device. At block 530, a target version that matches the quality indicator is selected from a plurality of candidate versions of the media item. At block 540, the target version is downloaded to the cache space for playing the target version of the media item in response to the play application being restarted.

[0060] According to one example implementation of the disclosure, the device state includes a plurality of state components, and the plurality of state components includes at least any of: a network state of the client device, a processor state of the client device, a memory state of the client device, a thread state in the client device, and a working state of the playback application.

[0061] According to one example implementation of the disclosure, determining the quality indicator includes: determining a state indicator of the client device based on the plurality of state components; and mapping the state indicator to the quality indicator.

[0062] According to one example implementation of the disclosure, determining the state indicator includes: converting the plurality of state components to a plurality of quantized representations, respectively; and generating the state indicator based on the plurality of quantized representations.

[0063] According to one example implementation of the disclosure, selecting the target version includes: determining a plurality of candidate quality indicators respectively associated with a plurality of candidate versions; and comparing the target quality indicator with the plurality of candidate quality indicators to select the target version.

[0064] According to one example implementation of the disclosure, the quality indicator specifies at least any of: a resolution, a code rate, and a combination of the resolution and the code rate of the target version.

[0065] According to one example implementation of the disclosure, the predetermined condition includes: a number of media items in the cache space being less than or equal to a predetermined threshold.

[0066] According to one example implementation of the disclosure, the method further includes: in response to determining that the playback application is restarted, playing the target version of the media item; and in response to determining that the target version has been played, removing the target version from the cache space.

[0067] Example apparatus and device

[0068] FIG. 6 illustrates a block diagram of an apparatus 600 for caching a media item in a playback application, according to some implementations of the disclosure. The apparatus includes a first determining module 610 configured to determine a media item to be downloaded to a cache space of a playback application in response to determining that the cache space satisfies a predetermined condition, the cache space being used to cache the media item, the media item being played in response to the playback application being restarted; a second determining module 620 configured to determine a quality indicator of the media item supported by the playback application based on a device state of a client device, the playback application running on the client device; a selecting module 630 configured to select a target version matching the quality indicator from a plurality of candidate versions of the media item; and a downloading module 640 configured to download the target version to the cache space for playing the target version of the media item in response to the playback application being restarted.

[0069] According to an example implementation of the present disclosure, the device state comprises a plurality of state components, and the plurality of state components comprises at least any one of: a network state of the client device, a processor state of the client device, a memory state of the client device, a thread state in the client device, and a working state of the playback application.

[0070] According to an example implementation of the present disclosure, the second determining module comprises: a state indicator determining module configured to determine a state indicator of the client device based on the plurality of state components; and a mapping module configured to map the state indicator to the quality indicator.

[0071] According to an example implementation of the present disclosure, the state indicator determining module comprises: a quantizing module configured to convert the plurality of state components to a plurality of quantized representations, respectively; and a generating module configured to generate the state indicator based on the plurality of quantized representations.

[0072] According to an example implementation of the present disclosure, the selecting module comprises: a candidate indicator determining module configured to determine a plurality of candidate quality indicators respectively associated with the plurality of candidate versions; and a comparing module configured to compare the target quality indicator with the plurality of candidate quality indicators to select the target version.

[0073] According to an example implementation of the present disclosure, the quality indicator specifies at least any one of: a resolution, a code rate, and a combination of the resolution and the code rate of the target version.

[0074] According to an example implementation of the present disclosure, the predetermined condition comprises: a number of media items in the cache space is less than or equal to a predetermined threshold.

[0075] According to an example implementation of the present disclosure, the apparatus further comprises: a playing module configured to play the target version of the media item in response to determining that the playback application is restarted; and a removing module configured to remove the target version from the cache space in response to determining that the target version has been played.

[0076] FIG. 7 illustrates a block diagram of a device 700 that is capable of implementing the implementations of the present disclosure. It should be understood that the computing device 700 illustrated in FIG. 7 is merely exemplary and should not be construed as limiting any of the functionality and scope of the implementations described herein. The computing device 700 illustrated in FIG. 7 can be used to implement the methods described above.

[0077] As shown in FIG. 7, computing device 700 is in the form of a general-purpose computing device. Components of computing device 700 can include, but are not limited to, one or more processors or processing units 710, a memory 720, a storage device 730, one or more communication units 740, one or more input devices 750, and one or more output devices 760. Processing unit(s) 710 can be actual or virtual processors and capable of executing various processing in accordance with programs stored in memory 720. In a multi-processing system, multiple processing units execute computer-executable instructions in parallel to improve the processing power of computing device 700.

[0078] Computing device 700 typically includes a plurality of computer storage media. Such media can be volatile and / or nonvolatile storage media and removable and / or non-removable media implemented in any method or technology for storage of information such as program modules, data, and / or data files. Memory 720 can be volatile (such as random access memory (RAM)), non-volatile (such as read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), or flash memory), or some combination of the two. Storage device 730 can be a removable or non-removable media implemented in any method or technology for storage of information such as program modules, data, and / or data files (e.g., training data for training) and can be accessed within computing device 700.

[0079] Computing device 700 can further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG. 7, a disk drive and a disk controller are provided for reading from and writing to a removable, non-removable media disk (such as a “floppy disk”), and an optical disk drive and a disk controller are provided for reading from or writing to a removable, non-removable media optical disk. In these instances, each drive can be connected to the bus (not shown) by one or more data media interfaces. Memory 720 can include a computer program product 725 having one or more program modules configured to carry out the various methods or actions of the implementations of the present disclosure.

[0080] Communication unit(s) 740 enable communication over communication media to other computing devices. Additionally, the functionality of components of computing device 700 can be implemented in a single computing cluster or a plurality of computer machines capable of communicating over a communication connection. Thus, computing device 700 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network nodes in a distributed environment.

[0081] Input device 750 can be one or more input devices, such as a mouse, a keyboard, a trackball, etc. Output device 760 can be one or more output devices, such as a display, a speaker, a printer, etc. Computing device 700 can also include, as necessary, one or more communication units 740, which can be used to communicate with one or more external devices (not shown), such as a storage device, a display device, etc., one or more devices that enable a user to interact with computing device 700, or any devices (e.g., a network card, a modem, etc.) that enable computing device 700 to communicate with one or more other computing devices. Such communication can occur via Input / Output (I / O) interface (not shown).

[0082] According to an example implementation of the present disclosure, a computer readable storage medium is provided having computer executable instructions stored thereon, where the computer executable instructions are executed by a processor to implement the method described above. According to an example implementation of the present disclosure, a computer program product is also provided that is tangibly stored on a non-transitory computer readable medium and includes computer executable instructions, where the computer executable instructions are executed by a processor to implement the method described above. According to an example implementation of the present disclosure, a computer program product is provided having a computer program stored thereon, which when executed by a processor implements the method described above.

[0083] Various aspects of the disclosure can be described in the context of flow diagrams and / or block diagrams that illustrate the functions and / or acts performed by the methods, apparatus, devices, and computer program products according to the present disclosure. It is to be understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer readable program instructions.

[0084] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flow diagrams and / or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function / act specified in the flow diagrams and / or block diagrams.

[0085] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0086] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0087] The implementations of the disclosure have been described above with the intent to be illustrative rather than limiting. Although being shown and described in terms of certain implementations and overall functions, the implementations are not intended to exclude other implementations or technologies. Modifications and changes can be made in arrangement, operation, and details of the methods and apparatus described. Many modifications and variations of the described implementations are possible and will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. None, individually or taken in any combination, is to be treated as limiting the described implementations unless otherwise indicated.

Claims

1. A method for caching media items in a playback application, comprising: In response to determining that a cache space of the playback application satisfies a predetermined condition, determining a media item to be downloaded to the cache space, the cache space being used to cache media items, the media item being played in response to the playback application being restarted; determining, based on a device state of a client device, a quality indicator of a media item supported by the playback application, the playback application running on the client device; selecting a target version matching the quality indicator from a plurality of candidate versions of the media item; as well as The target version is downloaded to the cache space for playing the target version of the media item in response to the playback application being restarted.

2. The method according to claim 1, wherein the device state includes multiple state components, and the multiple state components include at least any one of the following: the network state of the client device, the processor state of the client device, the memory state of the client device, the thread state in the client device, and the working state of the playback application.

3. The method of claim 2, wherein determining the quality indicator comprises: determining a status indicator of the client device based on the plurality of status components; as well as The status indicator is mapped to the quality indicator.

4. The method of claim 3, wherein determining the status indicator comprises: converting the plurality of state components into a plurality of quantized representations respectively; as well as The state indicator is generated based on the plurality of quantized representations.

5. The method of claim 1 , wherein selecting the target version comprises: determining a plurality of candidate quality indicators respectively associated with the plurality of candidate versions; as well as The target quality indicator is compared with the plurality of candidate quality indicators to select the target version. The method according to claim 5 , wherein the quality indicator specifies at least any one of the following: the resolution, the bit rate, and a combination of the resolution and the bit rate of the target version.

7. The method according to claim 1, wherein the predetermined condition comprises: The number of media items in the cache space is less than or equal to a predetermined threshold.

8. The method according to claim 1, further comprising: In response to determining that the playback application is restarted, playing the target version of the media item; as well as In response to determining that the target version has been played, the target version is removed from the cache space.

9. An apparatus for caching media items in a playback application, comprising: a first determining module configured to, in response to determining that a cache space of the playback application satisfies a predetermined condition, determine a media item to be downloaded to the cache space, the cache space being used to cache media items, the media item being played in response to the playback application being restarted; a second determining module configured to determine a quality indicator of a media item supported by the playback application based on a device state of a client device, the playback application running on the client device; a selection module configured to select a target version matching the quality indicator from a plurality of candidate versions of the media item; as well as A download module is configured to download the target version to the cache space, so as to play the target version of the media item in response to the playback application being restarted.

10. An electronic device comprising: at least one processing unit; as well as At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 8 when executed by the at least one processing unit.

11. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor is caused to implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Adaptive stream media playing method, apparatus, system and mobile terminal

    CN101499918A

  • Network video downloading method and apparatus, storage medium and terminal

    CN107277031A

  • Multi-screen display method and device for redirecting video

    CN108521604A

  • Video playing method, device and system

    CN109996094A

  • System and method for adjustment of video playback resolution

    US20080232763A1