Training method of transcoding parameter model, video transcoding method and device

By training the transcoding parameter model, dynamically adjusting the encoding parameters according to the characteristics of the video, the problem of unsatisfactory video compression effect in the prior art is solved, and more efficient and high-quality video transcoding is achieved.

CN114298199BActive Publication Date: 2025-02-28BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111588656.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2025-02-28
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

Existing video compression technology is difficult to dynamically adjust the encoding parameters according to the characteristics of different videos, resulting in unsatisfactory compression effect for some videos.

Method used

By acquiring multiple feature values ​​of the video, the associated video features associated with each adjustable parameter are determined, and the transcoding parameter model is trained based on these features, and the parameter values ​​in the video transcoding process are dynamically adjusted.

Benefits of technology

The efficiency and quality of video transcoding are improved, and the output file size can be reduced while ensuring video quality can be reduced, or the video quality can be improved while the file size is fixed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present disclosure provides a training method for a transcoding parameter model, a video transcoding method and a device. The training method comprises: obtaining each adjustable parameter of at least one adjustable parameter used in a video transcoding process; obtaining a training sample set, wherein the training sample set comprises: feature values ​​of multiple video features of each training video; based on the training sample set, determining associated video features related to each adjustable parameter from the multiple video features; based on the associated video features, training each transcoding parameter model, wherein each transcoding parameter model is a transcoding parameter model corresponding to each adjustable parameter used in a video transcoding process; wherein the input of each transcoding parameter model is: the feature value of the associated video feature of the adjustable parameter corresponding to the transcoding parameter model; and the output of each transcoding parameter model is: the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model when performing video transcoding processing on a video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of electronic technology, and more specifically, to a training method for a transcoding parameter model, a video transcoding method and a device. Background Art

[0002] With the advancement of communication and Internet technologies, especially the popularity of smart phones and the maturity and development of 4G and 5G mobile communication technologies, various video entertainment methods such as video chat and video games are emerging in an endless stream, and the consumption demand of ordinary users for videos is also growing, which means that most Internet traffic will be generated by videos. However, the massive amount of video data has brought huge challenges to the transmission, storage and other processing of videos. Video processing technologies such as video encoding and decoding have become crucial.

[0003] For a certain video compression application scenario, a set of pre-processing solutions and a set of fixed encoding parameters are generally given to an encoder, which can achieve a good compression effect for some videos, but may not achieve the ideal compression effect for other videos. Summary of the invention

[0004] An exemplary embodiment of the present disclosure provides a training method for a transcoding parameter model, a video transcoding method and an apparatus, which can dynamically adjust the parameter values ​​of parameters used for transcoding a video according to the characteristics of each video.

[0005] According to a first aspect of an embodiment of the present disclosure, a method for training a transcoding parameter model is provided, comprising: obtaining each adjustable parameter of at least one adjustable parameter used in a video transcoding process; obtaining a training sample set, wherein the training sample set comprises: feature values ​​of a plurality of video features of each training video; based on the training sample set, determining associated video features related to each adjustable parameter from the plurality of video features; based on the associated video features, training respective transcoding parameter models, wherein the respective transcoding parameter models are transcoding parameter models corresponding to each adjustable parameter used in the video transcoding process; wherein the input of each transcoding parameter model is: the feature value of the associated video feature of the adjustable parameter corresponding to the transcoding parameter model; and the output of each transcoding parameter model is: the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model when performing video transcoding processing on the video.

[0006] Optionally, the training sample set also includes: the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video; wherein, based on the associated video features, the step of training each transcoding parameter model includes: for each transcoding parameter model, inputting the feature value of the associated video feature corresponding to the transcoding parameter model of each training video into the transcoding parameter model to obtain the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model for the training video; determining the loss function of the transcoding parameter model based on the actual optimal value and predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model for the training video; and training the transcoding parameter model by adjusting the parameters of the transcoding parameter model according to the loss function.

[0007] Optionally, based on the training sample set, the step of determining associated video features related to each adjustable parameter from the multiple video features includes: for each adjustable parameter, determining the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video; and determining a preset number of video features with the highest correlation as associated video features of the adjustable parameter.

[0008] Optionally, the step of obtaining a training sample set includes: obtaining at least one candidate value corresponding to each adjustable parameter; determining all possible parameter value combinations based on the at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: a candidate value corresponding to each adjustable parameter; for each training video, performing video transcoding processing on the training video according to each parameter value combination to obtain a transcoding processing result of the training video corresponding to the parameter value combination; based on the transcoding processing result of each training video, determining the parameter value combination with the best video transcoding processing effect for the training video, and determining each candidate value in the parameter value combination as the actual optimal value of each adjustable parameter for the training video.

[0009] Optionally, based on the transcoding result of each training video, the step of determining the parameter value combination that has the best video transcoding effect for the training video includes: determining the bit rate and transcoding quality score corresponding to each transcoding result of each training video; determining, from all possible transcoding result combinations, the transcoding result combination with the smallest total bit rate among the transcoding result combinations whose total transcoding quality score is greater than or equal to the score threshold, or determining the transcoding result combination with the largest total transcoding quality score among the transcoding result combinations whose total bit rate is less than or equal to the bit rate threshold; and determining the parameter value combination that has the best video transcoding effect for the training video. For each transcoding processing result in the transcoding processing result combination, each candidate value in the parameter value combination corresponding to the transcoding processing result is determined as the actual optimal value of each adjustable parameter of the training video corresponding to the transcoding processing result; wherein each transcoding processing result combination includes: a transcoding processing result of each training video; wherein the total transcoding quality score of the transcoding processing result combination is the sum of the transcoding quality scores corresponding to each transcoding processing result in the transcoding processing result combination; and the total bit rate of the transcoding processing result combination is the sum of the bit rates corresponding to each transcoding processing result in the transcoding processing result combination.

[0010] Optionally, the step of determining, from all possible transcoding result combinations, a transcoding result combination with the smallest total bitrate among the transcoding result combinations with a total transcoding quality score greater than or equal to a score threshold includes: using an optimization algorithm to determine, from all possible transcoding result combinations, a transcoding result combination with the smallest total bitrate among the transcoding result combinations with a total transcoding quality score greater than or equal to the score threshold; wherein, from all possible transcoding result combinations, the step of determining, from all possible transcoding result combinations, a transcoding result combination with the largest total transcoding quality score among the transcoding result combinations with a total bitrate less than or equal to a bitrate threshold includes: using an optimization algorithm to determine, from all possible transcoding result combinations, a transcoding result combination with the largest total transcoding quality score among the transcoding result combinations with a total bitrate less than or equal to a bitrate threshold; wherein, the optimization algorithm includes at least one of the following: a knapsack algorithm, a dynamic programming algorithm, and a greedy algorithm.

[0011] Optionally, the at least one adjustable parameter used in the video transcoding process includes: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

[0012] Optionally, the multiple video features include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

[0013] According to a second aspect of an embodiment of the present disclosure, a video transcoding method is provided, comprising: obtaining a target video to be transcoded; determining, for each adjustable parameter of at least one adjustable parameter used in the video transcoding process, a feature value of an associated video feature of the target video for the adjustable parameter; inputting the feature value of the associated video feature of the target video for each adjustable parameter into a transcoding parameter model corresponding to the adjustable parameter to obtain a predicted optimal value of the adjustable parameter for the target video; and transcoding the target video using the predicted optimal values ​​of the respective adjustable parameters for the target video.

[0014] Optionally, each transcoding parameter model is trained based on a training sample set; wherein the training sample set includes: feature values ​​of multiple video features of each training video and an actual optimal value of each adjustable parameter when performing video transcoding processing on each training video.

[0015] Optionally, the associated video features of each adjustable parameter are determined based on the training sample set in the following manner: for each adjustable parameter, the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video is determined; and a preset number of video features with the highest correlation are determined as the associated video features of the adjustable parameter.

[0016] Optionally, the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video is obtained in the following manner: obtaining at least one candidate value corresponding to each adjustable parameter; determining all possible parameter value combinations based on the at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: a candidate value corresponding to each adjustable parameter; for each training video, performing video transcoding processing on the training video according to each parameter value combination, and obtaining a transcoding processing result of the training video corresponding to the parameter value combination; based on the transcoding processing result of each training video, determining the parameter value combination with the best video transcoding processing effect for the training video, and determining each candidate value in the parameter value combination as the actual optimal value of each adjustable parameter for the training video.

[0017] Optionally, the at least one adjustable parameter used in the video transcoding process includes: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

[0018] Optionally, the associated video features include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

[0019] According to a third aspect of an embodiment of the present disclosure, a training device for a transcoding parameter model is provided, comprising: an adjustable parameter acquisition unit, configured to acquire each adjustable parameter of at least one adjustable parameter used in a video transcoding process; a training sample set acquisition unit, configured to acquire a training sample set, wherein the training sample set comprises: feature values ​​of a plurality of video features of each training video; an associated feature determination unit, configured to determine, based on the training sample set, associated video features associated with each adjustable parameter from the plurality of video features; a training unit, configured to train respective transcoding parameter models based on the associated video features, wherein each transcoding parameter model is a transcoding parameter model corresponding to each adjustable parameter used in the video transcoding process; wherein the input of each transcoding parameter model is: the feature value of the associated video feature of the adjustable parameter corresponding to the transcoding parameter model; and the output of each transcoding parameter model is: the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model when performing video transcoding process on a video.

[0020] Optionally, the training sample set also includes: the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video; wherein the training unit is configured to: for each transcoding parameter model, input the feature value of the associated video feature corresponding to the transcoding parameter model of each training video into the transcoding parameter model to obtain the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model for the training video; determine the loss function of the transcoding parameter model based on the actual optimal value and predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model for the training video; and train the transcoding parameter model by adjusting the parameters of the transcoding parameter model according to the loss function.

[0021] Optionally, the associated feature determination unit is configured to: for each adjustable parameter, determine the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video; and determine a preset number of video features with the highest correlation as associated video features of the adjustable parameter.

[0022] Optionally, the training sample set acquisition unit is configured to: obtain at least one candidate value corresponding to each adjustable parameter; determine all possible parameter value combinations based on the at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: a candidate value corresponding to each adjustable parameter; for each training video, perform video transcoding processing on the training video according to each parameter value combination to obtain a transcoding processing result of the training video corresponding to the parameter value combination; based on the transcoding processing result of each training video, determine the parameter value combination with the best video transcoding processing effect for the training video, and determine each candidate value in the parameter value combination as the actual optimal value of each adjustable parameter for the training video.

[0023] Optionally, the training sample set acquisition unit is configured to: determine the bit rate and transcoding quality score corresponding to each transcoding processing result of each training video; determine, from all possible transcoding processing result combinations, the transcoding processing result combination with the smallest total bit rate among the transcoding processing result combinations whose total transcoding quality score is greater than or equal to the score threshold, or determine the transcoding processing result combination with the largest total transcoding quality score among the transcoding processing result combinations whose total bit rate is less than or equal to the bit rate threshold; for each transcoding processing result in the determined transcoding processing result combination, determine each candidate value in the parameter value combination corresponding to the transcoding processing result as the actual optimal value of each adjustable parameter of the training video corresponding to the transcoding processing result; wherein each transcoding processing result combination includes: a transcoding processing result of each training video; wherein the total transcoding quality score of the transcoding processing result combination is the sum of the transcoding quality scores corresponding to each transcoding processing result in the transcoding processing result combination; and the total bit rate of the transcoding processing result combination is the sum of the bit rates corresponding to each transcoding processing result in the transcoding processing result combination.

[0024] Optionally, the training sample set acquisition unit is configured to: use an optimization algorithm to determine, from all possible transcoding result combinations, a transcoding result combination with the smallest total bitrate among the transcoding result combinations with a total transcoding quality score greater than or equal to a score threshold; wherein the training sample set acquisition unit is configured to: use an optimization algorithm to determine, from all possible transcoding result combinations, a transcoding result combination with the largest total transcoding quality score among the transcoding result combinations with a total bitrate less than or equal to a bitrate threshold; wherein the optimization algorithm includes at least one of the following items: a knapsack algorithm, a dynamic programming algorithm, and a greedy algorithm.

[0025] Optionally, the at least one adjustable parameter used in the video transcoding process includes: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

[0026] Optionally, the multiple video features include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

[0027] According to a fourth aspect of an embodiment of the present disclosure, a video transcoding device is provided, comprising: a target video acquisition unit, configured to acquire a target video to be transcoded; a feature value determination unit, configured to determine, for each adjustable parameter of at least one adjustable parameter used in the video transcoding process, a feature value of an associated video feature of the target video for the adjustable parameter; a prediction unit, configured to input the feature value of the associated video feature of the target video for each adjustable parameter into a transcoding parameter model corresponding to the adjustable parameter, to obtain a predicted optimal value of the adjustable parameter for the target video; and a transcoding processing unit, configured to perform transcoding processing on the target video using the predicted optimal values ​​of the respective adjustable parameters for the target video.

[0028] Optionally, each transcoding parameter model is trained based on a training sample set; wherein the training sample set includes: feature values ​​of multiple video features of each training video and an actual optimal value of each adjustable parameter when performing video transcoding processing on each training video.

[0029] Optionally, the associated video features of each adjustable parameter are determined based on the training sample set in the following manner: for each adjustable parameter, the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video is determined; and a preset number of video features with the highest correlation are determined as the associated video features of the adjustable parameter.

[0030] Optionally, the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video is obtained in the following manner: obtaining at least one candidate value corresponding to each adjustable parameter; determining all possible parameter value combinations based on the at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: a candidate value corresponding to each adjustable parameter; for each training video, performing video transcoding processing on the training video according to each parameter value combination, and obtaining a transcoding processing result of the training video corresponding to the parameter value combination; based on the transcoding processing result of each training video, determining the parameter value combination with the best video transcoding processing effect for the training video, and determining each candidate value in the parameter value combination as the actual optimal value of each adjustable parameter for the training video.

[0031] Optionally, the at least one adjustable parameter used in the video transcoding process includes: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

[0032] Optionally, the associated video features include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

[0033] According to a fifth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: at least one processor; and at least one memory storing computer executable instructions, wherein when the computer executable instructions are executed by the at least one processor, the at least one processor is prompted to execute the training method of the transcoding parameter model as described above and / or the video transcoding method as described above.

[0034] According to a sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to execute the training method of the transcoding parameter model as described above and / or the video transcoding method as described above.

[0035] According to a seventh aspect of an embodiment of the present disclosure, a computer program product is provided, comprising computer instructions, which, when executed by at least one processor, implement the training method of the transcoding parameter model as described above and / or the video transcoding method as described above.

[0036] According to the training method of the transcoding parameter model, the video transcoding method and the device of the exemplary embodiment of the present disclosure, it is possible to dynamically adjust the parameter values ​​of the parameters used for transcoding the video according to the characteristics of each video, so that the transcoding effect of the video can be optimized, for example, the transcoding efficiency and transcoding quality can be improved.

[0037] In addition, compared with the related art, the exemplary embodiments of the present disclosure can, for the same input video, controllably reduce the output file size while ensuring similar quality of the output video; or significantly improve the quality of the output video while keeping the output file size the same.

[0038] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0040] Figure 1 A flowchart showing a method for training a transcoding parameter model according to an exemplary embodiment of the present disclosure;

[0041] Figure 2 A flowchart showing a method for obtaining actual optimal values ​​of adjustable parameters of a training video according to an exemplary embodiment of the present disclosure;

[0042] Figure 3 An example of a training method of a transcoding parameter model according to an exemplary embodiment of the present disclosure is shown;

[0043] Figure 4 Another example of a training method of a transcoding parameter model according to an exemplary embodiment of the present disclosure is shown;

[0044] Figure 5 A flowchart showing a video transcoding method according to an exemplary embodiment of the present disclosure is shown;

[0045] Figure 6 A structural block diagram showing a training device for a transcoding parameter model according to an exemplary embodiment of the present disclosure is shown;

[0046] Figure 7 A structural block diagram of a video transcoding device according to an exemplary embodiment of the present disclosure is shown;

[0047] Figure 8 A structural block diagram of an electronic device according to an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0048] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0049] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0050] It should be noted that the phrase "at least one of the items" in the present disclosure includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.

[0051] Figure 1 A flowchart of a method for training a transcoding parameter model according to an exemplary embodiment of the present disclosure is shown.

[0052] Reference Figure 1In step S101, each adjustable parameter of at least one adjustable parameter used in video transcoding processing is obtained.

[0053] As an example, an adjustable parameter is a parameter whose value can be adaptively adjusted for different input videos. At least one parameter used in the video transcoding process can be designated as an adjustable parameter based on actual conditions and requirements, parameter characteristics, etc., so that the transcoding parameter model can be used to selectively select suitable adjustable parameter values ​​for the video according to the characteristics of the video to perform transcoding processing on the video, so that better transcoding processing of the video can be achieved.

[0054] As an example, the at least one adjustable parameter used in the video transcoding process may include, but is not limited to: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

[0055] As an example, the video pre-coding processing may include, but is not limited to, enhancement processing. As an example, the enhancement processing may include, but is not limited to, at least one of the following processing: noise reduction, super-resolution, deblurring, and deinterlacing. It should be understood that the video pre-coding processing may also include other types of processing that needs to be performed on the video before encoding, such as scaling processing, which is not limited by the present disclosure. It should be understood that the enhancement processing may also include other types of processing that makes the video clearer, which is not limited by the present disclosure.

[0056] In step S102, a training sample set is obtained.

[0057] The training sample set includes: feature values ​​of multiple video features of each training video. Further, the training sample set may also include: the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video. It should be understood that the training sample set may correspond to multiple training videos. The actual optimal value of each adjustable parameter when performing video transcoding processing on each training video can be understood as: when the actual optimal value of the adjustable parameter for the training video is used to perform video transcoding processing on the training video, the transcoding effect is better. For example, when the actual optimal value of the adjustable parameter for each training video is used to perform video transcoding processing on the training video, the comprehensive evaluation of the overall transcoding processing result of the training video set is optimal.

[0058] As an example, the plurality of video features may include, but are not limited to: at least one feature for describing video quality and / or at least one feature for describing video complexity.

[0059] As an example, the features used to describe the video quality may include but are not limited to at least one of the following items: a feature used to describe the noise level of the video, a feature used to describe the blockiness level of the video. It should be understood that the features used to describe the video quality may also include other types of features used to describe the video quality, and the present disclosure does not limit this.

[0060] As an example, the features used to describe the complexity of a video may include, but are not limited to, at least one of the following: features used to describe the complexity of intra-frame coding of a video, features used to describe the complexity of inter-frame coding of a video. It should be understood that the features used to describe the complexity of a video may also include other types of features used to describe the complexity of a video, and the present disclosure does not limit this.

[0061] As an example, step S102 may include extracting feature values ​​of the plurality of video features of each training video.

[0062] As an example, step S102 may include obtaining the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video. Figure 2 An exemplary embodiment of obtaining the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video is described.

[0063] In step S103, based on the training sample set, an associated video feature related to each adjustable parameter is determined from the multiple video features.

[0064] As an example, the associated video features of each adjustable parameter may be a preset number of video features that are most correlated with the adjustable parameter.

[0065] As an example, for each adjustable parameter, the correlation between the actual optimal value of the adjustable parameter of the training video and the characteristic value of each video feature of the training video can be determined respectively; and a preset number of video features with the highest correlation are determined as the associated video features of the adjustable parameter. For example, the correlation can be evaluated by a correlation coefficient, that is, the larger the correlation coefficient, the higher the correlation. Taking the first adjustable parameter and the first video feature as an example, the characteristic value (x 1 、x 2 ,……,x Ntrain ) and the actual optimal value of the first adjustable parameter (y 1 ,y 2 ,……,y Ntrain ), x 1 The feature value of the first video feature of training video 1, y 1 represents the actual optimal value of the first adjustable parameter for training video 1, N train Represents the number of training videos.

[0066] It should be understood that the number of associated video features of different adjustable parameters may be the same or different. For example, for a first adjustable parameter, a first preset number of video features with the highest correlation therewith may be determined as the associated video features of the first adjustable parameter; for a second adjustable parameter, a second preset number of video features with the highest correlation therewith may be determined as the associated video features of the second adjustable parameter.

[0067] In step S104, various transcoding parameter models are trained based on the associated video features.

[0068] Each transcoding parameter model is a transcoding parameter model corresponding to each adjustable parameter used in the video transcoding process. For example, each transcoding parameter model corresponds to each adjustable parameter one by one.

[0069] Each transcoding parameter model may be trained based on the training sample set.

[0070] The input of each transcoding parameter model is: the feature value of the video feature corresponding to the transcoding parameter model, and the video feature corresponding to the transcoding parameter model is the associated video feature of the adjustable parameter corresponding to the transcoding parameter model; the output of each transcoding parameter model is: the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model when performing video transcoding processing on the video.

[0071] As an example, for each transcoding parameter model, the feature values ​​of the video features of each training video corresponding to the transcoding parameter model can be input into the transcoding parameter model to obtain the predicted optimal values ​​of the adjustable parameters corresponding to the transcoding parameter model for the training video; then, based on the actual optimal values ​​and predicted optimal values ​​of the adjustable parameters corresponding to the transcoding parameter model for the training video, the loss function of the transcoding parameter model is determined; finally, the transcoding parameter model is trained by adjusting the parameters of the transcoding parameter model according to the loss function.

[0072] It should be understood that each transcoding parameter model can be trained separately based on the training sample set.

[0073] As an example, each transcoding parameter model may be a suitable type of machine learning model, for example, a neural network-based machine learning model.

[0074] Figure 2 A flowchart of a method for obtaining actual optimal values ​​of adjustable parameters of a training video according to an exemplary embodiment of the present disclosure is shown.

[0075] like Figure 2 As shown, in step S201, at least one candidate value corresponding to each adjustable parameter is obtained.

[0076] As an example, for each adjustable parameter, multiple appropriate candidate values ​​of the adjustable parameter may be obtained. For example, at least one candidate value corresponding to the adjustable parameter may be obtained from a discrete parameter value candidate range preset for each adjustable parameter.

[0077] In step S202, all possible parameter value combinations are determined based on at least one candidate value corresponding to each adjustable parameter.

[0078] Each parameter value combination includes: a candidate value corresponding to each adjustable parameter. That is, each parameter value combination includes: a candidate value for each adjustable parameter, and different parameter value combinations are at least partially different.

[0079] For example, one candidate value of each adjustable parameter may be selected each time, and each candidate value of each adjustable parameter selected each time constitutes a parameter value combination to obtain all possible combinations.

[0080] In step S203, for each training video, video transcoding processing is performed on the training video according to each parameter value combination to obtain a transcoding processing result of the training video corresponding to the parameter value combination.

[0081] As an example, the total number of the at least one adjustable parameter may be N. condition ,{N 1 ,…,N N_condition} represents the total number of candidate values ​​for each tunable parameter, where N 1 The total number of candidate values ​​for the first tunable parameter, N N_condition represents the total number of candidate values ​​of the last adjustable parameter, then the total number of all possible parameter value combinations of all candidate values ​​of the at least one adjustable parameter N total_condition For: N 1 *N 2 *…*N N_condition .

[0082] Accordingly, for each training video, N total_condition Video transcoding is performed once, and N total_condition transcoding processing results, each of which corresponds to a parameter value combination.

[0083] In step S204, based on the transcoding processing result of each training video, the parameter value combination with the best video transcoding processing effect for the training video is determined, and each candidate value in the parameter value combination is determined as the actual optimal value of each adjustable parameter for the training video. For example, based on the overall comprehensive evaluation of the transcoding processing results of all training videos, the parameter value combination corresponding to each training video when the transcoding processing effect of the training video set is the best can be determined.

[0084] As an example, the effect of video transcoding processing can be measured from an appropriate perspective. For example, the effect of video transcoding processing using the parameter value combination on the training video can be measured based on the bit rate BitRate corresponding to the transcoding processing result obtained by performing video transcoding processing on the training video using the parameter value combination and / or the transcoding quality score of the transcoding processing result relative to the original video, and then the parameter value combination with the best video transcoding processing effect for each training video can be determined.

[0085] As an example, the transcoding quality score may be used to evaluate the optimization, loss, etc. of the original video by the transcoding process. For example, the transcoding quality score may be based on the score obtained by VMAF (Video Quality Assessment Standard) or VMAF_NEG.

[0086] As an example, the bit rate and transcoding quality score corresponding to each transcoding result of each training video can be determined first; then, from all possible transcoding result combinations, the transcoding result combination with the smallest total bit rate among the transcoding result combinations whose total transcoding quality score is greater than or equal to the score threshold is determined, or the transcoding result combination with the largest total transcoding quality score among the transcoding result combinations whose total bit rate is less than or equal to the bit rate threshold is determined; next, for each transcoding result in the determined transcoding result combination, each candidate value in the parameter value combination corresponding to the transcoding result is determined as the actual optimal value of each adjustable parameter of the training video corresponding to the transcoding result.

[0087] Each transcoding processing result combination includes: a transcoding processing result of each training video, and different transcoding processing result combinations are at least partially different.

[0088] The total transcoding quality score of the transcoding result combination is the sum of the transcoding quality scores corresponding to each transcoding result in the transcoding result combination; the total bit rate of the transcoding result combination is the sum of the bit rates corresponding to each transcoding result in the transcoding result combination.

[0089] As an example, a search algorithm (ie, optimization algorithm) may be used to determine, from all possible transcoding result combinations, a transcoding result combination with the smallest total bitrate among the transcoding result combinations whose total transcoding quality scores are greater than or equal to a score threshold.

[0090] As an example, an optimization algorithm may be used to determine, from all possible transcoding result combinations, a transcoding result combination with a maximum total transcoding quality score among transcoding result combinations whose total bitrates are less than or equal to a bitrate threshold.

[0091] As an example, the optimization algorithm may include but is not limited to at least one of the following: a knapsack algorithm, a dynamic programming algorithm, and a greedy algorithm.

[0092] Figure 3 An example of a training method for a transcoding parameter model according to an exemplary embodiment of the present disclosure is shown. Figure 3 As shown, a video set including multiple training videos can be obtained, and then the feature values ​​of multiple video features can be extracted for each training video. In addition, each training video is subjected to video transcoding processing (i.e., enhancement processing and encoding processing) using all possible parameter value combinations to obtain the corresponding transcoding processing results and their corresponding bit rates and transcoding quality scores. For each training video, based on the bit rates and transcoding quality scores corresponding to the various transcoding processing results of the training video, the actual optimal value of each adjustable parameter when performing video transcoding processing on the training video is determined. After the above steps, a training sample set is obtained. Next, each transcoding parameter model can be trained based on the training sample set.

[0093] The transcoding parameter model used online can be updated based on the latest trained transcoding parameter model, and the online transcoding parameter model can be used to predict the optimal values ​​of the adjustable parameters when the online video is transcoded, and the predicted optimal values ​​of the adjustable parameters can be used to transcode the online video. Data collection mainly involves regular collection of online videos and using them to update the model to ensure continuous update and iteration of the online model.

[0094] Figure 4 Another example of a training method of a transcoding parameter model according to an exemplary embodiment of the present disclosure is shown.

[0095] like Figure 4 As shown, during the feature calculation process, at least one quality feature and at least one complexity feature of a video sample (including a test video in a test set and a training video in a training set) are obtained.

[0096] In the process of video processing and quality analysis, all possible combinations of parameter values ​​(N total_condition A video transcoding process (i.e., enhancement process and encoding process) is performed on each video sample using a combination of parameter values ​​to obtain a corresponding transcoding process result and its corresponding bit rate and transcoding quality score.

[0097] In the process of generating the optimal parameter set, for each video sample, based on the bit rate and transcoding quality score corresponding to each transcoding result of the video sample, the actual optimal value of each adjustable parameter when performing video transcoding processing on the video sample can be determined to obtain the optimal parameter set GroundTruth.

[0098] As an example, the video samples in the training set and the test set are processed by the above N total_condition The parameter value combination is used to perform video transcoding to obtain the bit rate {B ij}(i=1,…,Ntrain / N test ,j=1,…,N total_condition ), and after quality analysis, the quality score is obtained {Q ij}(i=1,…,N train / N test ,j=1,…,N total_condition ).

[0099] The total target bit rate T can be specified for the training set and the test set respectively bitrate (i.e., bitrate threshold) or overall target quality score T quality (i.e., scoring threshold), the total target bit rate T bitrate and the total target quality score T quality It can be called model expectation.

[0100] As an example, the description of the GroundTruth generation solution using dynamic programming problem can be as follows:

[0101] For the training set, given the total target bit rate T bitrate In the case of N train Each of the training videos selects a parameter value combination so that B total As close to T as possible bitrate And make the corresponding Q total Maximum. Alternatively, given the total target quality score T quality In the case of N train Each of the training videos selects a parameter value combination so that Q total As close to T as possible quality And make the corresponding B total Minimum.

[0102] B total =B (1,pick1) +B (2,pick2) +…+B (N_train,pick N_train)

[0103] Q total =Q (1,pick1) +Q (2,pick2) +…+Q (N_train,pick N_train)

[0104] Among them, B (1,pick1) Indicates the bit rate corresponding to the transcoding result obtained by transcoding the first training video according to a parameter value combination, Q (1,pick1) It indicates the transcoding quality score corresponding to the transcoding result obtained by performing video transcoding processing on the first training video according to a parameter value combination. It should be understood that pick1 and pick2 may be the same or different.

[0105] For the test set, the same processing as the training set can be done to obtain the optimal parameter set GroundTruth for testing the model.

[0106] In addition, the associated video features of each adjustable parameter can be determined based on the optimal parameter set GroundTruth of the training set.

[0107] During the model training process, the feature values ​​of the associated video features for each adjustable parameter of each training video in the training set can be input into the model, and the loss function can be determined based on the predicted optimal parameter value and the actual optimal parameter value to train the model.

[0108] The test videos in the test set are used to test the model and evaluate the prediction effect of the model to verify the model effect. The feature values ​​of the associated video features for each adjustable parameter from the test video in the test set can be input into the model, and the prediction effect of the model can be evaluated based on the predicted optimal parameter value and the actual optimal parameter value.

[0109] Figure 5 A flowchart of a video transcoding method according to an exemplary embodiment of the present disclosure is shown.

[0110] Reference Figure 5 In step S301, a target video to be transcoded is obtained.

[0111] In step S302, for each adjustable parameter of at least one adjustable parameter used in the video transcoding process, a feature value of a video feature associated with the adjustable parameter of the target video is determined.

[0112] In step S303, the feature value of the associated video feature for each adjustable parameter of the target video is input into the transcoding parameter model corresponding to the adjustable parameter to obtain the predicted optimal value of the adjustable parameter for the target video.

[0113] In step S304, the target video is transcoded using the predicted optimal values ​​of the adjustable parameters of the target video.

[0114] As an example, each transcoding parameter model may be trained using the training method described in the above exemplary embodiment.

[0115] As an example, each transcoding parameter model can be trained based on a training sample set; wherein the training sample set includes: feature values ​​of multiple video features of each training video and the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video.

[0116] As an example, the associated video features of each adjustable parameter can be determined based on the training sample set in the following manner: for each adjustable parameter, the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video is determined; and a preset number of video features with the highest correlation are determined as the associated video features of the adjustable parameter.

[0117] As an example, the actual optimal value of each adjustable parameter when performing video transcoding processing for each training video can be obtained in the following manner: obtaining at least one candidate value corresponding to each adjustable parameter; determining all possible parameter value combinations based on at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: a candidate value corresponding to each adjustable parameter; for each training video, performing video transcoding processing on the training video according to each parameter value combination, and obtaining the transcoding processing result of the training video corresponding to the parameter value combination; based on the transcoding processing result of each training video, determining the parameter value combination with the best video transcoding processing effect for the training video, and determining each candidate value in the parameter value combination as the actual optimal value of each adjustable parameter for the training video. For example, based on the overall comprehensive evaluation of the transcoding processing results of all training videos, the parameter value combination corresponding to each training video when the transcoding processing effect of the training video set is the best can be determined.

[0118] As an example, the at least one adjustable parameter used in the video transcoding process may include: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

[0119] As an example, the associated video features may include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

[0120] Figure 6 A structural block diagram of a training device for a transcoding parameter model according to an exemplary embodiment of the present disclosure is shown.

[0121] like Figure 6 As shown, the training device 10 for the transcoding parameter model according to the exemplary embodiment of the present disclosure includes: an adjustable parameter acquisition unit 101 , a training sample set acquisition unit 102 , an associated feature determination unit 103 , and a training unit 104 .

[0122] Specifically, the adjustable parameter acquisition unit 101 is configured to acquire each adjustable parameter of at least one adjustable parameter used in the video transcoding process.

[0123] The training sample set acquisition unit 102 is configured to acquire a training sample set, wherein the training sample set includes: feature values ​​of a plurality of video features of each training video.

[0124] The associated feature determination unit 103 is configured to determine an associated video feature related to each adjustable parameter from the multiple video features based on the training sample set.

[0125] The training unit 104 is configured to train each transcoding parameter model based on the associated video features, wherein each transcoding parameter model is a transcoding parameter model corresponding to each adjustable parameter used in the video transcoding process.

[0126] Among them, the input of each transcoding parameter model is: the characteristic value of the associated video feature of the adjustable parameter corresponding to the transcoding parameter model; the output of each transcoding parameter model is: the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model when performing video transcoding processing on the video.

[0127] As an example, the training sample set may also include: the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video; wherein the training unit 104 may be configured to: for each transcoding parameter model, input the feature value of the associated video feature corresponding to the transcoding parameter model of each training video into the transcoding parameter model to obtain the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model for the training video; determine the loss function of the transcoding parameter model based on the actual optimal value and predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model for the training video; and train the transcoding parameter model by adjusting the parameters of the transcoding parameter model according to the loss function.

[0128] As an example, the associated feature determination unit 103 can be configured to: for each adjustable parameter, determine the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video; and determine a preset number of video features with the highest correlation as the associated video features of the adjustable parameter.

[0129] As an example, the training sample set acquisition unit 102 can be configured to: obtain at least one candidate value corresponding to each adjustable parameter; determine all possible parameter value combinations based on the at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: a candidate value corresponding to each adjustable parameter; for each training video, perform video transcoding processing on the training video according to each parameter value combination to obtain a transcoding processing result of the training video corresponding to the parameter value combination; based on the transcoding processing result of each training video, determine the parameter value combination with the best video transcoding processing effect for the training video, and determine each candidate value in the parameter value combination as the actual optimal value of each adjustable parameter for the training video.

[0130] As an example, the training sample set acquisition unit 102 can be configured to: determine the bit rate and transcoding quality score corresponding to each transcoding processing result of each training video; from all possible transcoding processing result combinations, determine the transcoding processing result combination with the smallest total bit rate among the transcoding processing result combinations whose total transcoding quality score is greater than or equal to the score threshold, or determine the transcoding processing result combination with the largest total transcoding quality score among the transcoding processing result combinations whose total bit rate is less than or equal to the bit rate threshold; for each transcoding processing result in the determined transcoding processing result combination, determine each candidate value in the parameter value combination corresponding to the transcoding processing result as the actual optimal value of each adjustable parameter of the training video corresponding to the transcoding processing result; wherein each transcoding processing result combination includes: a transcoding processing result of each training video; wherein the total transcoding quality score of the transcoding processing result combination is the sum of the transcoding quality scores corresponding to each transcoding processing result in the transcoding processing result combination; and the total bit rate of the transcoding processing result combination is the sum of the bit rates corresponding to each transcoding processing result in the transcoding processing result combination.

[0131] As an example, the training sample set acquisition unit 102 may be configured to: use an optimization algorithm to determine, from all possible transcoding result combinations, a transcoding result combination with the smallest total bitrate among the transcoding result combinations with a total transcoding quality score greater than or equal to a score threshold; wherein the training sample set acquisition unit 102 may be configured to: use an optimization algorithm to determine, from all possible transcoding result combinations, a transcoding result combination with the largest total transcoding quality score among the transcoding result combinations with a total bitrate less than or equal to a bitrate threshold; wherein the optimization algorithm includes at least one of the following: a knapsack algorithm, a dynamic programming algorithm, and a greedy algorithm.

[0132] As an example, the at least one adjustable parameter used in the video transcoding process may include: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

[0133] As an example, the plurality of video features may include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

[0134] Figure 7 A structural block diagram of a video transcoding apparatus according to an exemplary embodiment of the present disclosure is shown.

[0135] like Figure 7 As shown, the video transcoding device 20 according to an exemplary embodiment of the present disclosure includes: a target video acquisition unit 201 , a feature value determination unit 202 , a prediction unit 203 , and a transcoding processing unit 204 .

[0136] Specifically, the target video acquisition unit 201 is configured to acquire the target video to be transcoded.

[0137] The feature value determination unit 202 is configured to determine, for each adjustable parameter of at least one adjustable parameter used in the video transcoding process, a feature value of a video feature associated with the adjustable parameter of the target video.

[0138] The prediction unit 203 is configured to input the feature value of the associated video feature for each adjustable parameter of the target video into the transcoding parameter model corresponding to the adjustable parameter to obtain the predicted optimal value of the adjustable parameter for the target video.

[0139] The transcoding processing unit 204 is configured to perform transcoding processing on the target video using the predicted optimal values ​​of the adjustable parameters of the target video.

[0140] As an example, each transcoding parameter model may be trained based on a training sample set; wherein the training sample set may include: feature values ​​of multiple video features of each training video and the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video.

[0141] As an example, the associated video features of each adjustable parameter can be determined based on the training sample set in the following manner: for each adjustable parameter, the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video is determined; and a preset number of video features with the highest correlation are determined as the associated video features of the adjustable parameter.

[0142] As an example, the actual optimal value of each adjustable parameter when performing video transcoding processing on each training video can be obtained in the following manner: obtaining at least one candidate value corresponding to each adjustable parameter; determining all possible parameter value combinations based on the at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: a candidate value corresponding to each adjustable parameter; for each training video, performing video transcoding processing on the training video according to each parameter value combination, and obtaining a transcoding processing result of the training video corresponding to the parameter value combination; based on the transcoding processing result of each training video, determining the parameter value combination with the best video transcoding processing effect for the training video, and determining each candidate value in the parameter value combination as the actual optimal value of each adjustable parameter for the training video.

[0143] As an example, the at least one adjustable parameter used in the video transcoding process may include: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

[0144] As an example, the associated video features may include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

[0145] The present disclosure takes into account the different characteristics of video content that are actually transcoded, especially for major video platforms, which process tens of thousands of videos every day. If the pre-processing strategy and encoding parameters can be adjusted dynamically according to each video according to local conditions, the video compression efficiency will be greatly optimized, and the bandwidth cost saved will also be considerable. Therefore, the present disclosure proposes to classify each video according to its characteristics and correspond to different pre-processing strategies and encoding parameters, so that the pre-processing strategy and encoding parameters can be dynamically adjusted according to each video. The exemplary embodiments according to the present disclosure can be applied to video compression scenarios, and it should be understood that they can also be applied to other scenarios, and the present disclosure does not limit this.

[0146] Regarding the transcoding parameter model training device 10 and the video transcoding device 20 in the above-mentioned embodiments, the specific manner in which each unit performs operations has been described in detail in the embodiments of the relevant methods and will not be elaborated here.

[0147] In addition, it should be understood that the various units in the transcoding parameter model training device 10 and the video transcoding device 20 according to the exemplary embodiment of the present disclosure may be implemented as hardware components and / or software components. Those skilled in the art may implement the various units, for example, using a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC) according to the processing performed by the various defined units.

[0148] Figure 8 FIG. 1 is a block diagram showing a structure of an electronic device according to an exemplary embodiment of the present disclosure. Figure 8 The electronic device 30 includes: at least one memory 301 and at least one processor 302, wherein the at least one memory 301 stores a set of computer executable instructions, and when the computer executable instruction set is executed by the at least one processor 302, the training method of the transcoding parameter model as described in the above exemplary embodiments and / or the video transcoding method as described in the above exemplary embodiments are executed.

[0149] As an example, the electronic device 30 may be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above-mentioned instruction set. Here, the electronic device 30 is not necessarily a single electronic device, but may also be any device or circuit collection capable of executing the above-mentioned instructions (or instruction sets) individually or in combination. The electronic device 30 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device interconnected with a local or remote (e.g., via wireless transmission) interface.

[0150] In the electronic device 30, the processor 302 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller or a microprocessor. As an example and not limitation, the processor 302 may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.

[0151] The processor 302 may execute instructions or codes stored in the memory 301, wherein the memory 301 may also store data. Instructions and data may also be sent and received over a network via a network interface device, wherein the network interface device may employ any known transmission protocol.

[0152] The memory 301 may be integrated with the processor 302, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. In addition, the memory 301 may include a separate device, such as an external disk drive, a storage array, or any other storage device that can be used by a database system. The memory 301 and the processor 302 may be operatively coupled, or may communicate with each other, such as through an I / O port, a network connection, etc., so that the processor 302 can read files stored in the memory.

[0153] In addition, the electronic device 30 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the electronic device 30 may be connected to each other via a bus and / or a network.

[0154] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, the at least one processor is prompted to execute the training method of the transcoding parameter model as described in the above exemplary embodiment and / or the video transcoding method as described in the above exemplary embodiment. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.

[0155] According to an exemplary embodiment of the present disclosure, a computer program product may also be provided, and instructions in the computer program product may be executed by at least one processor to complete the training method of the transcoding parameter model as described in the above exemplary embodiments and / or the video transcoding method as described in the above exemplary embodiments.

[0156] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0157] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for training a transcoding parameter model, characterized in that: include: Obtaining each adjustable parameter of at least one adjustable parameter used in a video transcoding process; Acquire a training sample set, wherein the training sample set includes: feature values ​​of multiple video features of each training video, and an actual optimal value of each adjustable parameter when performing video transcoding processing on each training video; Based on the training sample set, determining an associated video feature related to each adjustable parameter from the plurality of video features; Based on the associated video features, training each transcoding parameter model, wherein each transcoding parameter model is a transcoding parameter model corresponding to each adjustable parameter used in the video transcoding process; The input of each transcoding parameter model is: the characteristic value of the associated video feature of the adjustable parameter corresponding to the transcoding parameter model; the output of each transcoding parameter model is: the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model when performing video transcoding processing on the video; Wherein, based on the training sample set, the step of determining the associated video feature related to each adjustable parameter from the multiple video features comprises: For each adjustable parameter, respectively determine the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video; Determine a preset number of video features with the highest correlation as associated video features of the adjustable parameter; The steps of obtaining a training sample set include: Obtain at least one candidate value corresponding to each adjustable parameter; Determining all possible parameter value combinations based on at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: one candidate value corresponding to each adjustable parameter; For each training video, perform video transcoding processing on the training video according to each parameter value combination to obtain a transcoding processing result of the training video corresponding to the parameter value combination; Determine a bitrate and a transcoding quality score corresponding to each transcoding processing result of each training video; From all possible transcoding result combinations, determine a transcoding result combination with the smallest total bitrate among the transcoding result combinations whose total transcoding quality scores are greater than or equal to the score threshold, or determine a transcoding result combination with the largest total transcoding quality score among the transcoding result combinations whose total bitrates are less than or equal to the bitrate threshold; For each transcoding result in the determined transcoding result combination, determining each candidate value in the parameter value combination corresponding to the transcoding result as the actual optimal value of each adjustable parameter of the training video corresponding to the transcoding result; Each transcoding result combination includes: a transcoding result for each training video; Among them, the total transcoding quality score of the transcoding processing result combination is the sum of the transcoding quality scores corresponding to each transcoding processing result in the transcoding processing result combination; the total bit rate of the transcoding processing result combination is the sum of the bit rates corresponding to each transcoding processing result in the transcoding processing result combination.

2. The training method according to claim 1, characterized in that: Based on the associated video features, the steps of training each transcoding parameter model include: For each transcoding parameter model, inputting the feature value of the associated video feature corresponding to the transcoding parameter model of each training video into the transcoding parameter model to obtain the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model for the training video; Determining a loss function of the transcoding parameter model based on actual optimal values ​​and predicted optimal values ​​of adjustable parameters corresponding to the transcoding parameter model for the training video; The transcoding parameter model is trained by adjusting the parameters of the transcoding parameter model according to the loss function.

3. The training method according to claim 1, characterized in that: The step of determining, from among all possible transcoding result combinations, a transcoding result combination with a minimum total bitrate among the transcoding result combinations with a total transcoding quality score greater than or equal to the score threshold comprises: using an optimization algorithm to determine, from among all possible transcoding result combinations, a transcoding result combination with a minimum total bitrate among the transcoding result combinations with a total transcoding quality score greater than or equal to the score threshold; The step of determining, from among all possible transcoding result combinations, a transcoding result combination with a maximum total transcoding quality score among the transcoding result combinations with a total bit rate less than or equal to the bit rate threshold comprises: using an optimization algorithm to determine, from among all possible transcoding result combinations, a transcoding result combination with a maximum total transcoding quality score among the transcoding result combinations with a total bit rate less than or equal to the bit rate threshold; The optimization algorithm includes at least one of the following: a knapsack algorithm, a dynamic programming algorithm, and a greedy algorithm.

4. The training method according to claim 1, characterized in that: The at least one adjustable parameter used in the video transcoding process includes: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

5. The training method according to claim 1, characterized in that: The multiple video features include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

6. A video transcoding method, characterized in that: include: Get the target video to be transcoded; For each adjustable parameter of at least one adjustable parameter used in the video transcoding process, determining a feature value of an associated video feature of the target video for the adjustable parameter; Inputting the feature value of the associated video feature of each adjustable parameter of the target video into the transcoding parameter model corresponding to the adjustable parameter to obtain the predicted optimal value of the adjustable parameter for the target video; Using the predicted optimal values ​​of the adjustable parameters of the target video, transcoding the target video; Each transcoding parameter model is trained based on a training sample set, wherein the training sample set includes: feature values ​​of multiple video features of each training video and an actual optimal value of each adjustable parameter when performing video transcoding processing on each training video; The associated video feature of each adjustable parameter is determined based on the training sample set in the following manner: For each adjustable parameter, respectively determine the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video; Determine a preset number of video features with the highest correlation as associated video features of the adjustable parameter; The actual optimal value of each adjustable parameter when performing video transcoding processing on each training video is obtained by: Obtain at least one candidate value corresponding to each adjustable parameter; Determining all possible parameter value combinations based on at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: one candidate value corresponding to each adjustable parameter; For each training video, perform video transcoding processing on the training video according to each parameter value combination to obtain a transcoding processing result of the training video corresponding to the parameter value combination; Determine a bitrate and a transcoding quality score corresponding to each transcoding processing result of each training video; From all possible transcoding result combinations, determine a transcoding result combination with the smallest total bitrate among the transcoding result combinations whose total transcoding quality scores are greater than or equal to the score threshold, or determine a transcoding result combination with the largest total transcoding quality score among the transcoding result combinations whose total bitrates are less than or equal to the bitrate threshold; For each transcoding result in the determined transcoding result combination, determining each candidate value in the parameter value combination corresponding to the transcoding result as the actual optimal value of each adjustable parameter of the training video corresponding to the transcoding result; Each transcoding result combination includes: a transcoding result for each training video; Among them, the total transcoding quality score of the transcoding processing result combination is the sum of the transcoding quality scores corresponding to each transcoding processing result in the transcoding processing result combination; the total bit rate of the transcoding processing result combination is the sum of the bit rates corresponding to each transcoding processing result in the transcoding processing result combination.

7. The video transcoding method according to claim 6, characterized in that: The at least one adjustable parameter used in the video transcoding process includes: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

8. The video transcoding method according to claim 6, characterized in that: The associated video features include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

9. A training device for a transcoding parameter model, characterized in that: include: an adjustable parameter acquisition unit, configured to acquire each adjustable parameter of at least one adjustable parameter used in the video transcoding process; The training sample set acquisition unit is configured to acquire a training sample set, wherein the training sample set includes: feature values ​​of multiple video features of each training video, and an actual optimal value of each adjustable parameter when performing video transcoding processing on each training video; an associated feature determination unit, configured to determine, based on the training sample set, an associated video feature associated with each adjustable parameter from the plurality of video features; A training unit is configured to train each transcoding parameter model based on the associated video features, wherein each transcoding parameter model is a transcoding parameter model corresponding to each adjustable parameter used in the video transcoding process; The input of each transcoding parameter model is: the characteristic value of the associated video feature of the adjustable parameter corresponding to the transcoding parameter model; the output of each transcoding parameter model is: the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model when performing video transcoding processing on the video; The associated feature determination unit is configured to: for each adjustable parameter, respectively determine the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video; and determine a preset number of video features with the highest correlation as associated video features of the adjustable parameter; The training sample set acquisition unit is configured as follows: Obtain at least one candidate value corresponding to each adjustable parameter; Determining all possible parameter value combinations based on at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: one candidate value corresponding to each adjustable parameter; For each training video, perform video transcoding processing on the training video according to each parameter value combination to obtain a transcoding processing result of the training video corresponding to the parameter value combination; Determine a bitrate and a transcoding quality score corresponding to each transcoding processing result of each training video; From all possible transcoding result combinations, determine a transcoding result combination with the smallest total bitrate among the transcoding result combinations whose total transcoding quality scores are greater than or equal to the score threshold, or determine a transcoding result combination with the largest total transcoding quality score among the transcoding result combinations whose total bitrates are less than or equal to the bitrate threshold; For each transcoding result in the determined transcoding result combination, determining each candidate value in the parameter value combination corresponding to the transcoding result as the actual optimal value of each adjustable parameter of the training video corresponding to the transcoding result; Each transcoding result combination includes: a transcoding result for each training video; Among them, the total transcoding quality score of the transcoding processing result combination is the sum of the transcoding quality scores corresponding to each transcoding processing result in the transcoding processing result combination; the total bit rate of the transcoding processing result combination is the sum of the bit rates corresponding to each transcoding processing result in the transcoding processing result combination.

10. The training device according to claim 9, characterized in that The training unit is configured as: For each transcoding parameter model, inputting the feature value of the associated video feature corresponding to the transcoding parameter model of each training video into the transcoding parameter model to obtain the predicted optimal value of the adjustable parameter corresponding to the transcoding parameter model for the training video; Determining a loss function of the transcoding parameter model based on actual optimal values ​​and predicted optimal values ​​of adjustable parameters corresponding to the transcoding parameter model for the training video; The transcoding parameter model is trained by adjusting the parameters of the transcoding parameter model according to the loss function.

11. The training device according to claim 9, characterized in that: The training sample set acquisition unit is configured to: use an optimization algorithm to determine, from all possible transcoding result combinations, a transcoding result combination with a minimum total bitrate among the transcoding result combinations whose total transcoding quality scores are greater than or equal to a score threshold; The training sample set acquisition unit is configured to: use an optimization algorithm to determine, from all possible transcoding result combinations, a transcoding result combination with a maximum total transcoding quality score among the transcoding result combinations with a total bit rate less than or equal to a bit rate threshold; The optimization algorithm includes at least one of the following: a knapsack algorithm, a dynamic programming algorithm, and a greedy algorithm.

12. The training device according to claim 9, characterized in that The at least one adjustable parameter used in the video transcoding process includes: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

13. The training device according to claim 9, characterized in that The multiple video features include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

14. A video transcoding device, characterized in that: include: A target video acquisition unit is configured to acquire a target video to be transcoded; a feature value determination unit configured to determine, for each adjustable parameter of at least one adjustable parameter used in the video transcoding process, a feature value of an associated video feature of the target video for the adjustable parameter; A prediction unit is configured to input a feature value of an associated video feature of a target video for each adjustable parameter into a transcoding parameter model corresponding to the adjustable parameter to obtain a predicted optimal value of the adjustable parameter for the target video; A transcoding processing unit, configured to perform transcoding processing on the target video using the predicted optimal values ​​of the adjustable parameters of the target video; Each transcoding parameter model is trained based on a training sample set, wherein the training sample set includes: feature values ​​of multiple video features of each training video and an actual optimal value of each adjustable parameter when performing video transcoding processing on each training video; The associated video feature of each adjustable parameter is determined based on the training sample set in the following manner: For each adjustable parameter, respectively determine the correlation between the actual optimal value of the adjustable parameter of the training video and the feature value of each video feature of the training video; Determine a preset number of video features with the highest correlation as associated video features of the adjustable parameter; The actual optimal value of each adjustable parameter when performing video transcoding processing on each training video is obtained by: Obtain at least one candidate value corresponding to each adjustable parameter; Determining all possible parameter value combinations based on at least one candidate value corresponding to each adjustable parameter, wherein each parameter value combination includes: one candidate value corresponding to each adjustable parameter; For each training video, perform video transcoding processing on the training video according to each parameter value combination to obtain a transcoding processing result of the training video corresponding to the parameter value combination; Determine a bitrate and a transcoding quality score corresponding to each transcoding processing result of each training video; From all possible transcoding result combinations, determine a transcoding result combination with the smallest total bitrate among the transcoding result combinations whose total transcoding quality scores are greater than or equal to the score threshold, or determine a transcoding result combination with the largest total transcoding quality score among the transcoding result combinations whose total bitrates are less than or equal to the bitrate threshold; For each transcoding result in the determined transcoding result combination, determining each candidate value in the parameter value combination corresponding to the transcoding result as the actual optimal value of each adjustable parameter of the training video corresponding to the transcoding result; Each transcoding result combination includes: a transcoding result for each training video; Among them, the total transcoding quality score of the transcoding processing result combination is the sum of the transcoding quality scores corresponding to each transcoding processing result in the transcoding processing result combination; the total bit rate of the transcoding processing result combination is the sum of the bit rates corresponding to each transcoding processing result in the transcoding processing result combination.

15. The video transcoding device according to claim 14, characterized in that: The at least one adjustable parameter used in the video transcoding process includes: at least one parameter used in the video pre-encoding process and / or at least one parameter used in the encoding process.

16. The video transcoding device according to claim 14, characterized in that: The associated video features include: at least one feature for describing video quality and / or at least one feature for describing video complexity.

17. An electronic device, characterized in that: include: at least one processor; at least one memory storing computer executable instructions, Wherein, when the computer executable instructions are executed by the at least one processor, the at least one processor is prompted to execute the training method of the transcoding parameter model as described in any one of claims 1 to 5 and / or the video transcoding method as described in any one of claims 6 to 8.

18. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to execute the training method of the transcoding parameter model as described in any one of claims 1 to 5 and / or the video transcoding method as described in any one of claims 6 to 8.

19. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by at least one processor, the training method of the transcoding parameter model according to any one of claims 1 to 5 and / or the video transcoding method according to any one of claims 6 to 8 are implemented.

Citation Information

Patent Citations

  • Video data processing method and device and storage medium

    CN111277826A

  • Parameter prediction model training method and device and parameter prediction method and device

    CN113194320A