Video processing method and device, electronic equipment and storage medium

By analyzing the resource consumption cost and compensation return of the video, the storage value of the video is determined, which solves the problem of inaccurate video data deletion in the existing technology and achieves the reduction of storage costs and improvement of efficiency.

CN120730089APending Publication Date: 2025-09-30BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410384397.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

Existing technologies make it difficult to delete video data accurately and effectively, resulting in high storage costs, an inability to clearly identify which videos should enter the destruction phase, and coarse-grained timelines leading to conservative deletion.

Method used

By determining the target resource attribute results of the video, and based on the difference between the reference resource consumption and the resource compensation amount, analyzing the resource consumption cost and compensation return of the video during the storage retention period, it is decided whether to delete or retain the video.

Benefits of technology

It achieves accurate and reliable deletion of video data, reduces storage costs, improves storage efficiency, and ensures the reasonable retention and deletion of video data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120730089A_ABST
    Figure CN120730089A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video processing method and device, electronic equipment and a storage medium. The method comprises the following steps: determining a target video needing storage optimization from stored videos; determining a target resource attribute result corresponding to the target video, the target resource attribute result being determined according to a difference value between a reference resource consumption amount and a reference resource compensation amount, the reference resource consumption amount being determined according to a resource consumption cost generated by the target video in a reference storage retention period, the reference storage retention period is a reference duration for continuously storing and retaining the target video, and the reference resource compensation amount is determined according to a resource compensation return generated by the target video in the reference storage retention period; and controlling to delete or retain the target video according to the target resource attribute result. According to the scheme, the resource consumption cost and the resource compensation return of the video in the storage retention period are analyzed, the storage cost caused by unreliable videos is reduced, and the video storage efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a video processing method, apparatus, electronic device, and storage medium. Background Art

[0002] As application storage becomes larger and larger, the storage cost of videos generated daily and transcoded videos of various resolutions is also increasing. Therefore, video storage management is required throughout the entire life cycle, from video data input to final deletion.

[0003] In related solutions, it is difficult to clearly determine which stored videos should enter the destruction phase. Generally, only a coarse-grained timeline can be set to delete the stored videos according to the timeline. However, this coarse-grained timeline often conflicts with other operations, so the timeline deletion can only be designed very conservatively. Only a coarse-grained deletion of expired videos is performed, which cannot accurately and effectively delete video data. Summary of the Invention

[0004] The present disclosure provides a video processing method, device, electronic device and storage medium, so as to determine whether to delete or retain a video in a timely manner according to the necessity of video storage, thereby reducing storage costs.

[0005] In a first aspect, an embodiment of the present disclosure provides a video processing method, the method comprising:

[0006] Determine target videos requiring storage optimization from stored videos;

[0007] Determining a target resource attribute result corresponding to a target video, wherein the target resource attribute result is determined based on a difference between a reference resource consumption amount and a reference resource compensation amount, wherein the reference resource consumption amount is determined based on a resource consumption cost generated by the target video during a reference storage retention period, wherein the reference storage retention period is a reference duration for continued storage retention of the target video, and the reference resource compensation amount is determined based on a resource compensation return generated by the target video during the reference storage retention period;

[0008] The target video is deleted or retained according to the target resource attribute result.

[0009] In a second aspect, an embodiment of the present disclosure further provides a video processing device, the device comprising:

[0010] A selection module is used to determine a target video that needs storage optimization from the stored videos;

[0011] a determination module, configured to determine a target resource attribute result corresponding to a target video, wherein the target resource attribute result is determined based on a difference between a reference resource consumption amount and a reference resource compensation amount, wherein the reference resource consumption amount is determined based on a resource consumption cost generated by the target video during a reference storage retention period, wherein the reference storage retention period is a reference duration for continued storage and retention of the target video, and the reference resource compensation amount is determined based on a resource compensation return generated by the target video during the reference storage retention period;

[0012] A processing module is used to control the deletion or retention of the target video according to the target resource attribute result.

[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the video processing method according to any one of the above embodiments.

[0017] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable medium, wherein the computer-readable medium stores computer instructions, and the computer instructions are used to enable a processor to implement the video processing method described in any one of the above embodiments when executed.

[0018] In an embodiment of the present disclosure, a target video that needs to be optimized for storage is determined from stored videos. When a video processing request is received, a target resource attribute result corresponding to the target video is determined. The target resource attribute result is determined based on the difference between a reference resource consumption amount and a reference resource compensation amount. The reference resource consumption amount is determined based on the resource consumption cost generated by the target video during the reference storage retention period. The reference resource compensation amount is determined based on the resource compensation return generated by the target video during the reference storage retention period. Then, the target video is controlled to be deleted or retained based on the target resource attribute result. When deciding whether to delete or continue to retain a video, this scheme analyzes the resource consumption cost and resource compensation return of the video during the reference storage retention period, and uses the resource consumption cost and resource compensation return of the video storage during the reference storage retention period to weigh whether to delete the video, thereby ensuring that the video data used by users is accurate and reliable, reducing the storage cost caused by unreliable videos, and improving video storage efficiency.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0021] Figure 1 is a flow chart of a video processing method provided by an embodiment of the present disclosure;

[0022] Figure 2 is a structural diagram of a video processing framework provided by an embodiment of the present disclosure;

[0023] Figure 3 is a flowchart of another video processing method provided by an embodiment of the present disclosure;

[0024] Figure 4 is a flowchart of another video processing method provided by an embodiment of the present disclosure;

[0025] Figure 5 is a schematic structural diagram of a video processing device provided by an embodiment of the present disclosure;

[0026] Figure 6 It is a structural diagram of an electronic device for implementing a video processing method provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0028] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0029] As used herein, the term "including" and its variations are open-ended, 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," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0030] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0031] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0032] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0033] Figure 1 This is a flow chart of a video processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to situations where the life cycle of video storage is managed to achieve effective deletion or retention of videos. The method can be executed by a video processing device, which can be implemented in the form of software and / or hardware and is generally integrated on any electronic device with network communication function, which can be a mobile terminal, PC or server, etc.

[0034] like Figure 1 As shown, the video processing method of the embodiment of the present disclosure may include the following process:

[0035] S110, determining a target video requiring storage optimization from stored videos;

[0036] S120. Determine the target resource attribute result corresponding to the target video. The target resource attribute result is determined based on the difference between the reference resource consumption and the reference resource compensation. The reference resource consumption is determined based on the resource consumption cost generated by the target video during the reference storage retention period. The reference storage retention period is the reference duration for continuing to store and retain the target video. The reference resource compensation is determined based on the resource compensation return generated by the target video during the reference storage retention period.

[0037] The target resource attribute result is used to indicate the relative value between the resource compensation and resource consumption generated by the target video within the reference duration for continuing to store and retain the target video.

[0038] Video storage lifecycle management is the process of managing video files throughout their lifecycle, from storage entry to final deletion. Video files progress through different stages based on different conditions, completing different tasks or meeting specific requirements.

[0039] As time goes by, video storage lifecycle management becomes increasingly important. Managing the lifecycle of video storage can help cope with the ever-increasing number of video files and significantly reduce storage costs. However, because it's difficult to clearly define which video files should enter the destruction phase, only a coarse-grained timeline can be set. Because this coarse-grained timeline often conflicts with other operations, timeline deletion must be designed to be very conservative, requiring only coarse-grained deletion of expired videos.

[0040] Managing the video storage lifecycle well can ensure the accuracy and reliability of video files. To this end, the target videos that need to be optimized for storage can be determined from the stored videos to analyze the video value of the video files at each stage of the data lifecycle. Once the video file is no longer useful for the production environment and loses its storage value, this application scheme introduces the resource attribute results defined by resource compensation and resource consumption to evaluate the storage value of the video. For the target video stored in the storage space, the target resource attribute results of the target video can be determined in real time, so as to use the target resource attribute results to decide whether to adopt a series of solutions to reduce the storage cost brought by the target video storage.

[0041] As an optional but non-limiting implementation method, the target resource attribute result is determined based on the difference between the reference resource consumption and the reference resource compensation. The reference resource consumption is determined based on the resource consumption cost generated by the target video during the reference storage retention period. The reference storage retention period is the reference duration for continuing to store and retain the target video. The reference resource compensation is determined based on the resource compensation return generated by the target video during the reference storage retention period.

[0042] As for the storage of the target video, if you want to store the target video, you need to pay a certain amount of resource consumption (for example, storing the target video requires a certain amount of storage resource consumption cost), and the stored target video will also generate some resource compensation (for example, you can use the stored target video to obtain some resource compensation such as video revenue). Therefore, during the period of continued storage and retention of the target video, the resource consumption cost and resource compensation return generated by the target video can be determined in real time, and the generated resource consumption cost and resource compensation return can be used to determine the target resource attribute results that can reflect the storage value of the target video formed by the target video within the reference period of continued storage and retention of the target video.

[0043] Optionally, the resource consumption cost incurred by storing the target video during the reference storage retention period is detected, and a reference resource consumption amount corresponding to the target video during the reference storage retention period is obtained from this. Simultaneously, the resource compensation return generated by using the stored target video during the reference storage retention period is also detected, and a reference resource compensation amount corresponding to the target video during the reference storage retention period is obtained from this.

[0044] Optionally, before determining the target resource attribute result corresponding to the target video, the method further includes: receiving a video processing request that is triggered at a preset time interval; and determining the target resource attribute result corresponding to the target video in response to the video processing request.

[0045] See also Figure 2 The video lifecycle management task is triggered every preset time interval t. Each triggered lifecycle management task corresponds to a video processing request. The video lifecycle management service responds to the video processing request and initiates the reference storage retention period. The video lifecycle management service generates a target resource attribute result that reflects the storage value of the target video, measured by the resource consumption cost and resource compensation return generated by the target video. The reference storage retention period can be the reference duration for continuing to store and retain the target video, where the reference duration is the preset time interval t.

[0046] S130: Controlling the deletion or retention of the target video according to the target resource attribute result.

[0047] The core of video lifecycle management lies in how to decide which video files should continue to be stored and retained, and how to decide which video files should be deleted and no longer stored and retained. This solution introduces the resource attribute results defined by resource compensation and resource consumption to evaluate the storage value of the video. By defining the storage value of each video, it can be determined whether the video needs to continue to be stored and retained. If the target resource attribute result has no storage value (for example, the storage value is less than or equal to 0), it means that the lifecycle of the target video has ended. There is no need to continue to store and retain the target video. Instead, the target video is deleted to reduce the storage cost brought by the target video storage.

[0048] As an optional but non-limiting implementation method, the target video is deleted or retained according to the target resource attribute result, including the following steps A1-A2:

[0049] Step A1: If it is determined according to the target resource attribute result that the target video meets the preset deletion condition, the target video is deleted.

[0050] Step A2: If it is determined based on the target resource attribute result that the target video does not meet the preset deletion condition, the target video continues to be stored and retained.

[0051] After determining the target resource attribute result corresponding to the target video, since the target resource attribute result can reflect the storage value of the target video by measuring the resource consumption cost and resource compensation return, it is possible to determine whether the target video still has storage value through the target resource attribute result. For target videos with no storage value, the target video can be directly deleted to reduce the storage cost of continuing to store the target video; for target videos that still have storage value, the target video will continue to be stored and retained to avoid losing the resource compensation return that the target video can subsequently create during the storage period due to deletion of the target video, thereby giving full play to the use value of the target video.

[0052] Optionally, the target video is deleted, including the following steps: generating a target video deletion task corresponding to the target video and writing the target video deletion task into a video deletion message queue; and sequentially grabbing the target video deletion tasks from the video deletion message queue for task execution, and deleting the target video corresponding to the target video deletion task.

[0053] See also Figure 2The video storage management process involves the video lifecycle management service, the deletion execution service, and the corresponding video deletion message queue. For target videos with no storage value, the video lifecycle management service can generate a target video deletion task based on the target video's video ID. The video lifecycle management service will then send the target video deletion task to the video deletion message queue. The deletion execution service sequentially retrieves target video deletion tasks from the video deletion message queue for execution, deleting the target video by executing the deletion task.

[0054] By adopting the above solution, by adding the deletion of the target video to the message queue in sequence for deletion, the effect of peak shaving and valley filling can be achieved, and the blocking of the video lifecycle management service caused by the simultaneous execution of multiple video deletion tasks at the same time can be avoided. By sending it to the message queue, the video deletion task can be taken from the message queue as long as there is time and free time, so as to achieve orderly and efficient video deletion, alleviate bottleneck problems, and ensure data security.

[0055] The technical solution provided by the embodiment of the present disclosure determines the target resource attribute result corresponding to the target video when a video processing request is received. The target resource attribute result is used to indicate the relative value between the resource compensation and resource consumption generated by the target video during the reference storage retention period, and then controls the deletion or retention of the target video according to the target resource attribute result. When deciding whether to delete or continue to retain the video, this solution analyzes the resource consumption cost and resource compensation return of the video during the reference storage retention period of storage retention, and uses the resource consumption cost and resource compensation return of the video storage during the reference storage retention period to weigh whether to delete the video, thereby ensuring that the video data used by users is accurate and reliable, reducing the storage cost caused by unreliable videos, and improving video storage efficiency.

[0056] Figure 3 A flow chart of another video processing method provided for an embodiment of the present disclosure. The technical solution of this embodiment further optimizes the process of determining the target resource attribute results corresponding to the target video in the aforementioned embodiment on the basis of the technical solution of the aforementioned embodiment. This embodiment can be combined with various optional solutions in one or more of the aforementioned embodiments.

[0057] like Figure 3 As shown, the video processing method of the embodiment of the present disclosure may include the following process:

[0058] S310: Determine a target video requiring storage optimization from stored videos.

[0059] S320. When the target video belongs to the source video file type, determine the storage space occupied by the target video and the weight of the alternative video. The weight of the alternative video can represent the size of the resource compensation return that the alternative video can generate. The alternative video is a video file generated by transcoding a video of the source video file type and can replace the target video to continue to be stored and retained.

[0060] Video files can be divided into two categories: the first category is the source video file, and the second category is video files of different resolutions generated by transcoding the source video file. The storage space occupied by the target video is the video file size of the target video or the storage space occupied by the target video.

[0061] The resource consumption of video storage has a negative benefit and grows slowly, with each day of growth steadily increasing the resource consumption cost. Therefore, the larger the storage space occupied by the target video, the greater the resource consumption cost it incurs; the smaller the storage space occupied by the target video, the smaller the resource consumption cost it incurs.

[0062] For source video files, the resource compensation returns are basically positive. The source video files are the source of all audio and video transcoding. Therefore, when the source video files have been used for transcoding to generate many types of video files, it can be considered that the resource compensation returns that can be generated by transcoding the source video files are not much.

[0063] Based on the above situation, when the target video belongs to the source video file type, the weight of the alternative video generated by transcoding the video of the source video file type is related to the number of video file types generated by transcoding the target video. The more video file types are generated by transcoding the target video, the greater the weight of the alternative video, the greater the resource compensation return that the alternative video can generate, and accordingly, the smaller the resource compensation return that the target video can generate; the smaller the weight of the alternative video, the smaller the resource compensation return that the alternative video can generate, and accordingly, the greater the resource compensation return that the target video can generate.

[0064] S330: Determine a target resource attribute result corresponding to the target video according to the storage space occupied by the target video and the weights of the candidate videos.

[0065] The target resource attribute result indicates the relative value between the resource compensation and resource consumption generated by the target video during the reference storage retention period. The target resource attribute result is determined based on the difference between the reference resource consumption and the reference resource compensation. The reference resource consumption is determined based on the resource consumption cost generated by the target video during the reference storage retention period. The reference storage retention period is the reference duration for continued storage retention of the target video. The reference resource compensation is determined based on the resource compensation return generated by the target video during the reference storage retention period.

[0066] The target video's storage space usage is used to measure the resource consumption cost of using the target video during the reference storage retention period. The candidate video's weight is used to measure the resource compensation return generated by the candidate video during the reference storage retention period, and thus the resource compensation return generated by using the target video during the reference storage retention period.

[0067] As an optional but non-limiting implementation method, determining the target resource attribute result corresponding to the target video according to the storage space occupied by the target video and the weight of the candidate videos includes steps B1-B2:

[0068] Step B1: Determine a first reference resource consumption corresponding to the target video based on the storage space occupied by the target video. The first reference resource consumption is the storage resource consumption cost consumed by storing the target video during a reference storage retention period.

[0069] Optionally, the video file size of the target video is read, and the storage space occupied by the target video is determined according to the video file size of the target video. ori ), F ori Indicates the target video file, Size(F ori ) represents the video file size or storage space occupied by the target video file. At the same time, a reference storage retention period can also be determined. The reference storage retention period is the reference duration for continuing to store and retain the target video, where the reference duration is a preset time interval t, and C related to the resource consumption cost when storing the video. storage Factor, C storage The calculation factor representing the resource consumption cost is mainly related to the unit price of storage resources. The calculation formula for determining the first reference resource consumption corresponding to the target video based on the storage space occupied by the target video is as follows:

[0070] Storage(F ori )=C storage *Size(F ori )*t

[0071] Step B2: Determine the first reference resource compensation amount corresponding to the target video based on the weight of the alternative video. The first reference resource compensation amount is the resource compensation return that can be generated by the target video during the reference storage retention period. The weight of the alternative video is positively correlated with the size of the resource compensation return generated by the alternative video, and the size of the resource compensation return that can be generated by the alternative video is negatively correlated with the size of the resource compensation return that can be generated by the target video.

[0072] Optionally, when determining the weight of the candidate video, Fbak When storing the video, the reward related to the resource compensation return will also be determined. transcode Factor, Weight Fbak Indicates the weight of the file type of the candidate video file, F bak Reward represents an alternative video generated by transcoding the source video file type and can replace the target video for storage and retention. transcode The reward factor representing the resource compensation reward generated by transcoding the source video file type and replacing the target video for storage. The weight of the alternative video determines the calculation formula for the first reference resource compensation amount corresponding to the target video as follows:

[0073] Transcode(F ori )=Reward transcode *(1-∑Weight Fbak )

[0074] Step B3: Determine a target resource attribute result corresponding to the target video based on the first reference resource consumption and the first reference resource compensation.

[0075] The calculation formula for the target resource attribute result that reflects the storage value of the target video formed by the target video during the reference storage retention period is as follows:

[0076] Value(F ori )=Transcode(F ori )-Storage(F ori )

[0077] Among them, in the above formula, Value(F ori ) can be expressed by the target resource attribute result of the target video storage value, Transcode(F ori ) can be represented by the first reference resource compensation amount corresponding to the resource compensation return generated by the target video, Storage(F ori ) can be represented by a first reference resource consumption corresponding to the resource consumption cost generated by the target video.

[0078] S340: Control whether to delete or retain the target video according to the target resource attribute result.

[0079] The technical solution provided by the embodiment of the present disclosure determines the target resource attribute result corresponding to the target video when a video processing request is received. The target resource attribute result is used to indicate the relative value between the resource compensation and resource consumption generated by the target video during the reference storage retention period, and then controls the deletion or retention of the target video according to the target resource attribute result. When deciding whether to delete or continue to retain the video, this solution analyzes the resource consumption cost and resource compensation return of the video during the reference storage retention period of storage retention, and uses the resource consumption cost and resource compensation return of the video storage during the reference storage retention period to weigh whether to delete the video, thereby ensuring that the video data used by users is accurate and reliable, reducing the storage cost caused by unreliable videos, and improving video storage efficiency.

[0080] Figure 4 A flow chart of another video processing method provided for an embodiment of the present disclosure. The technical solution of this embodiment further optimizes the process of determining the target resource attribute results corresponding to the target video in the aforementioned embodiment on the basis of the technical solution of the aforementioned embodiment. This embodiment can be combined with various optional solutions in one or more of the aforementioned embodiments.

[0081] like Figure 4 As shown, the video processing method of the embodiment of the present disclosure may include the following process:

[0082] S410: Determine a target video requiring storage optimization from stored videos.

[0083] S420: When the target video is a video file type generated by transcoding the source video file, determine the storage space occupied by the target video.

[0084] It can be understood that the definition of the storage space occupancy of the target video here is similar to the definition of the storage space occupancy mentioned above. The difference is that the target video in the aforementioned embodiment belongs to the source video file type, while the target video mentioned here belongs to the video file type generated by transcoding the source video file. Therefore, the storage space occupancy will not be repeated here.

[0085] S430: Determine a target number of play times for the target video, where the target number of play times is the number of play times for the target video within a reference storage retention period.

[0086] Optionally, the target number of plays is the number of plays of the target video from the start of storage and retention of the target video to the reference storage retention period, such as the number of plays of the target video within t in the future reference storage retention period.

[0087] As an optional but non-limiting implementation, determining a target number of play times for a target video includes the following steps C1-C2:

[0088] Step C1: Determine the video content and reference play times of the target video, where the reference play times is the historical play times of the target video before the target video is continuously stored and retained.

[0089] Step C2: Determine the target playback times of the target video based on the video content of the target video and the reference playback times.

[0090] See also Figure 2 The target video's video content can be obtained, and the target video's playback log information can be used to determine the target video's historical playback count within the historical period before the target video is continued to be stored and retained. This count is recorded as a reference playback count. Furthermore, based on the target video's video content and the reference playback count, a prediction model can be used to predict the target video's playback count within the reference storage retention period, i.e., the target video's future playback count within the reference storage retention period t.

[0091] S440: Determine the target resource attribute result corresponding to the target video according to the storage space occupied by the target video and the target number of playbacks.

[0092] Among them, the target resource attribute result is determined based on the difference between the reference resource consumption and the reference resource compensation. The reference resource consumption is determined based on the resource consumption cost generated by the target video during the reference storage retention period. The reference storage retention period is the reference duration for continuing to store and retain the target video. The reference resource compensation is determined based on the resource compensation return generated by the target video during the reference storage retention period.

[0093] The target video's storage space usage is used to measure the resource consumption cost incurred by the target video during the reference storage retention period. The larger the target video's storage space usage, the greater the resource consumption cost incurred by the target video during the reference storage retention period; the smaller the target video's storage space usage, the smaller the resource consumption cost incurred by the target video during the reference storage retention period.

[0094] The target number of plays for a target video is used to measure the resource compensation return generated by the target video during the reference storage retention period. The greater the target number of plays for a target video, the greater the resource compensation return it can generate during the reference storage retention period; the smaller the target number of plays for a target video, the smaller the resource compensation return it can generate during the reference storage retention period.

[0095] As an optional but non-limiting implementation, determining the target resource attribute result corresponding to the target video according to the storage space occupied by the target video and the target number of playbacks includes steps D1-D3:

[0096] Step D1: Determine a second reference resource consumption corresponding to the target video according to the storage space occupied by the target video, where the second reference resource consumption is the storage resource consumption cost consumed by storing the target video during the reference storage retention period.

[0097] Step D2: Determine a second reference resource compensation amount corresponding to the target video based on the target number of plays. The second reference compensation amount is determined based on the resource compensation return generated by the network bandwidth occupied when playing the target video and the video playback effect during the reference storage retention period.

[0098] Step D3: Determine a target resource attribute result corresponding to the target video based on the second reference resource consumption and the second reference resource compensation.

[0099] The network bandwidth occupied by the video and the video playback effect are obtained by comparing them with each other. By comparing and analyzing the target video and the alternative videos, we can obtain the resource compensation return generated by the network bandwidth occupied by the target video and the video playback effect when playing the target video relative to the alternative videos. This may be positive compensation or negative compensation. Then, the target number of playbacks combined with the resource compensation for the network bandwidth occupied by the video and the video playback effect is the resource compensation brought by the network bandwidth occupied by the video and the video playback effect.

[0100] The target number of plays is derived from a prediction based on the historical number of plays of the target video and the video content of the target video before the target video is continued to be stored and retained. Because the more recent the changes in the prediction, the more accurate it is, it does not predict all future play times of the target video file, but only predicts the play times of the target video within the reference storage retention period, that is, it only predicts the play times of the target video within the future time t.

[0101] As an optional but non-limiting implementation method, the second reference compensation amount is determined based on the first reference amount and the second reference amount within the reference storage retention period. The first reference amount is determined based on the resource compensation return brought by the network bandwidth occupied when the target video is played relative to the alternative video. The second reference amount is determined based on the resource compensation return brought by the video playback effect when the target video is played relative to the alternative video. The alternative video is a video file generated by transcoding a video of the source video file type and can replace the target video for storage and retention.

[0102] Video playback performance is the most difficult aspect to measure. It not only considers video quality but also any lag caused by network bandwidth requirements and device decoding issues. In a strong network, there can be no lag. However, in a weak network, the degree of lag needs to be checked. Therefore, it's necessary to determine the network speed requirements corresponding to the bitrate used to store the video. If the target video has high bandwidth requirements, while the alternative video has low bandwidth requirements, it can be assumed that the lag caused by the network bandwidth of the target video is greater than that of the alternative video.

[0103] The model coverage and the smoothness score of the machine's video playback mainly focus on the stuttering status of low-scoring models. Therefore, the minimum required score of the decoder stored in this video is needed. The model score can measure the performance of the playback device, that is, it is expressed as the comprehensive CPU and GPU decoding performance. If the target video has high performance requirements for the playback device, while the alternative video has low performance requirements for the playback device, it is considered that the stuttering of the target video due to the performance of the playback device is greater than that of the alternative video.

[0104] As an optional but non-limiting implementation, determining the second reference resource compensation amount corresponding to the target video according to the target number of playbacks includes the following steps E1-E2:

[0105] Step E1: Determine the storage space occupancy difference between the storage space occupancy of the target video and the storage space occupancy of the candidate videos.

[0106] Step E2: Determine the resource compensation return brought by the network bandwidth occupied by the target video relative to the alternative video when playing it based on the difference in storage space occupancy and the target number of playbacks, so as to obtain a second reference resource compensation amount corresponding to the target video. The alternative video is a video file generated by transcoding a video of the source video file type and can replace the target video for storage and retention.

[0107] Optionally, the storage space occupied by the target video, Size (F ori ), F ori Indicates the target video file, Size(Fori ) represents the video file size or storage space occupied by the target video file. At the same time, the storage space occupied by the candidate video can also be determined. bak ), F bak Indicates the alternative video file, Size(F bak ) represents the video file size or storage space occupied by the candidate video file; and determines the target number of playbacks of the target video. t (F ori ). The calculation formula for determining the resource compensation return brought by the network bandwidth occupied by the target video relative to the alternative videos when played based on the difference in storage space usage and the target number of plays is as follows:

[0108] Bandwidth(F ori )=C bandwidth *View t (F ori )*(Size(F ori )-Size(F bak ))

[0109] Among them, Bandwidth(F ori ) represents the resource compensation return brought by the network bandwidth occupied when the target video is played relative to the alternative video, C bandwidth Indicates the calculation factor of the resource compensation return brought by network bandwidth, which is mainly related to the unit price of CDN network bandwidth. t (F ori ) represents the target number of playbacks of the target video, Size(F ori ) indicates the video file size or storage space occupied by the target video file. Size(F bak ) indicates the video file size or storage space occupied by the alternative video file.

[0110] As another optional but non-limiting implementation, determining the second reference resource compensation amount corresponding to the target video according to the target number of playbacks includes the following steps F1-F2:

[0111] Step F1: Determine the video quality difference between the target video and the candidate video.

[0112] Step F2: Determine the network bandwidth difference between the network bandwidth required to play the target video and the network bandwidth required to play the candidate video.

[0113] Step F3: Determine the performance difference between the playback device performance required for playing the target video and the playback device performance required for playing the candidate video.

[0114] Step F4: Determine the resource compensation return brought by the video playback effect when the target video is played relative to the alternative video based on the video quality difference, network bandwidth difference and / or playback device performance difference, so as to obtain a second reference resource compensation amount corresponding to the target video.

[0115] Optionally, the video quality of the target video can be determined. ori ) and determine the video quality of the candidate video (F bak ); At the same time, you can also determine the network bandwidth limit required to play the target video bandwidth (F ori ) and the network bandwidth limit required to play the alternative videos bandwidth (F bak ); and, determining the playback device performance Limit required to play the target video score (F ori ) and the performance limit of the playback device required to play the alternative video score (F bak ).

[0116] The calculation formula for determining the resource compensation return brought by the video playback effect when the target video is played relative to the alternative videos based on the video quality difference, network bandwidth difference, and / or playback device performance difference is as follows:

[0117] Experience(F ori )

[0118] =View t (F)*(Quality(F ori )-Quality(F bak ))+Penalty bandwidth

[0119] *Min(0,Limit bandwidth (F ori )-Limit bandwidth (F bak ))+Penalty score

[0120] *Min(0,Limit score (F ori )-Limit score (F bak ))

[0121] Among them, Experience(F ori ) indicates the resource compensation return brought by the video playback effect when the target video is played relative to the alternative video. t (F ori ) represents the target number of playbacks corresponding to the target video, Quality (F ori ) indicates the video quality corresponding to the target video, Quality(F bak ) indicates the video quality corresponding to the alternative video, Penalty bandwidth Indicates the calculation factor for resource compensation due to network bandwidth lag. Limit bandwidth (F ori ) indicates the network bandwidth required to play the target video, Limit bandwidth (F bak ) indicates the network bandwidth required to play the alternative video. Penalty score Indicates the calculation factor for resource compensation due to playback device performance. score (F ori ) indicates the performance of the playback device required to play the target video. score (F bak ) The playback device performance required to play the alternative videos. The playback performance can be expressed by the model score required by the video. The model score is a combination of the decoding performance of the CPU and GPU.

[0122] Optionally, a calculation formula for a target resource attribute result that reflects the storage value of the target video formed by the target video during the reference storage retention period is as follows:

[0123] Value(F ori )=Bandwidth(F ori )+Experience(F ori )-Storage(F ori )

[0124] Among them, in the above formula, Value(F ori ) can be represented by the target resource attribute result of the target video storage value, Storage(F ori ) can be represented by the second reference resource consumption corresponding to the resource consumption cost generated by the target video, Bandwidth (F ori ) can be represented by a second reference resource compensation amount corresponding to the resource compensation return brought by the network bandwidth occupied when the target video is played relative to the alternative video, Experience (Fori ) can be represented by a second reference resource compensation amount corresponding to the resource compensation return brought by the video playback effect when the target video is played relative to the alternative video.

[0125] S450: Control whether to delete or retain the target video according to the target resource attribute result.

[0126] The technical solution provided by the embodiment of the present disclosure determines the target resource attribute result corresponding to the target video when a video processing request is received. The target resource attribute result is used to indicate the relative value between the resource compensation and resource consumption generated by the target video during the reference storage retention period, and then controls the deletion or retention of the target video according to the target resource attribute result. When deciding whether to delete or continue to retain the video, this solution analyzes the resource consumption cost and resource compensation return of the video during the reference storage retention period of storage retention, and uses the resource consumption cost and resource compensation return of the video storage during the reference storage retention period to weigh whether to delete the video, ensuring that the video data used by users is accurate and reliable, reducing the storage cost caused by unreliable videos, and improving video storage efficiency. At the same time, the type of video file is taken into consideration, and the resource consumption and resource compensation return of video storage are integrated together to achieve an accurate evaluation of the video storage value.

[0127] Figure 5 This is a structural diagram of a video processing device provided in an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to situations where the life cycle of video storage is managed to effectively delete or retain the video. The video processing device can be implemented in the form of software and / or hardware and is generally integrated into any electronic device with network communication function, which can be a mobile terminal, PC or server, etc.

[0128] like Figure 5 As shown, the video processing device of the embodiment of the present disclosure may include: a determination module 510 and a processing module 520. Among them:

[0129] A selection module 510 is configured to determine a target video that needs to be optimized for storage from among the stored videos;

[0130] Determination module 520 is used to determine a target resource attribute result corresponding to the target video. The target resource attribute result is determined based on the difference between a reference resource consumption amount and a reference resource compensation amount. The reference resource consumption amount is determined based on the resource consumption cost generated by the target video during a reference storage retention period. The reference storage retention period is a reference duration for continuing to store and retain the target video. The reference resource compensation amount is determined based on the resource compensation return generated by the target video during the reference storage retention period.

[0131] The processing module 530 is configured to control the deletion or retention of the target video according to the target resource attribute result.

[0132] Based on the technical solution of the above embodiment, optionally, determining the target resource attribute result corresponding to the target video includes:

[0133] When the target video belongs to the source video file type, determining the storage space occupied by the target video and the weight of the alternative video, wherein the weight of the alternative video can represent the amount of resource compensation return that can be generated by the alternative video, and the alternative video is a video file generated by transcoding a video of the source video file type and can replace the target video to continue to be stored and retained;

[0134] The target resource attribute result corresponding to the target video is determined based on the storage space occupied by the target video and the weight of the alternative videos.

[0135] Based on the technical solution of the above embodiment, optionally, the target resource attribute result corresponding to the target video is determined according to the storage space occupied by the target video and the weight of the candidate videos, including:

[0136] Determining a first reference resource consumption corresponding to the target video according to the storage space occupied by the target video, where the first reference resource consumption is a storage resource consumption cost consumed by storing the target video during a reference storage retention period;

[0137] Determining a first reference resource compensation amount corresponding to the target video according to the weight of the candidate video, the first reference resource compensation amount being the resource compensation return that can be generated by the target video during the reference storage retention period, the weight of the candidate video being positively correlated with the resource compensation return generated by the candidate video, and the resource compensation return that can be generated by the candidate video being negatively correlated with the resource compensation return that can be generated by the target video;

[0138] Based on the first reference resource consumption and the first reference resource compensation, a target resource attribute result corresponding to the target video is determined.

[0139] Based on the technical solution of the above embodiment, optionally, determining the target resource attribute result corresponding to the target video includes:

[0140] When the target video is a video file type generated by transcoding a source video file, determining the storage space occupied by the target video;

[0141] Determining a target number of plays for a target video, where the target number of plays is the number of plays for the target video within a reference storage retention period;

[0142] The target resource attribute result corresponding to the target video is determined based on the storage space occupied by the target video and the target number of playbacks.

[0143] Based on the technical solution of the above embodiment, optionally, determining a target number of play times of the target video includes:

[0144] Determining the video content and reference play count of the target video, where the reference play count is the historical play count of the target video before the target video is continuously stored and retained;

[0145] A target number of plays of the target video is determined according to the video screen content of the target video and a reference number of plays.

[0146] Based on the technical solution of the above embodiment, optionally, the target resource attribute result corresponding to the target video is determined according to the storage space occupied by the target video and the target number of playbacks, including:

[0147] Determining a second reference resource consumption corresponding to the target video according to the storage space occupied by the target video, where the second reference resource consumption is a storage resource consumption cost consumed by storing the target video during a reference storage retention period;

[0148] Determining a second reference resource compensation amount corresponding to the target video according to the target number of playbacks, wherein the second reference compensation amount is determined based on a resource compensation return generated by network bandwidth occupied when playing the target video and a video playback effect during a reference storage retention period;

[0149] Based on the second reference resource consumption and the second reference resource compensation, a target resource attribute result corresponding to the target video is determined.

[0150] Based on the technical solution of the above embodiment, optionally, the second reference compensation amount is determined based on the first reference amount and the second reference amount within the reference storage retention period, the first reference amount is determined based on the resource compensation return brought by the network bandwidth occupied when the target video is played relative to the alternative video, and the second reference amount is determined based on the resource compensation return brought by the video playback effect when the target video is played relative to the alternative video. The alternative video is a video file generated by transcoding a video of the source video file type and can replace the target video for storage and retention.

[0151] Based on the technical solution of the above embodiment, optionally, determining the second reference resource compensation amount corresponding to the target video according to the target number of playbacks includes:

[0152] Determining a storage space occupancy difference between a storage space occupancy of the target video and a storage space occupancy of the candidate videos;

[0153] The resource compensation return brought by the network bandwidth occupied by the target video when playing relative to the alternative video is determined based on the storage space occupancy difference and the target number of playbacks to obtain a second reference resource compensation amount corresponding to the target video.

[0154] Based on the technical solution of the above embodiment, optionally, determining the second reference resource compensation amount corresponding to the target video according to the target number of playbacks includes:

[0155] Determining a video quality difference between the target video and the candidate video;

[0156] Determining a network bandwidth difference between a network bandwidth required to play the target video and a network bandwidth required to play the candidate video;

[0157] Determining a playback device performance difference between playback device performance required for playing the target video and playback device performance required for playing the candidate video;

[0158] Based on the video quality difference, network bandwidth difference and / or playback device performance difference, determine the resource compensation return brought by the video playback effect when the target video is played relative to the alternative video to obtain a second reference resource compensation amount corresponding to the target video.

[0159] Based on the technical solution of the above embodiment, optionally, controlling the deletion or retention of the target video according to the target resource attribute result includes:

[0160] If it is determined according to the target resource attribute result that the target video meets the preset deletion condition, the target video is deleted;

[0161] If it is determined according to the target resource attribute result that the target video does not meet the preset deletion condition, the target video will continue to be stored and retained.

[0162] Based on the technical solution of the above embodiment, optionally, deleting the target video includes:

[0163] Generate a target video deletion task corresponding to the target video, and write the target video deletion task into a video deletion message queue;

[0164] Sequentially capture the target video deletion task from the video deletion message queue for task execution, and delete the target video corresponding to the target video deletion task.

[0165] The technical solution provided by the embodiment of the present disclosure determines the target resource attribute result corresponding to the target video when a video processing request is received. The target resource attribute result is used to indicate the relative value between the resource compensation and resource consumption generated by the target video during the reference storage retention period, and then controls the deletion or retention of the target video according to the target resource attribute result. When deciding whether to delete or continue to retain the video, this solution analyzes the resource consumption cost and resource compensation return of the video during the reference storage retention period, and uses the resource consumption cost and resource compensation return within the reference storage period of the video to weigh whether to delete the video, thereby ensuring that the video data used by users is accurate and reliable, reducing the storage cost caused by unreliable videos, and improving video storage efficiency.

[0166] The video processing device provided in the embodiments of the present disclosure can execute the video processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the video processing method.

[0167] It is worth noting that the various units and modules included in the above-mentioned device 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 protection scope of the embodiments of the present disclosure.

[0168] Figure 6 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 6 , which shows an electronic device (eg Figure 6 The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0169] like Figure 6As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An edit / output (I / O) interface 605 is also connected to the bus 604.

[0170] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0171] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the video processing method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the video processing method of the embodiment of the present disclosure are performed.

[0172] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0173] The electronic device provided by the embodiment of the present disclosure and the video processing method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0174] An embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the video processing method provided by the above embodiment is implemented.

[0175] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0176] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0177] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0178] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: determines the target video that needs to be stored optimized from the stored videos; determines the target resource attribute result corresponding to the target video, and the target resource attribute result is determined based on the difference between the reference resource consumption and the reference resource compensation. The reference resource consumption is determined based on the resource consumption cost generated by the target video during the reference storage retention period. The reference storage retention period is the reference duration for continuing to store and retain the target video. The reference resource compensation is determined based on the resource compensation return generated by the target video during the reference storage retention period; and controls the deletion or retention of the target video according to the target resource attribute result.

[0179] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0180] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0181] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0182] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0183] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0184] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0185] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0186] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A video processing method, characterized in that: The method comprises: Determine target videos requiring storage optimization from stored videos; Determining a target resource attribute result corresponding to a target video, wherein the target resource attribute result is determined based on a difference between a reference resource consumption amount and a reference resource compensation amount, wherein the reference resource consumption amount is determined based on a resource consumption cost generated by the target video during a reference storage retention period, wherein the reference storage retention period is a reference duration for continued storage retention of the target video, and the reference resource compensation amount is determined based on a resource compensation return generated by the target video during the reference storage retention period; The target video is deleted or retained according to the target resource attribute result.

2. The method according to claim 1, characterized in that Determine the target resource attribute results corresponding to the target video, including: When the target video belongs to the source video file type, determining the storage space occupied by the target video and the weight of the alternative video, wherein the weight of the alternative video can represent the amount of resource compensation return that can be generated by the alternative video, and the alternative video is a video file generated by transcoding a video of the source video file type and can replace the target video to continue to be stored and retained; The target resource attribute result corresponding to the target video is determined based on the storage space occupied by the target video and the weight of the alternative videos.

3. The method according to claim 2, characterized in that Based on the storage space occupied by the target video and the weights of the candidate videos, the target resource attribute results corresponding to the target video are determined, including: Determining a first reference resource consumption corresponding to the target video according to the storage space occupied by the target video, where the first reference resource consumption is a storage resource consumption cost consumed by storing the target video during a reference storage retention period; Determining a first reference resource compensation amount corresponding to the target video according to the weight of the candidate video, the first reference resource compensation amount being the resource compensation return that can be generated by the target video during the reference storage retention period, the weight of the candidate video being positively correlated with the resource compensation return generated by the candidate video, and the resource compensation return that can be generated by the candidate video being negatively correlated with the resource compensation return that can be generated by the target video; Based on the first reference resource consumption and the first reference resource compensation, a target resource attribute result corresponding to the target video is determined.

4. The method according to claim 1, wherein Determine the target resource attribute results corresponding to the target video, including: When the target video is a video file type generated by transcoding a source video file, determining the storage space occupied by the target video; Determining a target number of plays for a target video, where the target number of plays is the number of plays for the target video within a reference storage retention period; The target resource attribute result corresponding to the target video is determined based on the storage space occupied by the target video and the target number of playbacks.

5. The method according to claim 4, characterized in that Determine the target number of views for your target video, including: Determining the video content and reference play count of the target video, where the reference play count is the historical play count of the target video before the target video is continuously stored and retained; A target number of plays of the target video is determined according to the video screen content of the target video and a reference number of plays.

6. The method according to claim 4, characterized in that Determine the target resource attribute results corresponding to the target video based on the target video's storage space usage and target number of plays, including: Determining a second reference resource consumption corresponding to the target video according to the storage space occupied by the target video, where the second reference resource consumption is a storage resource consumption cost consumed by storing the target video during a reference storage retention period; Determining a second reference resource compensation amount corresponding to the target video according to the target number of playbacks, wherein the second reference compensation amount is determined based on a resource compensation return generated by network bandwidth occupied when playing the target video and a video playback effect during a reference storage retention period; Based on the second reference resource consumption and the second reference resource compensation, a target resource attribute result corresponding to the target video is determined.

7. The method according to claim 6, characterized in that The second reference compensation amount is determined based on the first reference amount and the second reference amount within the reference storage retention period. The first reference amount is determined based on the resource compensation return brought by the network bandwidth occupied when the target video is played relative to the alternative video. The second reference amount is determined based on the resource compensation return brought by the video playback effect when the target video is played relative to the alternative video. The alternative video is a video file generated by transcoding a video of the source video file type and can replace the target video for storage and retention.

8. The method according to claim 7, characterized in that Determining a second reference resource compensation amount corresponding to the target video according to the target number of playbacks includes: Determining a storage space occupancy difference between a storage space occupancy of the target video and a storage space occupancy of the candidate videos; The resource compensation return brought by the network bandwidth occupied by the target video when playing relative to the alternative video is determined based on the storage space occupancy difference and the target number of playbacks to obtain a second reference resource compensation amount corresponding to the target video.

9. The method according to claim 7, characterized in that Determining a second reference resource compensation amount corresponding to the target video according to the target number of playbacks includes: Determining a video quality difference between the target video and the candidate video; Determining a network bandwidth difference between a network bandwidth required to play the target video and a network bandwidth required to play the candidate video; Determining a playback device performance difference between playback device performance required for playing the target video and playback device performance required for playing the candidate video; Based on the video quality difference, network bandwidth difference and / or playback device performance difference, determine the resource compensation return brought by the video playback effect when the target video is played relative to the alternative video to obtain a second reference resource compensation amount corresponding to the target video.

10. A video processing device, characterized in that: The device comprises: A selection module is used to determine a target video that needs storage optimization from the stored videos; a determination module, configured to determine a target resource attribute result corresponding to a target video, wherein the target resource attribute result is determined based on a difference between a reference resource consumption amount and a reference resource compensation amount, wherein the reference resource consumption amount is determined based on a resource consumption cost generated by the target video during a reference storage retention period, wherein the reference storage retention period is a reference duration for continued storage and retention of the target video, and the reference resource compensation amount is determined based on a resource compensation return generated by the target video during the reference storage retention period; A processing module is used to control the deletion or retention of the target video according to the target resource attribute result.

11. An electronic device, characterized in that: The electronic 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 video processing method according to any one of claims 1 to 9.

12. A storage medium containing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the video processing method according to any one of claims 1 to 9.