Media resource downloading method and device, equipment and storage medium

Download media resources to the client device in advance through automatic appointment download, which solves the problem of media resource playback lag caused by poor network environment or high concurrent access, and achieves a stable media resource playback experience.

CN119892818APending Publication Date: 2025-04-25BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411808506.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When the network environment is poor or when the popular media resources are released, users may encounter the problem of stuttering playback of media resources.

Method used

Provides a method for downloading media resources, downloading media resources to the client device in advance through automatic appointment download, to avoid playback stuttering. The specific steps include adding the media resource to the reservation list in response to the appointment download instruction, obtaining the release status of the media resource, and obtaining the network type of the client device if the conditions are met, and sending the acquisition instruction to the server to download the media resource in the appointment list when the setting network type is met.

Benefits of technology

By automatically booking downloads, ensure that media resources are downloaded in advance on the client device, avoiding playback lags caused by poor network environment or high concurrent access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892818A_ABST
    Figure CN119892818A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and particularly provides a media resource downloading method and device, equipment and a storage medium, and the method comprises the steps: responding to an appointment downloading instruction for a to-be-downloaded media resource, and adding the to-be-downloaded media resource to an appointment list; acquiring a release state of the media resource to be downloaded; if the release state of the to-be-downloaded media resource meets a preset condition, acquiring a network type of the client device; and when the network type of the client device is a set network type, sending an acquisition instruction of the to-be-downloaded media resource to a server so as to download the to-be-downloaded media resource in the reservation list. Due to the fact that downloading appointment is conducted on the media resources to be downloaded, when the network type of the client side device meets the requirement, the media resources are automatically downloaded, automatic appointment downloading is achieved, the media resources are downloaded to the client side device in advance, and the problem that playing of the media resources is not smooth is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for downloading media resources. Background Art

[0002] When users watch media resources online, they have high requirements for the network environment. When the network environment is poor, there may be lag or failure to play. Or, when a popular media resource is released, it may cause a large number of users to access the popular media resource online at the same time in a short period of time. Due to concurrent access, the distribution efficiency may be reduced, resulting in playback lag.

[0003] How to avoid media resource playback jams has become an urgent problem to be solved. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a method, device, equipment and storage medium for downloading media resources, which can realize automatic scheduled downloading, download the media resources to the client device in advance, and avoid the problem of media resource playback jamming.

[0005] In a first aspect, the present application provides a method for downloading media resources, the method comprising: in response to a reservation download instruction for the media resources to be downloaded, adding the media resources to be downloaded to a reservation list; obtaining the publishing status of the media resources to be downloaded; if the publishing status of the media resources to be downloaded meets a preset condition, obtaining the network type of the client device; when the network type of the client device is a set network type, sending an instruction to obtain the media resources to be downloaded to a server to download the media resources to be downloaded in the reservation list.

[0006] In a second aspect, the present application provides a device for downloading media resources, which includes: a reservation adding module, which is used to add the preferred type of media resources to be downloaded to the reservation list in response to the reservation download instruction for the media resources to be downloaded; a publishing status acquisition module, which is used to obtain the publishing status of the preferred type of media resources to be downloaded; a network type acquisition module, which is used to obtain the network type of the preferred type client device if the publishing status of the preferred type of media resources to be downloaded meets the preset conditions; a resource downloading module, which is used to send an acquisition instruction for the preferred type of media resources to be downloaded to the server when the network type of the preferred type client device is the set network type, so as to download the media resources to be downloaded in the preference type reservation list.

[0007] In a third aspect, the present application provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the method for downloading media resources as described in the first aspect above.

[0008] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for downloading media resources as described in the first aspect above.

[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, implements a method for downloading media resources as described in any one of the above-mentioned first aspects.

[0010] Compared with the prior art, the technical solution provided by the embodiments of the present application has the following advantages:

[0011] The embodiment of the present application provides a method, device, equipment and storage medium for downloading media resources, the method comprising: in response to a scheduled download instruction for a media resource to be downloaded, adding the media resource to be downloaded to a scheduled list; obtaining the publishing status of the media resource to be downloaded; if the publishing status of the media resource to be downloaded meets the preset conditions, obtaining the network type of the client device; when the network type of the client device is the set network type, sending an acquisition instruction for the media resource to be downloaded to the server to download the media resource to be downloaded in the scheduled list. Since the media resource to be downloaded is scheduled for download, when the network type of the client device meets the requirements, the media resource is automatically downloaded, and automatic scheduled download is realized, and the media resource is downloaded to the client device in advance, avoiding the problem of media resource playback jams. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0013] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0014] Figure 1 A flowchart of a method for downloading media resources provided in an embodiment of the present application;

[0015] Figure 2 A schematic diagram of a switch control corresponding to the reservation function provided in an embodiment of the present application;

[0016] Figure 3 A flowchart of another method for downloading media resources provided in an embodiment of the present application;

[0017] Figure 4 A flowchart of another method for downloading media resources provided in an embodiment of the present application;

[0018] Figure 5 A flowchart of another method for downloading media resources provided in an embodiment of the present application;

[0019] Figure 6a A schematic diagram of a first application scenario of the method for downloading media resources provided in an embodiment of the present application;

[0020] Figure 6b A schematic diagram of a second application scenario of the method for downloading media resources provided in an embodiment of the present application;

[0021] Figure 6c A schematic diagram of a third application scenario of the method for downloading media resources provided in an embodiment of the present application;

[0022] Figure 6d A schematic diagram of a fourth application scenario of the method for downloading media resources provided in an embodiment of the present application;

[0023] Figure 7 A schematic diagram of the structure of a device for downloading media resources provided in an embodiment of the present application;

[0024] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0026] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.

[0027] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0028] It should be noted that the concepts such as "first" and "second" mentioned in this application 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.

[0029] It should be noted that the modifications of "one" and "plurality" mentioned in the present application 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".

[0030] The following is a detailed description of the method for downloading media resources provided by the present application in conjunction with the accompanying drawings and specific implementation methods.

[0031] Figure 1 This is a flowchart of a method for downloading media resources in an embodiment of the present application. This embodiment can be applicable to the scheduled downloading of media resources. The method can be executed by a downloading device for media resources. The downloading device for media resources can be implemented in software and / or hardware. The downloading device for media resources can be configured in a client device.

[0032] A client device is a terminal device used to access services, resources, or applications in a network environment. It can connect to the server through the network, send requests to the server, and receive responses to download media resources. Client devices may include one or more of the following: personal computers, mobile devices, smart TVs, wearable devices, Internet of Things (IoT) devices, etc.

[0033] Furthermore, the method for downloading media resources provided in the embodiments of the present application may be executed by a multimedia application installed in a client device or a browser installed in a client device.

[0034] like Figure 1 As shown, the method for downloading media resources provided in the embodiment of the present application mainly includes steps S101-S104.

[0035] S101: In response to a scheduled download instruction for a media resource to be downloaded, add the media resource to be downloaded to a scheduled list.

[0036] Media resources usually refer to various forms of content and materials used in the fields of communication, advertising, entertainment, etc. Media resources can be any form of multimedia content such as text, images, audio, video, animation, etc. Media resources are used to convey information, tell stories, express opinions or conduct marketing promotion.

[0037] Media resources to be downloaded usually refer to multimedia resources that have been determined to be downloaded but have not yet been downloaded from the server to the client device. For example, in a multimedia application, when a user browses audio and video resources, the audio and video resources that have not been downloaded locally can be called media resources to be downloaded. The above-mentioned media resources to be downloaded can be a movie resource or one or more episode resources in a film or TV series.

[0038] The scheduled download instruction can be understood as an instruction that allows the user to schedule in advance that the media to be downloaded will automatically start downloading at a certain time in the future.

[0039] In one possible implementation, for each media resource, the corresponding reservation download control is displayed in the interface of the client device. In response to the trigger operation of the reservation download control, the reservation download function for the media resource is turned on, the media resource is set as a media resource to be downloaded, and is added to the reservation list.

[0040] In one possible implementation, Figure 2 As shown, a switch control 22 corresponding to the scheduled download instruction is displayed in the to-be-downloaded media resource display page 21, and a switch control 22 corresponding to the scheduled download instruction is set for each to-be-downloaded media resource. When the switch control 22 of the to-be-downloaded media resource is in the on state, in response to the triggering operation on the switch control 22, the scheduled download function of the to-be-downloaded media resource is turned off; when the switch control 22 of the to-be-downloaded media resource is in the off state, in response to the triggering operation on the switch control 22, in response to receiving the scheduled download instruction of the to-be-downloaded media resource.

[0041] The to-be-downloaded media resources correspond to the switch controls of the scheduled download function in a one-to-one manner, and the switch operation of the scheduled download function for one of the to-be-downloaded media resources does not affect the states of the scheduled download functions of other to-be-downloaded media resources.

[0042] In another possible implementation, in response to a scheduled download instruction for a media resource to be downloaded, the media resource to be downloaded is added to a reservation list, including: in response to a scheduled download instruction for the target media content, obtaining a media resource list of the target media content; and treating the media resources in the media resource list as media resources to be downloaded and adding them to the reservation list.

[0043] The above media content refers to a resource collection composed of multiple media resources combined together. The target media content can be understood as the media content provided by the server that can enable the download reservation function. The target media content is a resource collection including multiple related media resources. For example: it can be a film and television drama including multiple episodes, or a resource collection consisting of multiple food production videos.

[0044] The above media resource list can also be called a broadcast schedule list, which is usually a pre-arranged release schedule of media resources on a radio or network platform. The media resource list lists in detail the various media resources included in the target media content, the release time of the media resources, the release time, etc.

[0045] When a reservation download instruction of the target media content is received, a media resource list of the target media content is obtained, and the media resources in the media resource list that have not been downloaded are taken as media resources to be downloaded and added to the reservation list.

[0046] In a possible implementation, when the scheduled download function of a target media content is enabled, the target media content and the media resources to be downloaded corresponding to the target media content are stored in the form of a key-value pair. Specifically, the identifier of the target media content is stored in the key, and the resource identifier of the media resources to be downloaded corresponding to the target media content is stored in the value. For example: the identifier of the target media content is TV series A, and the resource identifiers in the scheduled list are 4 and 5, then the storage format in the scheduled list is key: [TV series A]; value: [4, 5].

[0047] S102: Obtain the publishing status of the media resource to be downloaded.

[0048] The publishing status of the media resources to be downloaded includes: unpublished status and published status. Media resources in unpublished status usually refer to media resources that have been created or prepared by the server, but have not yet been officially disclosed or released to the public. For example: a movie resource that has not been launched online, a game resource that has not been launched online, or a TV series resource that has not been launched online, etc. Media resources in published status refer to multimedia resources that have been officially disclosed to the public by the server and can be accessed online, but have not yet been downloaded to the client device due to personal reasons of the user (for example: network status restrictions, storage space restrictions, etc.).

[0049] The detailed information of the media resource to be downloaded is obtained from the server or the client device locally, and the publishing status of the media resource to be downloaded is extracted from the detailed information.

[0050] S103: If the publishing status of the media resource to be downloaded meets the preset condition, obtain the network type of the client device.

[0051] The network type of the client device refers to the specific method used by the client device to access the Internet or a local area network.

[0052] Common network types include the following: Wi-Fi (wireless LAN): connect to the network through wireless signals provided by wireless routers or other wireless access points. Mobile data (cellular network): use services provided by operators to access the Internet, including 2G, 3G, 4G LTE and 5G technologies. Ethernet (wired LAN): directly connect devices to routers or switches through network cables, providing stable and fast data transmission. Fiber broadband: use optical cables to transmit data, providing extremely high download and upload rates.

[0053] Obtaining the network type of the client device includes: detecting the current network type of the client device through an API provided by the operating system.

[0054] In a possible implementation, if the publishing status of the media resource to be downloaded meets a preset condition, obtaining the network type of the client device includes: if the publishing status of the media resource to be downloaded switches from an unpublished state to a published state, obtaining the network type of the client device.

[0055] If the publishing status of the media resource to be downloaded changes from the unpublished state, a publishing notification from the server is monitored. If the publishing notification for the media resource to be downloaded sent by the server is monitored, it indicates that the unpublished media resource has been published, that is, the publishing status of the media resource to be downloaded is switched from the unpublished state to the published state.

[0056] In the embodiment of the present application, the unpublished media resources to be downloaded are added to the reservation list, and then the release notification of the media resources to be downloaded is monitored. After monitoring the release notification of the media resources to be downloaded, the network type of the client device is obtained. In this way, it can be ensured that the user can download the newly released media resources in time and enjoy a seamless service experience.

[0057] In a possible implementation, if the publishing status of the media resource to be downloaded meets a preset condition, obtaining the network type of the client device includes: if the publishing status of the media resource to be downloaded is a published state, obtaining the network type of the client device.

[0058] When the publishing status of the media resource to be downloaded is the published status, since the media resource to be downloaded has been published, the network type of the client device is obtained. In this way, the published media resource can be scheduled for download, and the media resource can be downloaded to the client device in advance to avoid the problem of media resource playback jamming.

[0059] S104: When the network type of the client device is the set network type, send an acquisition instruction of the to-be-downloaded media resources to the server to download the to-be-downloaded media resources in the reservation list.

[0060] The setting type includes wireless local area network, wireless local area network or fiber broadband. In other words, when the network type of the client device is wireless local area network, wireless local area network or fiber broadband, an acquisition instruction of the media resources to be downloaded is sent to the server to download the media resources to be downloaded in the reservation list.

[0061] When the network type of the client device is the set network type, an acquisition instruction for the media resource to be downloaded is generated. The acquisition instruction includes the resource identifier, file name, etc. of the media resource to be downloaded. The acquisition instruction can be an HTTP request, which is used to request the server to obtain the media resource corresponding to the resource identifier included in the acquisition instruction.

[0062] In a specific application scenario, when the client device is a mobile terminal, such as a mobile phone, tablet computer, smart watch, wearable device or other mobile smart terminal, and when the network type of the client device is a wireless local area network (Wi-Fi), an acquisition instruction for the media resources to be downloaded is sent to the server to download the media resources to be downloaded in the reservation list.

[0063] When the network type of the client device is mobile data, it is prohibited to send acquisition instructions for the media resources to be downloaded to the server, so as to avoid the consumption of mobile traffic and bring unnecessary expenses to the user.

[0064] In a possible implementation, after downloading the to-be-downloaded media resources in the reservation list, the method further includes: in response to a download success message of the to-be-downloaded media resources, deleting the successfully downloaded media resources from the reservation list.

[0065] The download success message can be understood as a message that the media resource to be downloaded is successfully downloaded to the client device. In response to the download success message of the media resource to be downloaded, it indicates that the media resource to be downloaded has been successfully downloaded to the client device, and it is no longer necessary to download the media resource to be downloaded. The media resource to be downloaded is deleted from the reservation list to avoid repeated downloading of the media resource.

[0066] The embodiment of the present application provides a method for downloading media resources, the method comprising: in response to a scheduled download instruction for a media resource to be downloaded, adding the media resource to be downloaded to a scheduled list; obtaining the publishing status of the media resource to be downloaded; if the publishing status of the media resource to be downloaded meets a preset condition, obtaining the network type of the client device; when the network type of the client device is a set network type, sending an acquisition instruction for the media resource to be downloaded to a server to download the media resource to be downloaded in the scheduled list. Since the media resource to be downloaded is scheduled for download, when the network type of the client device meets the requirements, the media resource is automatically downloaded, and automatic scheduled download is realized, and the media resource is downloaded to the client device in advance, avoiding the problem of media resource playback jams.

[0067] On the basis of the above-mentioned embodiments, the embodiments of the present application further optimize the method for downloading media resources, such as Figure 3 As shown, the method for downloading media resources optimized in the embodiment of the present application mainly includes steps S201-S206.

[0068] S201: In response to a scheduled download instruction for a media resource to be downloaded, add the media resource to be downloaded to a scheduled list.

[0069] S202: Obtain the publishing status of the media resource to be downloaded.

[0070] S203: If the publishing status of the to-be-downloaded media resource meets a preset condition, obtain the network type of the client device.

[0071] S201-S203 provided in the embodiment of the present application is the same as the execution process of S101-S103 provided in the above embodiment. For details, please refer to the description in the above embodiment, which will not be repeated in the embodiment of the present application.

[0072] S204: When the network type of the client device is a set network type, obtain a user's preference type, where the preference type is used to reflect attribute information of a media resource.

[0073] The preference type is used to reflect the attribute information of the media resource. The user's preference type can be understood as the user's inclination and selectivity for the attribute information of the media resource when watching the media resource. Specifically, the user's preference type may include a resolution preference. The resolution includes at least one of the following: standard definition, high definition, full high definition, 2K, 4K, 8K, etc.

[0074] The user's preference type can be determined based on the user's historical viewing data. Exemplarily, the user's historical viewing data is periodically counted, and the historical viewing data includes multiple media resources that the user has watched and the resolution values ​​of the watched media resources. For each resolution value, the ratio of the number of media resources corresponding to the resolution value to the total amount of media resources in the period is counted. If the ratio exceeds the set value, the resolution value corresponding to the ratio exceeding the set value is used as the user's resolution preference. For example: Taking the set value of 50% as an example, in the past week, the ratio of the number of 2K media resources watched by users to the total amount of media resources in the period is 70%, and the ratio exceeds the set value of 50%. Therefore, the resolution of 2K is used as the user's resolution preference.

[0075] S205: Add the preference type to the instruction for obtaining the media resource to be downloaded, and send the instruction for obtaining the media resource to be downloaded to the server.

[0076] In the embodiment of the present application, the acquisition instruction includes the resource identifier and file name of the media resource to be downloaded, and also includes the preference type. For example, when the user's preference type is 8K resolution, 8K resolution is added to the acquisition instruction of the media resource to be downloaded.

[0077] Through the network connection between the client device and the server, an acquisition instruction for the media resource to be downloaded is sent to the server.

[0078] S206: Receive the to-be-downloaded media resources that match the preference type and are fed back by the server.

[0079] After receiving the acquisition instruction sent by the client device, the server parses the resource identifier and preference type of the media resource to be downloaded from the acquisition instruction, and sends the media resource corresponding to the resource identifier and preference type to the client device, and the client device receives the media resource sent by the server. For example: the resource identifier parsed in the acquisition instruction is the 4th episode of TV series A, and the preference type is 8K, then the media resource of the 4th episode of TV series A with a resolution of 8K is sent to the client device, and the client device receives the media resource of the 4th episode of TV series A with a resolution of 8K sent by the server.

[0080] If the server parses the acquisition instruction and finds that the acquisition instruction does not include the user's preferred type, the server sends the media resource with the set resolution value to the client device, and the client device receives the media resource with the set resolution value sent by the server. Optionally, the set resolution value is the maximum resolution value.

[0081] In an embodiment of the present application, when the network type of the client device is a set network type, the media resources to be downloaded that match the user's preference type are downloaded. In this way, media resources that are more in line with the user's viewing habits can be downloaded, thereby realizing intelligent management of media resources.

[0082] On the basis of the above-mentioned embodiments, the embodiments of the present application further optimize the method for downloading media resources, such as Figure 4 As shown, the method for downloading media resources optimized in the embodiment of the present application mainly includes steps S301-S305.

[0083] S301: In response to a scheduled download instruction for a media resource to be downloaded, add the media resource to be downloaded to a scheduled list.

[0084] S302: Obtain the publishing status of the media resource to be downloaded.

[0085] S303: If the publishing status of the to-be-downloaded media resource meets a preset condition, obtain the network type of the client device.

[0086] S301-S303 provided in the embodiment of the present application is the same as the execution process of S101-S103 provided in the above embodiment. For details, please refer to the description in the above embodiment, which will not be repeated in the embodiment of the present application.

[0087] S304: When the network type of the client device is the set network type, determine whether the target application is in the foreground running state. If so, execute S305.

[0088] The target application refers to the application that performs the task of downloading the media resource to be downloaded. The foreground running state refers to the state in which the application or program interface is currently active in the screen area visible to the user and the user can directly interact with it. The target application is in the foreground running state, which usually means that the user is currently using the target application, and its window or interface will be displayed at the forefront of the screen. The user can perform various operations on the window of the target application, such as clicking buttons, dragging elements, etc.

[0089] Determining whether the target application is in the foreground running state includes: monitoring the state changes of all Activities in all applications through an interface with the operating system, and then determining whether the target application is in the foreground running state.

[0090] S305: If the target application is in the foreground running state, an instruction to obtain the media resources to be downloaded is sent to the server to download the media resources to be downloaded in the reservation list.

[0091] When the target application is in the foreground running state, an acquisition instruction for the media resource to be downloaded is generated, which includes the resource identifier, file name, etc. of the media resource to be downloaded. The acquisition instruction is used to request the server to obtain the media resource corresponding to the resource identifier included in the acquisition instruction.

[0092] Through the network connection between the client device and the server, an acquisition instruction for the media resource to be downloaded is sent to the server. After receiving the acquisition instruction sent by the client device, the server parses the resource identifier of the media resource to be downloaded from the acquisition instruction, and sends the media resource corresponding to the resource identifier to the client device. The client device receives the media resource sent by the server.

[0093] When the target application is in the foreground, the media resource download operation is performed. If the target application is in the background or exited, it is prohibited to send instructions to the server to obtain the media resources to be downloaded, so as to reduce the network bandwidth and CPU resources occupied by background downloads, which helps to ensure better performance of the foreground application.

[0094] On the basis of the above-mentioned embodiments, the embodiments of the present application further optimize the method for downloading media resources, such as Figure 5 As shown, the method for downloading media resources optimized in the embodiment of the present application mainly includes steps S401-S406.

[0095] S401: In response to a scheduled download instruction for a media resource to be downloaded, add the media resource to be downloaded to a scheduled list.

[0096] S402: Obtain the publishing status of the media resource to be downloaded.

[0097] S403: If the publishing status of the to-be-downloaded media resource meets a preset condition, obtain the network type of the client device.

[0098] S401-S403 provided in the embodiment of the present application is the same as the execution process of S101-S103 provided in the above embodiment. For details, please refer to the description in the above embodiment, which will not be repeated in the embodiment of the present application.

[0099] S404: When the network type of the client device is the set network type, obtain the required storage capacity of the media resource to be downloaded and the available storage capacity of the client device.

[0100] The required storage capacity of a media resource refers to the amount of space that the media resource needs to occupy on a storage device (such as a hard disk, solid-state drive, cloud storage, etc.). The required storage capacity of the media resource to be downloaded can be obtained from the detailed information of the media resource to be downloaded. The detailed information of the media resource to be downloaded is carried in the release notification when the server releases the media resource.

[0101] The available storage capacity of a client device refers to the actual available space on the device that can be used by users to store data (such as files, applications, media, etc.). The available storage capacity of a client device can be queried in the property information of the client device or obtained through a command line tool.

[0102] In a possible implementation, the storage capacity required for the to-be-downloaded media resource in various resolutions is obtained.

[0103] S405: Determine whether the ratio of the required storage capacity to the available storage capacity is less than a set value.

[0104] The above setting value can be set according to the actual situation, for example, the setting value is 80%. The setting type can also be set according to the actual situation.

[0105] After calculating the ratio of the required storage capacity to the available storage capacity, the ratio is compared with a set value.

[0106] S406: If the ratio is less than a set value, an acquisition instruction of the to-be-downloaded media resources is sent to the server to download the to-be-downloaded media resources in the reservation list.

[0107] If the ratio of the required storage capacity to the available storage capacity is less than the set value, it indicates that the available storage capacity of the client device meets the requirement, and an acquisition instruction for the media resources to be downloaded is sent to the server to download the media resources to be downloaded in the reservation list.

[0108] If the ratio of the required storage capacity of the media resource to be downloaded to the available storage capacity of the client device is greater than or equal to the set value, it indicates that the first prompt information is generated, and the first prompt information is used to prompt the user that the resolution of the media resource is high, which occupies a large amount of storage space, and may cause insufficient storage space of the device after downloading, so as to indicate whether to download the low-resolution media resource to be downloaded. In response to the confirmation operation on the first prompt information, an acquisition instruction of the media resource to be downloaded is sent to the server to download the media resource to be downloaded in the reservation list.

[0109] Furthermore, if the ratio of the required storage capacity of the media resource to be downloaded to the available storage capacity of the device is greater than or equal to 1, it indicates that the available storage capacity of the device is less than the required storage capacity of the media resource, and downloading of the first media resource is prohibited to avoid data loss caused by insufficient device storage space.

[0110] In the embodiment of the present application, when the available storage capacity of the client device meets the requirements, the media resources are downloaded to avoid the problem of insufficient device storage space due to the large capacity required for the media resources.

[0111] On the basis of the above-mentioned embodiment, in the embodiment of the present application, taking the publishing status of the to-be-downloaded media resource as unpublished as an example, the process of adding the to-be-downloaded media resource to the reservation list is further optimized.

[0112] When the scheduled download function is enabled for the target media content and the media resource list of the target media content includes multiple media resources in an unpublished state, the media resources to be downloaded are added to the scheduled list according to the scheduled release time of the media resources. Specifically, the media resource with the scheduled release time closest to the current time is used as the media resource to be downloaded and added to the scheduled list.

[0113] In one possible implementation, when the target application switches from background operation to foreground operation, or the scheduled download function of the target media content switches from an off state to an on state, a media resource list of the target media content is obtained, including multiple media resources in an unpublished state and the planned release time of the media resources in an unpublished state, and the media resource whose planned release time is closest to the current time is used as the media resource to be downloaded, and it is determined whether the media resource to be downloaded is in the scheduled list. If the media resource to be downloaded is not in the scheduled list, the media resource to be downloaded is added to the scheduled list; if the media resource to be downloaded is in the scheduled list, no operation is performed.

[0114] For example, if the media resource to be downloaded obtained from the media resource list is episode 4, determine whether the scheduled list contains episode 4. If the scheduled list does not contain episode 4, add episode 4 to the scheduled list. If the scheduled list contains episode 4, do not perform any operation.

[0115] In one possible implementation, when the target application switches from background operation to foreground operation, or the scheduled download function of the target media content switches from an off state to an on state, a media resource list of the target media content is obtained, including multiple media resources in an unpublished state and the planned release time of the media resources in an unpublished state. The media resource whose planned release time is closest to the current time is used as the media resource to be downloaded, and it is determined whether the media resource to be downloaded carries a deletion tag. When the media resource to be downloaded carries a deletion tag, it is prohibited to add the media resource to be downloaded to the reservation list. The above-mentioned deletion tag is used to indicate that the media resource to be downloaded has been deleted from the reservation list by the user, and the user does not need to download the media resource.

[0116] In an embodiment of the present application, the user can make settings based on the media resources in the reservation list. Specifically, in response to a delete operation on a to-be-downloaded media resource in the reservation list, the media resource is deleted from the reservation list and a deletion tag is added to the media resource.

[0117] For example: the release time of the media resources is 17:00 on August 7, 17:00 on August 8, 17:00 on August 9, and 17:00 on August 10; then, the media resource whose release time is closest to the current time is the media resource that will be released at 17:00 on August 7, and this media resource is added to the reservation list as a media resource to be downloaded. At 13:00 on August 7, in response to receiving a delete operation for the media resource corresponding to 17:00 on August 7, a deletion tag is added to the media resource. Even if the user switches the application from background operation to foreground operation at any time before 17:00 on August 7, the media resource will not be added to the reservation list because it is detected that the media resource carries a deletion tag.

[0118] In this way, it can be avoided that after the user's application is switched from background operation to foreground operation, media resources that the user does not want to download are added to the reservation list.

[0119] In this embodiment, only the media resource in the media resource list closest to the current time is scheduled for download. In response to the download success message of the media resource to be downloaded, the media resource list of the target media content is obtained again, and the media resource in the media resource list closest to the current time is obtained and added to the reservation list. According to the above process, the media resources included in the media resource list are scheduled for download in turn until all the media resources in the media resource list have been successfully downloaded, or in response to the closing operation of the reservation function of the target media content.

[0120] Furthermore, in response to a reservation closing instruction for the target media content, it is prohibited to add the media resources in the media resource list that are in an unpublished state to the reservation list, and the media resources to be downloaded that have been added to the reservation list are retained.

[0121] In the embodiment of the present application, if a closing operation of the reservation function for the target media content is received, the media resource list is no longer obtained, and the media to be downloaded is not obtained from the media resource list and added to the reservation list.

[0122] Furthermore, in response to a closing operation on the reservation function for the target media content, if there are reserved media resources to be downloaded in the reservation list, the media resources to be downloaded in the reservation list will not be deleted, and the publishing status of the media resources to be downloaded in the reservation list will continue to be monitored. When it is detected that the publishing status of the media resources to be downloaded in the reservation list meets the requirements, the network type of the terminal device is obtained.

[0123] In a possible implementation, when the target application switches from background operation or exit state to foreground operation, a media resource list corresponding to the target media content is obtained, and the number of media resources in the published state is obtained from the media resource list. When the number of media resources in the published state exceeds a set value, a download prompt message is displayed to the user, and the download prompt message is used to indicate that the user needs to download too many media resources, which may cause a device storage space alarm. In response to a confirmation operation on the prompt message, all the media resources in the published state are downloaded.

[0124] Furthermore, the download prompt information also includes a plurality of resource identifiers, and in response to a user's selection operation on a resource identifier, the media resource corresponding to the selected resource identifier is downloaded.

[0125] This can avoid the problem of insufficient device storage space due to too many media resources downloaded at one time when the user has not logged into the application for a long time.

[0126] In the embodiment of the present application, the process of adding the media resources to be downloaded to the reservation list is described in combination with a specific application scenario. The media resource list of the target media content includes media resource 1, media resource 2, media resource 3, media resource 4, media resource 5, media resource 6, media resource 7, and media resource 8. Among them, the release time of media resource 1, media resource 2, and media resource 3 is 7:00 p.m. on December 4, the release time of media resource 4 and media resource 5 is 7:00 p.m. on December 5, and the release time of media resource 6 and media resource 7 is 7:00 p.m. on December 9.

[0127] The first application scenario, such as Figure 6a As shown, on the morning of December 4, in response to the trigger operation of the reservation control 42 for the target media content, the reservation function of the target media content is turned on, and in response to the reservation instruction of the target media content, the media resource list 41 is obtained, and the media resource 1, media resource 2, and media resource 3 corresponding to the media resources in the media resource list 41 whose release time meets the preset conditions are added to the reservation list 43. If the publishing message of the media resources corresponding to media resource 1, media resource 2, and media resource 3 is monitored, the download task 44 is executed to download the media resources corresponding to media resource 1, media resource 2, and media resource 3, and then media resource 4 and media resource 5 corresponding to the media resources whose publishing time meets the preset conditions are added to the reservation list 43 from the media resource list; if the publishing message of the media resources corresponding to media resource 4 and media resource 5 is monitored, the download task 44 is executed to download the media resources corresponding to media resource 4 and media resource 5; then media resource 6 and media resource 7 corresponding to the media resources whose publishing time meets the preset conditions are added to the reservation list 43 from the media resource list 41; if the publishing message of the media resource corresponding to media resource 6 and media resource 7 is monitored, the download task 44 is executed to download the media resources corresponding to media resource 6 and media resource 7, and the cycle is repeated until the media resources corresponding to all media resources included in the media resource list corresponding to the target media content are downloaded.

[0128] The second application scenario, such as Figure 6bAs shown, on the morning of December 4, in response to the opening operation of the reservation control 42 for the target media content, the reservation function of the target media content is opened, and in response to the reservation instruction of the target media content, the media resource list 41 is obtained, and the media resources 1, media resources 2, and media resources 3 corresponding to the media resources whose release time meets the preset conditions in the media resource list 41 are added to the reservation list 43. If a closing operation for the reservation control 45 is received before the release message of the media resource corresponding to the media resource 1, the media resource corresponding to the media resource 2, and the media resource corresponding to the media resource 3 is monitored, the media resource 1, media resource 2, and media resource 3 added in the reservation list 43 are retained. When the release message of the media resource corresponding to the media resource 1, the media resource corresponding to the media resource 2, and the media resource corresponding to the media resource 3 is monitored, the download task 44 is executed to download the media resources corresponding to the media resource 1, the media resource 2, and the media resource 3, but the media resource 4, the media resource 5 and the subsequent media resources are no longer added to the reservation list.

[0129] The third application scenario, such as Figure 6c As shown, if on the morning of December 4, in response to the trigger operation of the reservation control 42 for the target media content, the reservation function of the target media content is turned on, and in response to the reservation instruction of the target media content, then the media resource list 41 is obtained, and the media resources 1, media resources 2, and media resources 3 corresponding to the media resources whose release time meets the preset conditions in the media resource list 41 are added to the reservation list 43. If the closing operation of the reservation function is received before the release message of the media resource corresponding to the media resource 1, the media resource corresponding to the media resource 2, and the media resource corresponding to the media resource 3 is monitored, the media resource 1, media resource 2, and media resource 3 added to the reservation list are retained. When the release message of the media resource corresponding to the media resource 1, the media resource corresponding to the media resource 2, and the media resource corresponding to the media resource 3 is monitored, the media resources corresponding to the media resource 1, media resource 2, and media resource 3 are downloaded, but the media resource 4, media resource 5 and subsequent media resources are no longer added to the reservation list. However, if on the morning of December 8, in response to the opening operation of the reservation control 42 for the target media content, the reservation function of the target media content is turned on, and in response to the reservation instruction of the target media content, then the media resource list 41 is obtained, and the media resources 6 and 7 corresponding to the media resources whose release time meets the preset conditions in the media resource list 41 are added to the reservation list 43. If the reservation function of the target media content is continuously turned on, the process is cycled in sequence until the media resources corresponding to all the media resources included in the media resource list corresponding to the target media content are downloaded.

[0130] The fourth application scenario, such as Figure 6dAs shown, if on the morning of December 4, in response to the opening operation of the reservation control 42 for the target media content, the reservation function of the target media content is turned on, and in response to the reservation instruction of the target media content, then the media resource list 41 is obtained, and the media resources 1, media resources 2, and media resources 3 corresponding to the media resources whose release time meets the preset conditions in the media resource list 41 are added to the reservation list 43. Then, in response to the closing instruction of the application, thereafter, the opening instruction of the application is not received for a long time. Until the morning of December 10, in response to the opening instruction of the application, the release message of the media resource corresponding to the media resource 1, the media resource corresponding to the media resource 2, and the media resource corresponding to the media resource 3 is monitored, then the download task 44 is executed to download the media resource corresponding to the media resource 1, the media resource corresponding to the media resource 2, and the media resource corresponding to the media resource 3. Then, add media resource 4, media resource 5, media resource 6 and media resource 7 to the reservation list, and monitor the release messages of the media resources corresponding to media resource 4, media resource 5, media resource 6 and media resource 7, download the media resources corresponding to media resource 4, media resource 5, media resource 6 and media resource 7, and if the media resource list 41 also includes other media resources whose release time meets the set conditions, add the media resources whose release time meets the set conditions to the reservation list according to the above steps.

[0131] Figure 7 FIG. 1 is a schematic diagram of a structure of a device for downloading media resources in an embodiment of the present application. Figure 7 As shown, the media resource downloading device 70 provided in the embodiment of the present application mainly includes: a reservation module 71, a publishing status acquisition module 72, a network type acquisition module 73 and a resource downloading module 74.

[0132] Among them, the reservation adding module 71 is used to add the media resources to be downloaded to the reservation list in response to the reservation download instruction for the media resources to be downloaded; the publishing status obtaining module 72 is used to obtain the publishing status of the media resources to be downloaded; the network type obtaining module 73 is used to obtain the network type of the client device if the publishing status of the media resources to be downloaded meets the preset conditions; the resource downloading module 74 is used to send the acquisition instruction of the media resources to be downloaded to the server when the network type of the client device is the set network type, so as to download the media resources to be downloaded in the reservation list.

[0133] The embodiment of the present application provides a device for downloading media resources, which is used to execute the following process: in response to a scheduled download instruction for a media resource to be downloaded, add the media resource to be downloaded to a scheduled list; obtain the publishing status of the media resource to be downloaded; if the publishing status of the media resource to be downloaded meets the preset conditions, obtain the network type of the client device; when the network type of the client device is the set network type, send an acquisition instruction for the media resource to be downloaded to the server to download the media resource to be downloaded in the scheduled list. Since the media resource to be downloaded is scheduled for download, when the network type of the client device meets the requirements, the media resource is automatically downloaded, and automatic scheduled download is realized, and the media resource is downloaded to the client device in advance, avoiding the problem of media resource playback jamming.

[0134] In a possible implementation, the network type acquisition module 73 is specifically configured to acquire the network type of the client device if the publishing status of the to-be-downloaded media resource is switched from an unpublished status to a published status.

[0135] In a possible implementation, the network type acquisition module 73 is specifically configured to acquire the network type of the client device if the publishing status of the to-be-downloaded media resource is the published status.

[0136] In one possible implementation, the resource download module 74 is specifically used to obtain the user's preference type, where the preference type is used to reflect the attribute information of the media resource; add the preference type to the acquisition instruction of the media resource to be downloaded, and send the acquisition instruction of the media resource to be downloaded to the server; and receive the media resource to be downloaded that matches the preference type fed back by the server.

[0137] In one possible implementation, the resource download module 74 is specifically used to obtain the required storage capacity of the media resources to be downloaded and the available storage capacity of the client device; determine whether the ratio of the required storage capacity to the available storage capacity is less than a set value; if so, send an acquisition instruction for the media resources to be downloaded to the server to download the media resources to be downloaded in the reservation list.

[0138] In a possible implementation, the method further includes: a deleting module configured to delete the successfully downloaded media resources from the reservation list in response to a download success message of the media resources to be downloaded.

[0139] In a possible implementation, the reservation adding module 71 is specifically configured to obtain a media resource list of the target media content in response to a reservation download instruction of the target media content; and to use the media resources in the media resource list as media resources to be downloaded and add them to the reservation list.

[0140] The media resource downloading device provided in the embodiment of the present application can execute the media resource downloading method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0141] Figure 8 is a schematic diagram of the structure of an electronic device provided in this embodiment. The electronic device may include a device for downloading media resources, such as Figure 8 As shown, the electronic device 800 includes a processor 810, a memory 820, an input device 830, and an output device 840; the number of the processor 810 in the electronic device can be one or more. Figure 8 A processor 810 is taken as an example; the processor 810, the memory 820, the input device 830 and the output device 840 in the electronic device can be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0142] The memory 820, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the method for downloading media resources in the embodiment of the present invention. The processor 810 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 820, that is, implements the method for downloading media resources provided in the embodiment of the present invention.

[0143] The memory 820 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the client device, etc. In addition, the memory 820 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 820 may further include a memory remotely arranged relative to the processor 810, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0144] The input device 830 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device, and may include a keyboard, a mouse, etc. The output device 840 may include a display device such as a display screen.

[0145] This embodiment also provides a storage medium containing computer executable instructions, and when the computer executable instructions are executed by a computer processor, they are used to implement the method for downloading media resources provided by the embodiment of the present invention.

[0146] Of course, the computer executable instructions of a storage medium including computer executable instructions provided by an embodiment of the present invention are not limited to the operations of the method described above, and can also execute related operations in the method for downloading media resources provided by any embodiment of the present invention.

[0147] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0148] It is worth noting that in the embodiment of the above-mentioned media resource downloading device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0149] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0150] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for downloading media resources, characterized in that: The method is applied to a client device, and the method comprises: In response to a scheduled download instruction for a media resource to be downloaded, adding the media resource to be downloaded to a scheduled list; Obtaining the publishing status of the media resource to be downloaded; If the publishing status of the to-be-downloaded media resource meets a preset condition, obtaining the network type of the client device; When the network type of the client device is the set network type, an acquisition instruction of the to-be-downloaded media resource is sent to the server to download the to-be-downloaded media resource in the reservation list.

2. The method according to claim 1, characterized in that If the publishing status of the to-be-downloaded media resource meets a preset condition, obtaining the network type of the client device includes: If the publishing state of the to-be-downloaded media resource is switched from an unpublished state to a published state, the network type of the client device is obtained.

3. The method according to claim 1, characterized in that If the publishing status of the to-be-downloaded media resource meets a preset condition, obtaining the network type of the client device includes: If the publishing status of the to-be-downloaded media resource is a published status, the network type of the client device is obtained.

4. The method according to any one of claims 1 to 3, characterized in that The step of sending the acquisition instruction of the to-be-downloaded media resource to the server to download the to-be-downloaded media resource in the reservation list includes: Acquire a user's preference type, where the preference type is used to reflect attribute information of a media resource; Adding the preference type to the acquisition instruction of the media resource to be downloaded, and sending the acquisition instruction of the media resource to be downloaded to the server; Receive the to-be-downloaded media resource matched with the preference type fed back by the server.

5. The method according to any one of claims 1 to 3, characterized in that: The step of sending the acquisition instruction of the to-be-downloaded media resource to the server to download the to-be-downloaded media resource in the reservation list includes: Determine whether a target application is in a foreground running state, wherein the target application refers to an application that executes the task of downloading the media resource to be downloaded; If the target application is in the foreground running state, an instruction to obtain the media resource to be downloaded is sent to the server to download the media resource to be downloaded in the reservation list.

6. The method according to any one of claims 1 to 3, characterized in that The step of sending the acquisition instruction of the to-be-downloaded media resource to the server to download the to-be-downloaded media resource in the reservation list includes: Obtaining the required storage capacity of the media resource to be downloaded and the available storage capacity of the client device; Determining whether the ratio of the required storage capacity to the available storage capacity is less than a set value; If yes, an instruction for obtaining the to-be-downloaded media resource is sent to the server to download the to-be-downloaded media resource in the reservation list.

7. The method according to claim 1, characterized in that After sending the instruction to obtain the media resource to be downloaded to the server, the method further includes: In response to a download success message of the to-be-downloaded media resource, the successfully downloaded media resource is deleted from the reservation list.

8. The method according to claim 1, characterized in that The step of adding the media resource to be downloaded to the reservation list in response to the reservation download instruction for the media resource to be downloaded includes: In response to a reservation download instruction for target media content, obtaining a media resource list of the target media content; The media resources in the media resource list are taken as media resources to be downloaded and added to the reservation list.

9. A device for downloading media resources, characterized in that: The device comprises: A reservation adding module, configured to add the media resource to be downloaded to a reservation list in response to a reservation download instruction for the media resource to be downloaded; A publishing status acquisition module, used to acquire the publishing status of the media resource to be downloaded; A network type acquisition module, used to acquire the network type of the client device if the publishing status of the media resource to be downloaded meets a preset condition; The resource download module is used to send an acquisition instruction of the to-be-downloaded media resource to the server when the network type of the client device is a set network type, so as to download the to-be-downloaded media resource in the reservation list.

10. An electronic device, characterized in that: The device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for downloading media resources as described in any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for downloading media resources as described in any one of claims 1 to 8 is implemented.