Methods, devices, electronic equipment, and storage media for processing media resources

By setting up popularity prediction models at different stages of media resources, predicting future popularity and cleaning up related resources, the problem of wasted storage of media resources with short upload times but declining popularity is solved, and efficient utilization of storage resources is achieved.

CN116304174BActive Publication Date: 2026-03-31BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-05
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies cannot effectively identify and clean up media resources that have been uploaded for a short time but whose popularity has dropped significantly, resulting in a waste of storage resources.

Method used

By setting corresponding popularity prediction models for different resource stages of media resources, the future popularity value is predicted, and when the predicted popularity value is lower than the threshold, the associated media resources, including copies and transcoded files, are cleaned up.

Benefits of technology

Timely identification and removal of obscure media resources can reduce storage costs, conserve storage resources, and significantly reduce storage space usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116304174B_ABST
    Figure CN116304174B_ABST
Patent Text Reader

Abstract

The application relates to a media resource processing method and device, electronic equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: determining a resource stage of a media resource according to an uploaded time length of the media resource, and predicting a heat value of the media resource in a future time period through a heat prediction model corresponding to the resource stage; and if the heat value of the media resource in the future time period is less than a threshold value corresponding to the resource stage, cleaning up associated media resources of the media resource. In the above method, since each resource stage corresponds to a heat prediction model, the heat value of the media resource in the future time period is predicted through the corresponding heat prediction model according to different resource stages of the media resource, so that the media resource with a greatly decreased heat value in the future time period can be identified in a timely manner, and the associated media resources of the media resource can be cleaned up in a timely manner, thereby reducing the storage cost and saving the storage resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for processing media resources. Background Technology

[0002] After media resources are uploaded, their associated media resources are stored in the storage system. For example, if the media resource is a video, its associated media resources include video copies and transcoded files. Over time, the popularity of a media resource may decrease, making it a less popular media resource. However, the associated media resources of these less popular media resources will still be stored in the storage system, consuming a significant amount of storage resources.

[0003] In related technologies, a popularity prediction model is used to predict the popularity value of media resources over a period of time, and based on the predicted popularity value, it is determined whether the media resource is a niche media resource. If the media resource is a niche media resource, its associated media resources are cleaned up.

[0004] However, the above method can only determine whether media resources with a long upload time are unpopular. For media resources with a short upload time, even if the popularity of these media resources has dropped significantly, the associated media resources are still stored in the storage system, resulting in a waste of storage resources. Summary of the Invention

[0005] This application provides a method, apparatus, electronic device, and storage medium for processing media resources, which can promptly identify media resources whose popularity value will drop significantly in the future, thereby cleaning up their associated media resources, reducing storage costs, and saving storage resources. The technical solution of this application is as follows.

[0006] According to a first aspect of the embodiments of this application, a method for processing media resources is provided, the method comprising:

[0007] If the uploaded duration of the target media resource reaches the target duration, determine the target resource stage in which the target media resource is located. The target resource stage indicates the uploaded duration of the target media resource.

[0008] Based on the popularity prediction model corresponding to the target resource stage, the predicted popularity value of the target media resource in the future time period is determined. The popularity prediction model corresponding to the target resource stage is trained based on the sample media resources in the target resource stage and the labeled popularity value. The predicted popularity value indicates the popularity of the target media resource in the future time period.

[0009] If the predicted popularity value is less than the threshold corresponding to the target resource stage, the associated media resources of the target media resource will be cleaned up.

[0010] In the above method, since each resource stage corresponds to a popularity prediction model, the popularity value of the media resource in the future time period is predicted by the corresponding popularity prediction model for different resource stages. This can identify media resources whose popularity value drops significantly in the future time period in a timely manner, thereby enabling timely cleaning of their associated media resources, reducing storage costs, and saving storage resources.

[0011] In one possible implementation, the prediction model based on the popularity prediction of the target resource at a given stage determines the predicted popularity value of the target media resource over a future time period, including:

[0012] The target media resource and its actual popularity value over a historical time period are input into the popularity prediction model corresponding to that period. The target features of the target media resource are extracted through the popularity prediction model corresponding to that period. Based on the target features, the popularity value of the target media resource in the future time period is predicted to obtain the predicted popularity value. The target features include the popularity value trajectory features of the target media resource, the features of the object that uploaded the target media resource, and the resource features of the target media resource.

[0013] In the above method, since each resource stage corresponds to a popularity prediction model, it is possible to identify media resources whose popularity value drops significantly in the future.

[0014] In one possible implementation, the method further includes:

[0015] The sample media resources in the target resource stage and the actual popularity values ​​of each sample media resource in the historical time period are input into the popularity prediction model corresponding to the target resource stage. Through the popularity prediction model corresponding to the target resource stage, the predicted popularity value of each sample media resource in the future time period is determined.

[0016] Based on multiple target thresholds and the predicted popularity values ​​of each sample media resource, a return parameter corresponding to each target threshold is determined. This return parameter indicates the return obtained by cleaning up the associated media resources of sample media resources whose predicted popularity values ​​are less than the target threshold at the target resource stage.

[0017] The threshold corresponding to the target resource stage is determined based on the maximum return parameter among the return parameters corresponding to each target threshold.

[0018] In the above method, the target threshold corresponding to the maximum return parameter is used as the threshold corresponding to the resource stage. When cleaning up associated media resources based on this threshold, storage costs can be effectively reduced and resources can be saved.

[0019] In one possible implementation, the method of determining the return parameter corresponding to each target threshold based on multiple target thresholds and the predicted popularity value of each sample media resource includes:

[0020] Based on the target threshold, storage unit price, predicted popularity value of each sample media resource, and the size of associated media resources of each sample media resource, the storage revenue corresponding to the target threshold is determined. The storage unit price indicates the resources consumed per unit of storage time for each media resource. The storage revenue indicates the resources saved if associated media resources of sample media resources with predicted popularity values ​​less than the target threshold are cleaned up during the target resource stage.

[0021] Based on the target threshold, bandwidth unit price, predicted popularity value of each sample media resource, and labeled popularity value of each sample media resource, the bandwidth cost corresponding to the target threshold is determined. The bandwidth unit price indicates the resources consumed in transmitting a unit of media resource per unit time. The bandwidth cost indicates the resources consumed in transmitting associated media resources of sample media resources with predicted popularity values ​​less than the target threshold during the target resource stage.

[0022] The return parameter corresponding to the target threshold is determined based on the ratio between the storage revenue and the bandwidth cost.

[0023] In the above method, the return parameter is determined by the ratio of storage revenue to bandwidth cost. When cleaning up associated media resources based on this threshold, the storage revenue can be greatly increased while ensuring that the bandwidth cost is small, thereby effectively reducing storage costs and saving resources.

[0024] In one possible implementation, if the predicted popularity value is less than the threshold corresponding to the target resource stage, the associated media resources of the target media resource are cleaned up, including at least one of the following:

[0025] If the predicted popularity value is less than the threshold corresponding to the target resource stage, delete the first number of copies of the target media resource.

[0026] If the predicted popularity value is less than the threshold corresponding to the target resource stage, delete a second number of transcoded files of the target media resource.

[0027] In the above method, if the predicted popularity value is less than the threshold corresponding to the target resource stage, deleting at least one of the copies of the target media resource and the transcoded files can release storage resources and save storage costs.

[0028] In one possible implementation, the method further includes:

[0029] Based on the changing trends of the actual popularity values ​​of multiple sample media resources over a historical period, the historical period is divided into segments. Based on the segmented historical period, multiple resource stages are determined, with different resource stages indicating different uploaded durations of the media resources.

[0030] Among them, the changing trend of the real popularity value of sample media resources in the same resource stage meets the first objective condition.

[0031] The above method divides resources into stages based on the changing trend of the actual popularity value of sample media resources over historical time periods. In other words, it divides resources into stages based on the popularity distribution of sample media resources in different time periods. Since the popularity distribution of sample media resources varies greatly in different time periods, dividing resources into stages based on popularity distribution can reasonably reflect the time nodes of popularity changes of sample media resources. Furthermore, by predicting the popularity value at the time nodes of popularity changes, unpopular media resources can be identified in a timely manner.

[0032] In one possible implementation, the method further includes:

[0033] Based on the business types corresponding to multiple sample media resources and the changing trends of the actual popularity values ​​of these multiple sample media resources in historical time periods, the historical time period is divided. Based on the divided historical time period, multiple resource stages corresponding to each business type are determined. Different resource stages under the same business type indicate different uploaded durations of media resources belonging to the same business type.

[0034] Among them, the changing trend of the real popularity value of sample media resources under the same business type and at the same resource stage meets the second objective condition.

[0035] The above method identifies different resource stages for different business types, which can more flexibly adapt to the changing characteristics of media resource popularity values ​​under different business types, making the cleanup of related media resources of unpopular media resources more reasonable and effective.

[0036] According to a second aspect of the embodiments of this application, a media resource processing apparatus is provided, the apparatus comprising:

[0037] The determining unit is configured to determine the target resource stage in which the target media resource is located when the uploaded duration of the target media resource reaches the target duration, wherein the target resource stage indicates the uploaded duration of the target media resource.

[0038] The prediction unit is configured to execute a popularity prediction model based on the target resource stage to determine the predicted popularity value of the target media resource in a future time period. The popularity prediction model corresponding to the target resource stage is trained based on sample media resources in the target resource stage and labeled popularity values. The predicted popularity value indicates the popularity of the target media resource in a future time period.

[0039] The cleanup unit is configured to clean up the associated media resources of the target media resource when the predicted popularity value is less than the threshold corresponding to the target resource stage.

[0040] In one possible implementation, the prediction unit is configured to perform:

[0041] The target media resource and its actual popularity value over a historical time period are input into the popularity prediction model corresponding to the target resource stage. The target features of the target media resource are extracted through the popularity prediction model corresponding to the target resource stage. Based on the target features, the popularity value of the target media resource in the future time period is predicted to obtain the predicted popularity value. The target features include the popularity value trajectory features of the target media resource, the features of the object that uploaded the target media resource, and the resource features of the target media resource.

[0042] In one possible implementation, the device further includes:

[0043] The prediction subunit is configured to input multiple sample media resources in the target resource stage and the actual popularity values ​​of each sample media resource in the historical time period into the popularity prediction model corresponding to the target resource stage, and determine the predicted popularity value of each sample media resource in the future time period through the popularity prediction model corresponding to the target resource stage.

[0044] The reward parameter determination subunit is configured to perform a task based on multiple target thresholds and the predicted popularity value of each sample media resource, and to determine the reward parameter corresponding to each target threshold. The reward parameter indicates the reward obtained by cleaning up the associated media resources of sample media resources whose predicted popularity value is less than the target threshold in the target resource stage.

[0045] The threshold determination subunit is configured to determine the threshold corresponding to the target resource stage by performing the maximum return parameter among the return parameters corresponding to each target threshold.

[0046] In one possible implementation, the reward parameter determines that the subunit is configured to perform:

[0047] Based on the target threshold, storage unit price, predicted popularity value of each sample media resource, and the size of associated media resources of each sample media resource, the storage revenue corresponding to the target threshold is determined. The storage unit price indicates the resources consumed per unit of storage time for each media resource. The storage revenue indicates the resources saved if associated media resources of sample media resources with predicted popularity values ​​less than the target threshold are cleaned up during the target resource stage.

[0048] Based on the target threshold, bandwidth unit price, predicted popularity value of each sample media resource, and labeled popularity value of each sample media resource, the bandwidth cost corresponding to the target threshold is determined. The bandwidth unit price indicates the resources consumed in transmitting a unit of media resource per unit time. The bandwidth cost indicates the resources consumed in transmitting associated media resources of sample media resources with predicted popularity values ​​less than the target threshold during the target resource stage.

[0049] The return parameter corresponding to the target threshold is determined based on the ratio between the storage revenue and the bandwidth cost.

[0050] In one possible implementation, the cleaning unit is configured to perform at least one of the following:

[0051] If the predicted popularity value is less than the threshold corresponding to the target resource stage, delete the first number of copies of the target media resource.

[0052] If the predicted popularity value is less than the threshold corresponding to the target resource stage, delete a second number of transcoded files of the target media resource.

[0053] In one possible implementation, the apparatus further includes a resource stage determination unit configured to perform:

[0054] Based on the changing trends of the actual popularity values ​​of multiple sample media resources over a historical period, the historical period is divided into segments. Based on the segmented historical period, multiple resource stages are determined, with different resource stages indicating different uploaded durations of the media resources.

[0055] Among them, the changing trend of the real popularity value of sample media resources in the same resource stage meets the first objective condition.

[0056] In one possible implementation, the apparatus further includes a resource stage determination unit configured to perform:

[0057] Based on the business types corresponding to multiple sample media resources and the changing trends of the actual popularity values ​​of these multiple sample media resources in historical time periods, the historical time period is divided. Based on the divided historical time period, multiple resource stages corresponding to each business type are determined. Different resource stages under the same business type indicate different uploaded durations of media resources belonging to the same business type.

[0058] Among them, the changing trend of the real popularity value of sample media resources under the same business type and at the same resource stage meets the second objective condition.

[0059] According to a third aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising:

[0060] One or more processors;

[0061] Memory used to store the executable program code of the processor;

[0062] The processor is configured to execute the program code to implement the aforementioned media resource processing method.

[0063] According to a fourth aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium comprising: when program code in the computer-readable storage medium is executed by a processor of an electronic device, enabling the electronic device to perform the above-described media resource processing method.

[0064] According to a fifth aspect of the embodiments of this application, a computer program product is provided, including one or more lines of program code, which are executed by one or more processors of an electronic device, enabling the electronic device to perform the aforementioned media resource processing method.

[0065] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0066] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application, and do not constitute an undue limitation of this application.

[0067] Figure 1 This is a schematic diagram illustrating the implementation environment of a media resource processing method provided in this application embodiment;

[0068] Figure 2 This is a flowchart of a media resource processing method provided in an embodiment of this application;

[0069] Figure 3This is a schematic diagram of a media resource processing method provided in an embodiment of this application;

[0070] Figure 4 This is a flowchart of a training method for a popularity prediction model provided in an embodiment of this application;

[0071] Figure 5 This is a flowchart of a method for determining a threshold corresponding to a target resource stage, provided in an embodiment of this application;

[0072] Figure 6 This is a schematic diagram of a media resource processing method provided in an embodiment of this application;

[0073] Figure 7 This is a block diagram of a media resource processing apparatus provided in an embodiment of this application;

[0074] Figure 8 This is a block diagram of a server provided in an embodiment of this application. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0076] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods and systems consistent with some aspects of this application as detailed in the appended claims.

[0077] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or execution order. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms.

[0078] These terms are simply used to distinguish one element from another. For example, without departing from the scope of various examples, the first business can be referred to as the second business, and similarly, the second business can be referred to as the first business.

[0079] "At least one" refers to one or more transcoded files. For example, at least one transcoded file can be one transcoded file, two transcoded files, three transcoded files, or any integer greater than or equal to one transcoded file. "Multiple" means two or more transcoded files. For example, multiple transcoded files can be two transcoded files, three transcoded files, or any integer greater than or equal to two transcoded files.

[0080] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the media resources involved in this application were obtained with full authorization.

[0081] The implementation environment of the embodiments of this application is described below.

[0082] Figure 1 This is a schematic diagram illustrating the implementation environment of a media resource processing method provided in this application embodiment, such as... Figure 1 As shown, the implementation environment includes a terminal 101 and a server 102. The terminal 101 can connect to the server 102 via a wireless network or a wired network.

[0083] Terminal 101 can be at least one of the following devices: smartphone, smartwatch, desktop computer, laptop, virtual reality terminal, augmented reality terminal, wireless terminal, and laptop computer. Terminal 101 has communication functions and can access the Internet. Terminal 101 can refer to one of multiple terminals; this embodiment only uses terminal 101 as an example. Those skilled in the art will understand that the number of terminals can be more or less. Indicatively, terminal 101 can install and run an application program that provides a media resource uploading function. Users can upload media resources through this application to publish them, making them accessible to other users. For example, media resources can be videos, pictures, and articles, etc., without limitation. The application can be a short video application, a social application, a conferencing application, a media resource management application, etc., without limitation.

[0084] Server 102 can be a standalone physical server, a server cluster consisting of multiple physical servers, or a distributed file system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Server 102 provides background services for applications running on terminal 101, such as storing media resources uploaded through terminal 101, predicting the popularity of media resources over future time periods, and cleaning up associated media resources. In some embodiments, server 102 is associated with a media resource storage system used to store media resources uploaded from terminal 101 to server 102. For example, taking video as an example, the media resource storage system is a short video distributed storage system (Blob Store).

[0085] In some embodiments, the wired or wireless network uses standard communication technologies and / or protocols. The network is typically the Internet, but can be any network, including but not limited to Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats, including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0086] The above describes the implementation environment of a media resource processing method provided by the embodiments of this application. The following describes the flow of the media resource processing method provided by the embodiments of this application. Figure 2This is a flowchart of a media resource processing method provided in an embodiment of this application, such as... Figure 2 As shown, taking the method executed by the aforementioned server as an example, it includes the following steps 201 to 203.

[0087] In step 201, when the uploaded duration of the target media resource reaches the target duration, the server determines the target resource stage in which the target media resource is located. The target resource stage indicates the uploaded duration of the target media resource.

[0088] Media resources include, but are not limited to, videos, audio, and images. Videos can be TV series, movies, open courses, etc.; audio can be audiobooks, songs, etc.; and images can be photos of people, landscapes, etc. The target media resource refers to any media resource stored on the server. Of course, the target media resource can also be any media resource stored in a media resource storage system; there is no limitation on this.

[0089] The uploaded duration of a target media resource refers to the time elapsed from the time the target media resource was uploaded to the server to the current time. Illustratively, different uploaded durations of a target media resource correspond to different resource stages. A resource stage can be understood as multiple time periods obtained by dividing the lifecycle of a media resource. Each time period can also be understood as an age group of the media resource. The method for dividing resource stages will be described in subsequent embodiments and will not be repeated here. For example, taking video as an example, if video A has been uploaded for 7 days, reaching the first duration corresponding to the first resource stage, then video A can be considered to be in the first resource stage. If video B has been uploaded for 15 days, reaching the second duration corresponding to the second resource stage, then video B can be considered to be in the second resource stage, and so on. Furthermore, the uploaded duration can be determined by hours, days, weeks, etc., which is not limited in this embodiment.

[0090] In step 202, the server determines the predicted popularity value of the target media resource in the future time period based on the popularity prediction model corresponding to the target resource stage.

[0091] The predicted popularity value indicates the popularity of a target media resource in the future. For example, the future time period refers to the next 30 days, and the target resource stage indicates that the media resource has been uploaded for 7 days. Then, the predicted popularity value of the target media resource is the popularity value of the target media resource during the 7th to 37th day after its upload.

[0092] Different resource stages correspond to different popularity prediction models. The popularity prediction model corresponding to the target resource stage is trained based on the sample media resources and labeled popularity values ​​in that target resource stage. The training process of the popularity prediction model will be introduced in subsequent embodiments and will not be repeated here.

[0093] The process by which the server determines the predicted popularity value of a target media resource in a future time period based on the popularity prediction model corresponding to the target resource stage includes: inputting the target media resource and its actual popularity value in a historical time period into the popularity prediction model corresponding to the target resource stage; extracting the target features of the target media resource through the popularity prediction model corresponding to the target resource stage; and predicting the popularity value of the target media resource in a future time period based on the target features, thereby obtaining the predicted popularity value of the target media resource in the future time period.

[0094] The true popularity value of a target media resource over a historical period refers to the popularity value from the time the target media resource was uploaded to the server until the current time. For example, if the target media resource has been uploaded for 7 days, the true popularity value of the target media resource over a historical period includes the popularity value from day 0 to day 1 of the upload, the popularity value from day 0 to day 2 of the upload, the popularity value from day 0 to day 7 of the upload, and so on.

[0095] In some embodiments, the true popularity value is determined through at least one interaction metric, such as views, clicks, likes, favorites, and comments, without limitation. Taking video as an example, video interaction metrics include views, playback duration, likes, and favorites. The true popularity value of a target media resource can be determined by a single interaction metric or by a weighted sum of multiple interaction metrics. Determining the true popularity value based on multiple interaction metrics provides a more comprehensive reflection of the target media resource's popularity over a historical period compared to determining it based on a single interaction metric.

[0096] The target features include the popularity trajectory of the target media resource, the characteristics of the object that uploaded the target media resource, and the resource features of the target media resource. Specifically, the popularity trajectory indicates the trend of the target media resource's actual popularity over a historical period; the characteristics of the object that uploaded the target media resource include the upload duration and actual popularity of other media resources uploaded by that object, and the number of objects following the object that uploaded the target media resource; the resource features of the target media resource include its category, upload duration, and interaction metrics such as views, likes, and favorites.

[0097] In some embodiments, the target features extracted by the popularity prediction model for the target media resources are long-term and short-term features. That is, the longer the target duration corresponding to the target resource stage, the longer the time period corresponding to the target features extracted by the popularity prediction model. For example, if the first duration corresponding to the first resource stage is 7 days, the time period corresponding to the target features extracted by the popularity prediction model for the first resource stage can be 3 days, meaning the extracted target features are the features of the target media resource in the previous 3 days at the current time. If the second duration corresponding to the second resource stage is 30 days, the time period corresponding to the target features extracted by the popularity prediction model for the second resource stage can be 7 days, meaning the extracted target features are the features of the target media resource in the previous 7 days at the current time. In other words, since the first duration is longer than the second duration, the time period corresponding to the target features extracted in the second resource stage is longer than the time period corresponding to the target features extracted in the first resource stage. In the above method, the target features extracted by the popularity prediction model for the target media resources are long-term and short-term features, which can adapt to different resource stages, thereby making the prediction results of the popularity prediction model more accurate.

[0098] In step 203, if the predicted popularity value is less than the threshold corresponding to the target resource stage, the server cleans up the associated media resources of the target media resource.

[0099] The threshold corresponding to the target resource stage is used to determine whether a media resource in that stage is considered unpopular. Different resource stages correspond to different thresholds. If the popularity value of a media resource in the future is lower than the threshold corresponding to its resource stage, it can be determined that the popularity value of the media resource in the future has dropped significantly, meaning that the media resource is considered unpopular. Associated media resources include a copy of the target media resource and its transcoded file. Different transcoded files correspond to different transcoding levels. Taking video as an example, the transcoding level indicates the encoding method and resolution of the transcoded file, including the following transcoding levels: the first transcoding level corresponds to h264 video encoding and a resolution of 540p; the second transcoding level corresponds to h264 video encoding and a resolution of 720p; and the third transcoding level corresponds to h265 video encoding and a resolution of 720p.

[0100] In some embodiments, when the predicted popularity value is less than the threshold corresponding to the target resource stage, the process of cleaning up the associated media resources of the target media resource includes at least one of the following cleaning methods.

[0101] Method 1 involves deleting the first number of copies of the target media resource if the predicted popularity value is less than the threshold corresponding to the target resource's stage. This method essentially changes the storage mode of the target media resource's associated media resources from standard storage to low-frequency storage.

[0102] In this context, standard storage refers to storing four copies of a media resource, which meets higher levels of data security requirements and offers higher data reliability. Low-frequency storage refers to storing two copies of a media resource, which meets lower levels of data security requirements, but offers lower data reliability than standard storage. Switching from standard storage to low-frequency storage involves deleting two copies of the media resource, with the first copy being two. In the above embodiment, by deleting copies of the media resource, the storage mode of the associated media resources of the target media resource is changed from standard storage to low-frequency storage. While meeting the data security requirements of less popular media resources, the storage space occupied is reduced to 50% of the original, saving storage resources.

[0103] It should be noted that the above embodiments are described with a first quantity of 2. In some embodiments, the first quantity can be customized according to the actual situation, and this application embodiment does not limit this.

[0104] Method 2: If the predicted popularity value is less than the threshold corresponding to the target resource stage, delete the second number of transcoded files of the target media resource.

[0105] Different transcoding files correspond to different transcoding levels, which indicate the encoding method and resolution of the transcoding file. The second level corresponds to the transcoding level. Taking video as an example, a transcoding file with h265 encoding and 720p resolution corresponds to the first transcoding level, which has a higher compression rate, occupies less storage resources, has a higher bitrate, and consumes more resources during transmission. A transcoding file with h264 encoding and 540p resolution corresponds to the second transcoding level, which has a lower compression rate, occupies more storage resources, has a lower bitrate, and consumes less resources during transmission. When cleaning up transcoded files, you can choose to clean only the transcoded files corresponding to the second transcoded level, omitting those corresponding to the first transcoded level. This means deleting transcoded files that consume more storage resources while retaining those that consume less, thus saving storage resources. Alternatively, you can clean up multiple transcoded files corresponding to the second transcoded level and at least one transcoded file corresponding to the first transcoded level, cleaning up more transcoded files corresponding to the second level than those corresponding to the first level. The number of transcoded files to clean up depends on the transcoded level; that is, fewer transcoded files that consume less storage resources but more during transmission are deleted, and more transcoded files that consume more storage resources but less during transmission are deleted, saving both storage and transmission resources.

[0106] The following is through Figure 3 Examples are given for steps 201 to 203 above. Figure 3This is a schematic diagram illustrating a media resource processing method provided in an embodiment of this application. Taking video as an example, for instance... Figure 3 As shown, when the uploaded duration of a video reaches the target duration, the popularity prediction model corresponding to the target resource stage of the video will be triggered to extract the target features of the video and predict the popularity value of the video in the future time period. When the predicted popularity value is less than the threshold corresponding to the target resource stage, the associated videos of the video will be cleaned up, that is, the associated videos of the video will be changed from standard storage to low-frequency storage to save storage resources. When the predicted popularity value is greater than or equal to the threshold corresponding to the target resource stage, no cleanup will be performed.

[0107] In some embodiments, if the server detects that the target media resource has been deleted by the object that uploaded the target media resource through the terminal, the server directly executes step 203 to clean up the associated media resources of the target media resource, without having to predict the popularity value of the target media resource, thereby saving computing costs.

[0108] In the above scheme, since each resource stage corresponds to a popularity prediction model, the popularity value of the media resource in the future time period is predicted by the corresponding popularity prediction model for different resource stages. This can identify media resources whose popularity value drops significantly in the future time period in a timely manner, thereby enabling timely cleaning of their associated media resources, reducing storage costs, and saving storage resources.

[0109] The above solution can reduce the storage space occupied by media resources with a short upload duration (e.g., less than 200 days). Compared with related technologies, it can identify less popular media resources among those with a short upload duration. After the strategy corresponding to the solution was implemented, it saved 85.4% of storage space and significantly reduced storage costs.

[0110] The above Figure 2 The diagram shows the process flow of the media resource processing method provided in this application. The process involves multiple resource stages of the media resource, the popularity prediction model corresponding to each resource stage, and the threshold corresponding to each resource stage. The following section further elaborates on the process of dividing multiple resource stages, the training process of the popularity prediction model corresponding to each resource stage, and the determination process of the threshold corresponding to each resource stage.

[0111] The process of dividing multiple resource phases is described below.

[0112] The process of dividing multiple resource stages includes: the server divides the historical time period based on the changing trend of the real popularity values ​​of multiple sample media resources in the historical time period, and determines multiple resource stages based on the divided historical time period.

[0113] Among them, the changing trend of the true popularity value of sample media resources in the same resource stage meets the first objective condition. Sample media resources refer to media resources stored on servers or media resource storage systems. The historical time period refers to the life cycle of the sample media resource, that is, the time period from when the sample media resource is uploaded to the server to when its associated media resources are deleted. For example, if the life cycle of a sample media resource is 300 days, the historical time period is from day 0 to day 300 after the sample media resource is uploaded. By dividing this day 0 to day 300, multiple resource stages can be determined.

[0114] The first objective condition is that the actual popularity values ​​of various sample media resources show similar trends within the same resource phase. For example, if there are 1000 sample media resources with a lifespan of 300 days, and the average growth rate of these 1000 sample media resources remains around 10% from day 1 to day 7 after uploading, and around 20% from day 7 to day 15, then day 1 to day 7 of the 300 days is divided into the first resource phase, and day 7 to day 15 of the 300 days is divided into the second resource phase. The process for dividing other resource phases is similar and will not be elaborated further.

[0115] The above division method is based on the changing trend of the real popularity values ​​of multiple sample media resources in a historical time period. The historical time period is divided into multiple resource stages based on the divided historical time period. The process of determining resource stages is introduced as an example. In some embodiments, the historical time period can also be divided and multiple resource stages can be determined by combining the business type corresponding to the media resources. This division method is introduced below.

[0116] Schematic, the server divides historical time periods based on the business types corresponding to multiple sample media resources and the changing trends of the actual popularity values ​​of multiple sample media resources over historical time periods. Based on the divided historical time periods, it determines multiple resource stages corresponding to each business type. Among them, different resource stages under the same business type indicate different uploaded durations of media resources belonging to the same business type. The changing trends of the actual popularity values ​​of each sample media resource in the same resource stage under the same business type meet the second objective condition.

[0117] The second objective condition refers to the similar trends in the actual popularity values ​​of various sample media resources within the same business type during the same resource phase. For example, taking video as the media resource, the first business type is advertising, and the corresponding videos for the first business type are advertising videos; the second business type is regular business, and the corresponding videos for the second business type are regular videos. Based on the trends in the actual popularity values ​​of multiple advertising videos under the first business type, the historical time period is divided to determine multiple resource phases corresponding to the first business type. Similarly, based on the trends in the actual popularity values ​​of multiple regular videos under the second business type, the historical time period is divided to determine multiple resource phases corresponding to the second business type. The process of dividing multiple resource phases corresponding to a single business type is the same as the process of dividing the historical time period based on the trends in the actual popularity values ​​of multiple sample media resources during the historical time period, and will not be repeated here.

[0118] It should be noted that the above two division methods are exemplary descriptions of the resource stage division process. The method of determining resource stages can be customized according to actual needs, and this application embodiment does not limit this. Furthermore, resource stages can be determined at different times according to needs. For example, resource stages can be determined periodically, or when the number of media resources stored in the server or media resource storage system reaches a target value. This application embodiment does not limit the timing of determining resource stages.

[0119] Both of the above classification methods are based on the changing trend of the actual popularity value of sample media resources over historical time periods, that is, based on the popularity distribution of sample media resources in different time periods. Since the popularity distribution of sample media resources varies greatly in different time periods, classifying resources based on popularity distribution can reasonably reflect the time nodes of popularity changes of sample media resources. Furthermore, by predicting the popularity value at the time nodes of popularity changes, unpopular media resources can be identified in a timely manner.

[0120] The training process of the popularity prediction model for each resource stage is described below.

[0121] The training process of the popularity prediction model corresponding to each resource stage includes: the server trains the popularity prediction model corresponding to each resource stage based on multiple sample media resources in the same resource stage and the labeled popularity value of each sample media resource, so as to obtain the trained popularity prediction model corresponding to each resource stage.

[0122] One resource stage corresponds to one popularity prediction model. The training process of the popularity prediction model corresponding to any resource stage (i.e., the target resource stage) will be introduced below, taking one iteration process as an example. Figure 4This is a flowchart illustrating a training method for a heat prediction model provided in an embodiment of this application, such as... Figure 4 As shown, taking the method executed by the aforementioned server as an example, it includes the following steps 401 to 403.

[0123] In step 401, the server inputs the sample media resources in the target resource stage, the actual popularity value of the sample media resources in the first sample time period, and the labeled popularity value of the sample media resources in the second sample time period into the popularity prediction model corresponding to the target resource stage. Through the popularity prediction model corresponding to the target resource stage, the sample features of the sample media resources are extracted. Based on the sample features, the popularity value of the sample media resources in the second sample time period is predicted to obtain the predicted popularity value of the sample media resources in the second sample time period.

[0124] The first and second sample time periods can be set according to requirements. For example, if the lifecycle of the sample media resource is 100 days and the target resource phase is from day 7 to day 15, the first sample time period can be set to day 1 to day 7, and the second sample time period can be set to day 7 to day 37.

[0125] The sample features include the popularity trajectory features of the sample media resource, the features of the object that uploaded the sample media resource, and the resource features of the sample media resource. The sample features are similar to the target features in step 202, and will not be repeated here.

[0126] In step 402, the server determines the loss value of the heat prediction model corresponding to the target resource stage based on the predicted heat value of the sample media resource in the second sample time period and the labeled heat value of the sample media resource in the second sample time period.

[0127] The process of determining the loss value of the heat prediction model corresponding to the target resource stage based on the labeled heat value and predicted heat value of the sample media resources in the second sample time period can be represented by the following formula (1):

[0128]

[0129] In formula (1), l(θ) is the loss function of the heat prediction model, θ is the model parameter of the heat prediction model, and y i This represents the labeled popularity value of the sample media resources in the second sample time period. Let be the predicted popularity value of the sample media resource in the second sample time period, x be the sample feature of the sample media resource, i indicate a sample media resource, Ω(θ) be the regularization loss, used to avoid overfitting of the popularity prediction model, and λ be the regularization loss coefficient.

[0130] The above embodiments are merely one example of determining the loss value of a heat prediction model. The loss value of a heat prediction model can also be determined based on other methods, and this application does not limit this.

[0131] In step 403, the server trains the heat prediction model corresponding to the target resource stage based on the loss value, and obtains the trained heat prediction model corresponding to the target resource stage.

[0132] If the loss value meets the training termination condition, the popularity prediction model is output; if the loss value does not meet the training termination condition, the model parameters of the popularity prediction model are updated, and the next iteration is performed based on the updated popularity prediction model until the training termination condition is met.

[0133] In some embodiments, the training termination condition is that the difference between the loss value of the current iteration and the loss value of the previous iteration is less than or equal to a preset value, which can also be understood as the change curve of the loss value tending to flatten; in other embodiments, the training termination condition is that the loss value is less than a preset target value. This application does not limit the specific form of the training termination condition.

[0134] In some embodiments, the process of updating the parameters of the heat prediction model when the loss value does not meet the training termination condition can be represented by the following formula (2):

[0135]

[0136] In formula (2), θ′ represents the updated model parameters of the heat prediction model, and θ represents the original model parameters of the heat prediction model. Let α be the gradient of the loss function l(θ) of the heat prediction model, and α be the learning rate of the heat prediction model.

[0137] The above embodiments are merely one example of updating the model parameters of the heat prediction model. The model parameters of the heat prediction model can also be updated based on other methods, and this application does not limit this.

[0138] Steps 401 to 403 above are illustrated using the example of training a popularity prediction model for one resource stage. The process of training popularity prediction models for other resource stages is similar and will not be repeated here.

[0139] In the above method, the popularity prediction model corresponding to the resource stage is trained using sample media resources in the same resource stage and the labeled popularity values ​​of each sample media resource, which can improve the accuracy of the popularity prediction model. In addition, one popularity prediction model corresponds to one resource stage, which can promptly identify media resources with a significant drop in popularity value in different resource stages of the media resources.

[0140] The following describes the process of determining the thresholds for each resource stage.

[0141] The process of determining the thresholds corresponding to each resource stage includes: the server determines the predicted popularity value of sample media resources in different resource stages in the fourth sample time period through the popularity prediction model corresponding to each resource stage; based on the predicted popularity value of sample media resources in different resource stages in the fourth sample time period and multiple target thresholds, the thresholds corresponding to each resource stage are determined.

[0142] Each resource stage corresponds to a threshold. Figure 5 This is a flowchart illustrating a method for determining a threshold corresponding to a target resource stage, as provided in an embodiment of this application. Taking the determination of the threshold corresponding to any resource stage (i.e., the target resource stage) as an example, ... Figure 5 As shown, taking the method executed by the aforementioned server as an example, it includes the following steps 501 to 503.

[0143] In step 501, the server inputs multiple sample media resources in the target resource stage and the actual popularity value of each sample media resource in the third sample time period into the popularity prediction model corresponding to the target resource stage. Through the popularity prediction model corresponding to the target resource stage, the predicted popularity value of each sample media resource in the fourth sample time period is determined.

[0144] The third and fourth sample time periods can be set according to requirements, and will not be elaborated further here. Furthermore, the above prediction process is the same as the heat value prediction process in step 202, and will not be elaborated further.

[0145] In step 502, the server determines the reward parameters corresponding to each target threshold based on multiple target thresholds and the predicted popularity values ​​of each sample media resource.

[0146] The return parameter indicates the return obtained by cleaning up associated media resources of sample media resources whose predicted popularity value is less than the target threshold during the target resource stage. In some embodiments, the return parameter is also called the return on investment (ROI). The target threshold is a preset value used to simulate the threshold corresponding to the target resource stage to determine the threshold corresponding to the target resource stage, or in other words, to select the most suitable threshold for the target resource stage from multiple preset target thresholds in order to save as much storage resources as possible.

[0147] It should be understood that in a resource phase, a target threshold corresponds to a reward parameter. If, in this resource phase, associated media resources of media resources with predicted popularity values ​​less than the target threshold are cleaned up, storage resources can be saved in the fourth sample time period, that is, storage benefits can be obtained; at the same time, the resources consumed in transmitting associated media resources of this media resource in the fourth sample time period will increase, that is, bandwidth overhead will occur. In the embodiments of this application, in order to balance storage benefits and bandwidth overhead, a ratio of storage benefits to bandwidth overhead, that is, a reward parameter, is introduced to indicate the reward brought by cleaning up associated media resources of media resources based on the target threshold in this resource phase.

[0148] The following section uses the example of determining the reward parameter corresponding to a target threshold to illustrate the process of determining the reward parameter, including steps 1 to 3 below.

[0149] In step 1, the storage revenue corresponding to the target threshold is determined based on the target threshold, storage unit price, predicted popularity value of each sample media resource, and the size of the associated media resources of each sample media resource.

[0150] The storage unit price indicates the resources consumed per unit of media resource storage per unit of time, while the storage revenue indicates the resources saved during the target resource phase by cleaning up associated media resources of sample media resources whose predicted popularity value is less than the target threshold. For example, if a copy of a sample media resource is 20MB in size, deleting a copy of that sample media resource can free up 20MB of storage resources, which is equivalent to gaining 20MB of storage revenue.

[0151] In some embodiments, the process can be represented by the following formula (3):

[0152]

[0153] In formula (3), benefit(τ) represents the storage benefit in the fourth sample time period, i indicates a sample media resource in the target resource stage, and s i Indicates the size of the associated media resources for each sample media resource. This represents the predicted popularity value of the sample media resource in the fourth sample time period, and τ represents the target threshold. Wherein, if the predicted popularity value is less than the target threshold, then... The value is 1; if the predicted popularity value is greater than the target threshold, then The value is 0.

[0154] In step 2, the bandwidth cost corresponding to the target threshold is determined based on the target threshold, bandwidth unit price, predicted popularity value of each sample media resource, and labeled popularity value of each sample media resource.

[0155] The bandwidth unit price indicates the resources consumed in transmitting a unit of media resource per unit time, while the bandwidth overhead indicates the resources consumed in transmitting related media resources of a sample media resource whose predicted popularity value is less than the target threshold during the target resource stage. For example, taking a video as a sample media resource, the bitrate of a transcoded file corresponding to the first transcoding level of the video is 2MB / s, and the bitrate of a transcoded file corresponding to the second transcoding level is 1MB / s. If the transcoded file corresponding to the second transcoding level of the video is deleted, when an object needs to access the video, only the transcoded file corresponding to the first transcoding level can be transmitted. Since the bitrate of the transcoded file corresponding to the first transcoding level is higher, it requires more resources to transmit compared to the transcoded file corresponding to the second transcoding level, which is the bandwidth overhead.

[0156] In some embodiments, the process can be represented by the following formula (4):

[0157]

[0158] In formula (4), cost(τ) represents the bandwidth overhead in the fourth sample time period, i indicates a sample media resource in the target resource stage, and pi is the actual popularity value of the sample media resource in the fourth sample time period. This represents the predicted popularity value of the sample media resource in the fourth sample time period, and τ represents the target threshold. Wherein, if the predicted popularity value is less than the target threshold, then... The value is 1; if the predicted popularity value is greater than the target threshold, then The value is 0.

[0159] In step 3, the return parameter corresponding to the target threshold is determined based on the ratio between storage revenue and bandwidth overhead.

[0160] In some embodiments, the process can be represented by the following formula (5):

[0161]

[0162] In formula (5), ROI(τ) represents the return parameter corresponding to the target threshold, benefit(τ) represents the storage benefit in the fourth sample time period, and cost(τ) represents the bandwidth cost in the fourth sample time period.

[0163] In step 503, the server determines the threshold corresponding to each resource stage based on the maximum return parameter among the return parameters corresponding to each target threshold.

[0164] Specifically, the server determines the maximum return parameter among the return parameters corresponding to each target threshold; the target threshold corresponding to this maximum return parameter is taken as the threshold corresponding to the target resource stage.

[0165] The process of taking the target threshold corresponding to the maximum return parameter as the threshold corresponding to the target resource stage can be represented by the following formula (6):

[0166]

[0167] In formula (6), τ max ROI(τ) represents the target threshold corresponding to the maximum return parameter, and ROI(τ) represents the return parameter corresponding to the target threshold.

[0168] In the above embodiments, the target threshold corresponding to the maximum return parameter is used as the threshold corresponding to the target resource stage. When cleaning up associated media resources based on this threshold, storage revenue can be greatly improved while ensuring low bandwidth overhead, effectively reducing storage costs and saving resources.

[0169] In some embodiments, a value slightly smaller than the target threshold corresponding to the maximum return parameter is used as the threshold corresponding to the target resource stage, so as to reduce the possibility that the popularity value of the unpopular media resources determined based on the threshold will increase again in the fourth sample time period, thereby reducing the bandwidth overhead that may increase in the fourth sample time period.

[0170] Steps 501 to 503 above use one resource stage as an example to illustrate the process of determining the threshold corresponding to the resource stage. The process of determining the threshold for other resource stages is the same and will not be repeated here.

[0171] In the above method, the return parameter is determined by the ratio of storage revenue to bandwidth cost, and the target threshold corresponding to the maximum return parameter is used as the threshold corresponding to the resource stage. When cleaning up associated media resources based on this threshold, the storage revenue can be greatly increased while ensuring that the bandwidth cost is small, thereby effectively reducing storage costs and saving resources.

[0172] Figure 6 This is a schematic diagram of a media resource processing method provided in an embodiment of this application, as shown below. Figure 6 As shown, the horizontal axis represents time, and the difference between the upper and lower lines represents the average number of media resources stored daily in the server or media resource storage system. As time progresses, the total number of stored media resources continuously increases, meaning the upper and lower lines extend further to the right. t′ represents the current time, and a... i The uploaded duration of the media resources is represented by each vertical line, which is a dividing point of a resource stage. The vertical lines between t′-a1 and t′-a2 represent the number of media resources in the first resource stage. M1 represents the popularity prediction model corresponding to the first resource stage. Other resource stages follow the same pattern and will not be elaborated further. Figure 6 Region 601 represents the actual number of niche media resources, such as Figure 6As shown, the shorter the upload duration, the lower the proportion of unpopular media resources in the total number of media resources. Region 602 represents the number of unpopular media resources in each resource stage when the target threshold corresponding to the maximum return parameter is used as the threshold corresponding to the resource stage. It can be seen that, through the media resource processing method provided in this application embodiment, the popularity value of media resources is predicted at each resource stage using the corresponding popularity prediction model. Based on the threshold corresponding to each resource stage, unpopular media resources can be identified in a timely manner. Furthermore, by cleaning up the associated media resources of the identified unpopular media resources, storage resources can be significantly saved.

[0173] Figure 7 This is a block diagram of a media resource processing apparatus provided in an embodiment of this application. (Refer to...) Figure 7 The device includes: a determination unit 701, a prediction unit 702, and a cleanup unit 703.

[0174] The determining unit 701 is configured to determine the target resource stage of the target media resource when the uploaded duration of the target media resource reaches the target duration, wherein the target resource stage indicates the uploaded duration of the target media resource.

[0175] The prediction unit 702 is configured to execute a popularity prediction model based on the target resource stage to determine the predicted popularity value of the target media resource in a future time period. The popularity prediction model based on the target resource stage is trained based on sample media resources in the target resource stage and labeled popularity values. The predicted popularity value indicates the popularity of the target media resource in a future time period.

[0176] The cleaning unit 703 is configured to clean up the associated media resources of the target media resource when the predicted popularity value is less than the threshold corresponding to the target resource stage.

[0177] In one possible implementation, the prediction unit 702 is configured to perform:

[0178] The target media resource and its actual popularity value over a historical time period are input into the popularity prediction model corresponding to the target resource stage. The target features of the target media resource are extracted through the popularity prediction model corresponding to the target resource stage. Based on the target features, the popularity value of the target media resource in the future time period is predicted to obtain the predicted popularity value. The target features include the popularity value trajectory features of the target media resource, the features of the object that uploaded the target media resource, and the resource features of the target media resource.

[0179] In one possible implementation, the device further includes:

[0180] The prediction subunit is also configured to execute the input of multiple sample media resources in the target resource stage and the real popularity value of each sample media resource in the historical time period into the popularity prediction model corresponding to the target resource stage, and to determine the predicted popularity value of each sample media resource in the future time period through the popularity prediction model corresponding to the target resource stage.

[0181] The reward parameter determination subunit is configured to perform a task based on multiple target thresholds and the predicted popularity value of each sample media resource, and to determine the reward parameter corresponding to each target threshold. The reward parameter indicates the reward obtained by cleaning up the associated media resources of sample media resources whose predicted popularity value is less than the target threshold in the target resource stage.

[0182] The threshold determination subunit is configured to determine the threshold corresponding to the target resource stage by performing the maximum return parameter among the return parameters corresponding to each target threshold.

[0183] In one possible implementation, the reward parameter determines that the subunit is configured to perform:

[0184] Based on the target threshold, storage unit price, predicted popularity value of each sample media resource, and the size of associated media resources of each sample media resource, the storage revenue corresponding to the target threshold is determined. The storage unit price indicates the resources consumed per unit of storage time for each media resource. The storage revenue indicates the resources saved if associated media resources of sample media resources with predicted popularity values ​​less than the target threshold are cleaned up during the target resource stage.

[0185] Based on the target threshold, bandwidth unit price, predicted popularity value of each sample media resource, and labeled popularity value of each sample media resource, the bandwidth cost corresponding to the target threshold is determined. The bandwidth unit price indicates the resources consumed in transmitting a unit of media resource per unit time. The bandwidth cost indicates the resources consumed in transmitting associated media resources of sample media resources with predicted popularity values ​​less than the target threshold during the target resource stage.

[0186] The return parameter corresponding to the target threshold is determined based on the ratio between the storage revenue and the bandwidth cost.

[0187] In one possible implementation, the cleaning unit 703 is configured to perform at least one of the following:

[0188] If the predicted popularity value is less than the threshold corresponding to the target resource stage, delete the first number of copies of the target media resource.

[0189] If the predicted popularity value is less than the threshold corresponding to the target resource stage, delete a second number of transcoded files of the target media resource.

[0190] In one possible implementation, the apparatus further includes a resource stage determination unit configured to perform:

[0191] Based on the changing trends of the actual popularity values ​​of multiple sample media resources over a historical period, the historical period is divided into segments. Based on the segmented historical period, multiple resource stages are determined, with different resource stages indicating different uploaded durations of the media resources.

[0192] Among them, the changing trend of the real popularity value of sample media resources in the same resource stage meets the first objective condition.

[0193] In one possible implementation, the apparatus further includes a resource stage determination unit configured to perform:

[0194] Based on the business types corresponding to multiple sample media resources and the changing trends of the actual popularity values ​​of these multiple sample media resources in historical time periods, the historical time period is divided. Based on the divided historical time period, multiple resource stages corresponding to each business type are determined. Different resource stages under the same business type indicate different uploaded durations of media resources belonging to the same business type.

[0195] Among them, the changing trend of the real popularity value of sample media resources under the same business type and at the same resource stage meets the second objective condition.

[0196] In the aforementioned device, since each resource stage corresponds to a popularity prediction model, the popularity value of the media resource in the future time period is predicted by the corresponding popularity prediction model for different resource stages. This allows for timely identification of media resources whose popularity value drops significantly in the future time period, thereby enabling timely cleanup of their associated media resources, reducing storage costs, and saving storage resources.

[0197] It should be noted that the media resource processing apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when performing the corresponding steps. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the media resource processing apparatus and the media resource processing method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0198] In this application embodiment, an electronic device is also provided, which includes a processor and a memory. The memory is used to store at least one computer program, which is loaded and executed by the processor to implement the above-described media resource processing method.

[0199] Figure 8 This is a block diagram of a server provided in an embodiment of this application. The server 800 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 801 and one or more memories 802. Each memory 802 stores at least one line of program code, which is loaded and executed by the one or more processors 801 to implement the server's execution process in the media resource processing methods provided in the various method embodiments described above. Of course, the server 800 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input / output. The server 800 may also include other components for implementing device functions, which will not be elaborated upon here.

[0200] In this application embodiment, a computer-readable storage medium including program code is also provided, such as a memory 802 including program code. The program code can be executed by the processor 801 of the server 800 to complete the media resource processing method. Optionally, the computer-readable storage medium may be read-only memory (ROM), random access memory (RAM), compact-disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0201] In this application embodiment, a computer program product is also provided, including one or more program codes, which are executed by one or more processors of an electronic device, enabling the electronic device to perform the above-described media resource processing method.

[0202] In some embodiments, the computer program involved in the present application embodiments may be deployed and executed on a computer device, or executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network. Multiple computer devices distributed in multiple locations and interconnected through a communication network may constitute a blockchain system.

[0203] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0204] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method of processing media resources, characterized by, The method comprises: In the case that the uploaded duration of the target media resource reaches a target duration, determining a target resource stage in which the target media resource is located, the target resource stage indicating the uploaded duration of the target media resource; Based on a heat prediction model corresponding to the target resource stage, determining a predicted heat value indicating the popularity of the target media resource in a future time period, the heat prediction model corresponding to the target resource stage being trained based on sample media resources in the target resource stage and labeled heat values; In the case that the predicted heat value is less than a threshold value corresponding to the target resource stage, cleaning associated media resources of the target media resource; The method further comprises: Inputting a plurality of sample media resources in the target resource stage and real heat values of each sample media resource in a historical time period into the heat prediction model corresponding to the target resource stage, and determining, by the heat prediction model corresponding to the target resource stage, a predicted heat value of each sample media resource in a future time period; Based on a plurality of target thresholds and the predicted heat values of each sample media resource, determining a reward parameter corresponding to each target threshold, the reward parameter indicating a reward brought by cleaning, in the target resource stage, associated media resources of a sample media resource whose predicted heat value is less than the target threshold; Based on a maximum reward parameter in the reward parameters corresponding to each target threshold, determining the threshold value corresponding to the target resource stage.

2. The method of claim 1, wherein, The determination of the predicted heat value indicating the popularity of the target media resource in a future time period based on the heat prediction model corresponding to the target resource stage comprises: Inputting the target media resource and a real heat value of the target media resource in a historical time period into the heat prediction model corresponding to the target resource stage, extracting, by the heat prediction model corresponding to the target resource stage, a target feature of the target media resource, predicting, based on the target feature, a heat value of the target media resource in a future time period, and obtaining the predicted heat value, the target feature comprising a heat value trajectory feature of the target media resource, a feature of an object uploading the target media resource, and a resource feature of the target media resource.

3. The method of claim 1, wherein, The determination of the reward parameter corresponding to each target threshold based on a plurality of target thresholds and the predicted heat values of each sample media resource comprises: Based on the target threshold, a storage unit price, the predicted heat values of each sample media resource, and the size of the associated media resources of each sample media resource, determining a storage benefit corresponding to the target threshold, the storage unit price indicating a resource consumed by a unit media resource in a unit time, and the storage benefit indicating a resource saved by cleaning, in the target resource stage, associated media resources of a sample media resource whose predicted heat value is less than the target threshold. determine a bandwidth cost corresponding to the target threshold value based on the target threshold value, a bandwidth unit price, a predicted heat value of each of the sample media resources, and a labeled heat value of each of the sample media resources, the bandwidth unit price indicating resource consumed by transmission of a unit media resource per unit time, and the bandwidth cost indicating resource consumed by transmission of an associated media resource of a sample media resource with a predicted heat value less than the target threshold value at the target resource stage; determine a return parameter corresponding to the target threshold value based on a ratio between the storage benefit and the bandwidth cost.

4. The method of claim 1, wherein, The cleaning of the associated media resource of the target media resource in the case where the predicted heat value is less than the threshold value corresponding to the target resource stage includes at least one of the following: deleting a first number of copies of the target media resource in the case where the predicted heat value is less than the threshold value corresponding to the target resource stage; deleting a second number of transcoded files of the target media resource in the case where the predicted heat value is less than the threshold value corresponding to the target resource stage.

5. The method of claim 1, wherein, The method further includes: dividing a historical time period based on a change trend of real heat values of a plurality of sample media resources in the historical time period, and determining a plurality of resource stages based on the divided historical time period, different resource stages indicating different uploaded time lengths of media resources; wherein the change trend of the real heat values of the sample media resources in the same resource stage meets a first target condition.

6. The method of claim 1, wherein, The method further includes: dividing a historical time period based on a change trend of real heat values of a plurality of sample media resources in the historical time period and a business type corresponding to the plurality of sample media resources, and determining a plurality of resource stages corresponding to each business type based on the divided historical time period, different resource stages under the same business type indicating different uploaded time lengths of media resources belonging to the same business type; wherein the change trend of the real heat values of the sample media resources in the same resource stage under the same business type meets a second target condition.

7. A processing apparatus of a media resource, characterized by, The apparatus includes: a determination unit configured to determine a target resource stage in which a target media resource is located in the case where an uploaded time length of the target media resource reaches a target time length, the target resource stage indicating the uploaded time length of the target media resource; a prediction unit configured to determine a predicted heat value indicating a popularity of the target media resource in a future time period based on a heat prediction model corresponding to the target resource stage, the heat prediction model corresponding to the target resource stage being trained based on sample media resources in the target resource stage and labeled heat values; a cleaning unit configured to clean an associated media resource of the target media resource in the case where the predicted heat value is less than a threshold value corresponding to the target resource stage. The apparatus further includes: The prediction unit is configured to input a plurality of sample media resources in the target resource stage and a real heat value of each sample media resource in a historical time period into a heat prediction model corresponding to the target resource stage, and determine a predicted heat value of each sample media resource in a future time period through the heat prediction model corresponding to the target resource stage. The reward parameter determination sub-unit is configured to determine a reward parameter corresponding to each target threshold based on the plurality of target thresholds and the predicted heat value of each sample media resource, the reward parameter indicating a reward brought by cleaning associated media resources of a sample media resource with a predicted heat value less than the target threshold in the target resource stage. The threshold determination sub-unit is configured to determine a threshold corresponding to the target resource stage based on a maximum reward parameter in the reward parameters corresponding to each target threshold.

8. An electronic device, comprising: The electronic device comprises: one or more processors; a memory for storing program code executable by the processor; wherein the processor is configured to execute the program code to implement the media resource processing method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, When the program code in the computer readable storage medium is executed by the processor of the electronic device, the electronic device can execute the media resource processing method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Emergency early warning method and device based on meta-knowledge and electronic device

    CN113822069A

  • Multimedia file cleaning method and device, electronic equipment and storage medium

    CN114297156A

  • Video popularity prediction method and device, computing equipment and storage medium

    CN115481282A