WO2023185175A1 - Video processing method and apparatus - Google Patents

Video processing method and apparatus Download PDF

Info

Publication number
WO2023185175A1
WO2023185175A1 PCT/CN2022/144210 CN2022144210W WO2023185175A1 WO 2023185175 A1 WO2023185175 A1 WO 2023185175A1 CN 2022144210 W CN2022144210 W CN 2022144210W WO 2023185175 A1 WO2023185175 A1 WO 2023185175A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
target
playback
decision
sample
Prior art date
Application number
PCT/CN2022/144210
Other languages
French (fr)
Chinese (zh)
Inventor
侯芬
何钧
张希文
Original Assignee
上海哔哩哔哩科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海哔哩哔哩科技有限公司 filed Critical 上海哔哩哔哩科技有限公司
Publication of WO2023185175A1 publication Critical patent/WO2023185175A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/783Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound

Definitions

  • the present application relates to the field of video processing technology, and in particular to a video processing method.
  • This application also relates to a video processing device, a computing device, and a computer-readable storage medium.
  • Video coding is an important technical means in the video field. Unencoded videos may be larger in size, which will put great pressure on the storage and transmission of the videos. Therefore, when storing and transmitting videos, video data is generally compressed through video coding.
  • embodiments of the present application provide a video processing method.
  • the present application also relates to a video processing device, a computing device, and a computer-readable storage medium to solve the technical problems of resource waste or insufficient coding during video transcoding that exist in the prior art.
  • a video processing method including:
  • a video processing device including:
  • the first result obtaining module is configured to input the object characteristics of the target object corresponding to the target video into the object characteristic decision model to obtain the first video decision result when the target video is not played;
  • a video playback module configured to play the target video when the first video decision result does not meet the decision condition
  • the second result obtaining module is configured to determine the second video decision result according to the preset video processing strategy within the target playback time period;
  • a video processing module configured to perform video processing on the target video if the second video decision result satisfies the decision condition.
  • a computing device including a memory, a processor, and computer instructions stored in the memory and executable on the processor.
  • the processor executes the instructions, the described instructions are implemented. Steps of video processing methods.
  • a computer-readable storage medium which stores computer instructions that implement the steps of the video processing method when executed by a processor.
  • the video processing method provided by this application includes, when the target video is not played, inputting the object characteristics of the target object corresponding to the target video into the object characteristics decision model to obtain the first video decision result; in the first video When the decision result does not meet the decision condition, the target video is played; within the target play time period, the second video decision result is determined according to the preset video processing strategy; when the second video decision result meets the decision condition In this case, perform video processing on the target video.
  • the video processing method uses the object characteristics of the target object corresponding to the target video and combines the pre-trained object characteristics decision model to make the video transcoding decision in advance; and the video transcoding decision is
  • the video transcoding decision is made again through the preset video processing strategy to solve the waste of resources caused by transcoding all target videos, and after determining the video to be transcoded based on the above strategy.
  • the target video is effectively transcoded to avoid insufficient encoding and achieve accurate transcoding of the target video.
  • Figure 1 is an exemplary illustration of a video processing method provided by an embodiment of the present application in a specific application scenario
  • Figure 2 is a flow chart of a video processing method provided by an embodiment of the present application.
  • Figure 3 is a processing flow chart of a video processing method applied to a video transcoding scenario provided by an embodiment of the present application
  • Figure 4 is a schematic structural diagram of a video processing device provided by an embodiment of the present application.
  • Figure 5 is a structural block diagram of a computing device provided by an embodiment of the present application.
  • first, second, etc. may be used to describe various information in one or more embodiments of the present application, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other.
  • the first may also be called the second, and similarly the second may also be called the first.
  • the word "if” as used herein may be interpreted as "when” or "when” or "in response to determining.”
  • Data mining It is based on machine learning, pattern recognition, statistics, database and other disciplines to mine potential information from data to help decision-makers solve practical problems.
  • Machine learning It is a discipline dedicated to how to use experience to improve the performance of the system itself through computational means.
  • the main content of its research is about algorithms that generate “models” from data on computers, that is, “learning algorithms” .
  • Statistics is the science of understanding the overall quantitative characteristics and quantitative relationships of objective phenomena. It is a methodological science that understands the quantitative regularity of objective phenomena through collecting, organizing, and analyzing statistical data.
  • Feature engineering It is a means of extracting features from original data to the maximum extent for use by models and algorithms, including data preprocessing, feature selection, dimension and feature expansion, etc.
  • Video transcoding Encode videos to achieve video data compression. Common encoding standards include JPEG, MJPEG, H264, H265, AV1, etc.
  • Transcoding decision whether to transcode the video.
  • Bandwidth revenue the reduction in bandwidth billing after video transcoding.
  • XGBoost model It is a gradient boosting decision tree (GBDT, Gradient Boosting DecisionTree).
  • GBDT Gradient Boosting DecisionTree
  • XGBoost is essentially a method based on a tree structure and combined with integrated learning. Its basic tree structure is a classification and regression tree (CART, Classification and Regression Tree) ).
  • This application also relates to a video processing device, a computing device, and a computer-readable storage medium, which will be described in detail one by one in the following embodiments.
  • Figure 1 is an exemplary illustration of a video processing method provided by an embodiment of the present application in a specific application scenario.
  • the specific application scenario in Figure 1 includes a client 102 and a server 104.
  • the user (such as the uploader of the video) sends the video to be played to the server 104 through the client 102.
  • the server 104 After receiving the video to be played, the server 104 determines the user of the video to be played, and obtains the proportion of videos with more than 10,000 views among all videos of the user. When the proportion of the video is greater than the preset proportion threshold Next, transcode the video to be played, and send the transcoded video to the client (including but not limited to client 102) for playback; wherein, the preset proportion threshold can be calculated based on historical data, as follows The specific calculation process will be introduced in the embodiment.
  • the proportion of the video is less than the preset proportion threshold, obtain the user's data in multiple dimensions, such as the number of fans, the number of forwards, the number of likes, etc.; perform data processing on these multi-dimensional data to obtain User characteristics of this user.
  • Input the user characteristics of the user into the pre-trained object characteristic decision model obtain the label corresponding to the user characteristics, and determine the video transcoding decision result based on the label, that is, when the label is 0, the video transcoding decision result is not transcoding. code; when the tag is 1, the video transcoding decision result is transcoding; then when the video transcoding decision result is transcoding, the video to be played is transcoded, and the transcoded video Send to client for playback.
  • a decision is made as to whether to transcode the video according to the preset decision strategy. Specifically, the video is played, and within a preset time period (for example, within 48 hours) after the video is played, a video segment is divided every three minutes or five minutes, and the playback volume of the next video segment is compared with the previous video.
  • a preset time period for example, within 48 hours
  • the video will be transcoded and the video that has been played will be supplemented and transcoded; or the playback rate of each video clip can be calculated based on statistics Volume threshold, that is, the popularity threshold.
  • the play volume of three or four consecutive video clips exceeds the play volume threshold, the video will be transcoded, and the video that has been played will be supplemented and transcoded; And send the transcoded video to the client for playback.
  • the preset time period ends after the video is played and the video is still not transcoded
  • the number of views, reposts, and likes after the video is played within the preset time period are obtained, and the playback volume, reposts, etc. of these videos are obtained.
  • Input the video playback features into the pre-trained playback feature decision model obtain the label corresponding to the playback feature, and determine the video transcoding decision result based on the label. That is, if the label is 0, the video transcoding decision result is no transcoding.
  • the video transcoding decision result is transcoding; then when the video transcoding decision result is transcoding, the video is transcoded, and the video that has been played is supplementary transcoded. And send the transcoded video to the client for playback.
  • the video processing method provided by the embodiments of this application uses machine learning and statistical methods to implement a transcoding decision-making scheme consisting of two models and a decision-making strategy sequence, achieving timely and effective transcoding decisions for videos.
  • the multi-dimensional data of the user to which the video belongs such as the number of fans, the number of forwards, the number of likes, etc.
  • the video information such as the proportion of video playback volume exceeding 10,000, etc.
  • object feature decision-making model makes a video transcoding decision in advance to trigger transcoding; and when the video transcoding decision of the first machine learning model is not to transcode, the video is played and the video is played at the preset time Within (such as within 48 hours), use real-time popularity data (such as playback volume on video clips, etc.) combined with the preset transcoding decision strategy to make transcoding decisions; and no video transcoding is performed through this preset transcoding decision strategy.
  • the data of a few days after the video is played (such as the number of video views, reposts, likes, etc.) combined with the playback feature decision model will be used to determine the video transcoding decision result. Due to the different stages of the video, the available data is different.
  • the timeliness of video transcoding of the two models and a decision strategy decreases in sequence, while the accuracy of video transcoding increases in sequence.
  • the two models and a decision strategy are executed sequentially. , making a decision on whether to transcode the video can not only achieve the timeliness of transcoding, but also achieve the accuracy of transcoding, so that the video can be transcoded in a timely and effective manner to maximize the difference between revenue and cost.
  • Figure 2 shows a flow chart of a video processing method according to an embodiment of the present application, which specifically includes the following steps:
  • Step 202 When the target video is not played, input the object characteristics of the target object corresponding to the target video into the object characteristic decision model to obtain the first video decision result.
  • the target video can be understood as the above-mentioned video to be played, which can be any type, any length, any format of video, such as sports videos, entertainment videos, two-hour movies, etc.
  • the target object corresponding to the target video can be understood as the uploader of the target video;
  • the object characteristics of the target object can be understood as the object characteristics formed after data processing of the object attribute information of the target object, where the object attribute information includes but is not limited to Number of fans, number of retweets, number of likes, etc.
  • a video partition has only one partition number.
  • the partition number itself has no meaning, but the video partition itself will be a popular partition or an unpopular partition; if the partition number is used directly As an object feature, the video partition has no meaning. Therefore, some data processing will be performed on the video partition, and a score is configured for the video partition to indicate that the video partition is a popular partition or an unpopular partition, thus forming a realistic Object characteristics of meaning.
  • the object attribute information will be data processed to determine the object characteristics of the target object. Subsequently, the object characteristics can be combined with the object characteristics decision-making model to quickly and accurately obtain the first Video decision results.
  • the specific implementation method is as follows:
  • the object characteristics of the target object are input into the object characteristics decision model to obtain the first video decision result.
  • the object feature decision-making model includes but is not limited to the XGBoost model.
  • the object attribute information of the video partition can be processed and processed, such as setting a metric value for the video partition that can distinguish hot and cold conditions, so that the object attribute information of the video partition becomes a meaningful object feature.
  • the object characteristics of the target object are input into the pre-trained object characteristic decision model to obtain the first video decision result of the target video; in actual applications, the specific application scenarios of this video processing method are different, and the first video decision The results will be different.
  • the first video decision result can be video transcoding or the video is not transcoded;
  • the video processing method is applied to the video fast-forwarding scenario, the first video decision result can be The video decision result can be fast forwarding of the video or not fast forwarding of the video.
  • the following embodiments take the video processing method being applied to a video transcoding scenario as an example. However, this does not limit the video processing method to other achievable scenarios, such as the video fast-forward scenario introduced above.
  • the object feature decision model Before using the object feature decision model to decide whether to transcode a video, the object feature decision model needs to be pre-trained to ensure the speed and accuracy of subsequent video transcoding decisions.
  • the specific implementation method is as follows:
  • the training steps of the object feature decision-making model are as follows:
  • the training steps of the object feature decision-making model are as follows:
  • the object feature decision model is trained according to the training samples and the sample labels.
  • the sample video can be understood as multiple videos of any type, any playing time, and any format that have been played in history;
  • the sample object of the sample video can be understood as the uploader of the sample video;
  • the video playback volume of the sample video can be understood The number of times the sample video has been played, that is, the number of times it has been viewed;
  • the object attribute information of the sample object is the same as the object attribute information of the target object in the above embodiment, and can be understood as the number of fans, the number of forwards, the number of likes, etc.
  • multiple sample videos are first obtained, and then the sample object and video playback volume corresponding to each sample video are determined; the training sample is determined based on the object attribute information of the sample object, and the sample label corresponding to each training sample is determined based on the video playback volume. ; Then train the object feature decision-making model based on the training samples and training labels.
  • the sample label corresponding to the training sample is determined based on the video playback volume. It can be understood that when the video playback volume is greater than or equal to the preset playback volume threshold (such as 500), the sample label is set to 1, and the sample label corresponding to the sample label is determined.
  • the training sample is a positive sample; when the video playback volume is less than the preset playback volume threshold, the sample label is set to 0, and the training sample corresponding to the sample label is determined to be a negative sample.
  • the video playback volume corresponding to a certain sample video is 1,000, then when the preset playback volume threshold is 500, it can be determined that the object attribute information of the sample object corresponding to the sample video is a training sample.
  • the sample label determined for this training sample is 1, which means that the training sample is a positive sample.
  • the object attribute information of the sample object will be data processed to achieve feature construction; so that subsequent Based on the constructed more reasonable object features as training samples, the object feature decision-making model is trained and the accuracy of the model is improved.
  • the specific implementation method is as follows:
  • Determining the training sample based on the object attribute information of the sample object includes:
  • the object characteristics of the sample object are determined as training samples.
  • the object characteristics of the sample object can be used as a training sample, and then combined with the video playback volume according to the
  • the sample label of the training sample is determined to implement the training of the object feature decision-making model, so as to improve the use effect of the object feature decision-making model.
  • the target video corresponding to the target object Before using the object feature decision-making model, if the target video corresponding to the target object has a relatively high playback volume in history, then the target video will have a high probability of being played in large numbers after it is uploaded. Therefore, the target video will not be played until the target video is uploaded. Before playing, you can first determine whether the video needs to be transcoded based on the historical video data of the target object corresponding to the target video, combined with the current playback status of other videos, to avoid the situation where the target video will be played in large numbers immediately after it goes online. The transcoding is not timely, which affects the viewing experience.
  • the positive sample video determines the positive sample video, then determine the historical data of the object of the positive sample video under a certain feature, and determine the feature threshold under the feature; for specific use, you can obtain the target video This feature of the target object is compared with the feature threshold obtained under the positive sample to determine whether the target video requires video transcoding.
  • the specific acquisition method of the feature threshold is as follows:
  • the method further includes:
  • the corresponding feature threshold is determined according to the target feature.
  • the target feature can be any feature, such as the proportion of videos with more than 10,000 likes or the proportion of videos with more than 10,000 views; when the target feature is the proportion of videos with more than 10,000 likes, according to the positive sample object Determining the target characteristics of the historical video data can be understood as obtaining the number of likes for each video in all the videos uploaded by the positive sample object in the past, and determining the number of likes for all videos of the positive sample object based on the number of likes for each video.
  • the proportion of videos with more than 10,000 likes that is, the proportion of videos with more than 10,000 likes; when the target feature is the proportion of videos with more than 10,000 views, the target feature is determined based on the historical video data of the positive sample object, which can be understood as, Obtain the playback volume of each video among all the videos uploaded by the positive sample object in history, and determine the proportion of all videos of the positive sample object that have a playback volume of more than 10,000 based on the playback volume of each video, that is, the proportion of videos with a playback volume of more than 10,000 .
  • determining the corresponding feature threshold based on the target feature can be understood as obtaining the proportion of video playback volume exceeding 10,000 for all positive sample objects, and determining its mean value. , minimum value, maximum value and other statistics; train the weight of each statistic, and finally the weighted sum of each statistic obtains the final threshold (i.e., feature threshold).
  • the training of weights involves traversing the parameter combinations of weights and testing the final set of weight values on the test set. For example, to train the weights of the minimum and mean values, assume that the step size is 0.1. Then the parameter combinations include 0.1, 0.9; 0.2, 0.8; 0.3, 0.7, etc.
  • the uploader of currently known transcoded videos obtains the proportion of videos with more than 10,000 views among all historical videos, or the proportion of videos with more than 10,000 likes among all historical videos; subsequently, based on each upload
  • the proportion of each uploader's video playback volume exceeding 10,000 or the proportion of each uploader's video's likes volume exceeding 10,000 is calculated to calculate the corresponding feature threshold; when later determining whether the target video is transcoded, the target video can be first uploaded based on the corresponding
  • the specific implementation method is as follows:
  • the method Before inputting the object characteristics of the target object into the object characteristic decision-making model and obtaining the first video decision-making result, the method further includes:
  • the target feature of the target object is the same as the target feature obtained by obtaining the feature threshold.
  • the feature threshold obtained above is the proportion of video playback volume exceeding 10,000, then the target feature is the proportion of video playback volume exceeding 10,000; and the target The characteristic value of a feature is a specific proportion value.
  • the target video when the target video is not played, the target feature of the target object corresponding to the target video and the characteristic value of the target feature are obtained, that is, the proportion and proportion of the video playback volume exceeding 10,000; The proportion of the proportion is compared with the characteristic threshold obtained above, and the fourth video decision result is obtained based on the specific comparison result, that is, the video is transcoded or not transcoded; finally, it is determined that the fourth video decision result is transcoded. In this case, it is determined that the fourth video decision result satisfies the decision condition; at this time, the target video can be transcoded according to the fourth video decision result.
  • the fourth video decision result is obtained based on the correlation between the characteristic value of the target feature and the characteristic threshold. It can be understood that the characteristic value of the target feature is compared with the characteristic threshold, and the target feature is If the feature value of is greater than or equal to the feature threshold, the fourth video decision result is determined to be video transcoding; if the feature value of the target feature is less than the feature threshold, the fourth video decision result is determined to be video non-transcoding.
  • the feature threshold is 70%
  • the proportion of videos with more than 10,000 videos is 75%
  • the 75% proportion of videos with more than 10,000 videos is compared with the feature threshold of 70% obtained above, then It can be determined that the proportion of the video that exceeds 10,000 is greater than the feature threshold.
  • the fourth video decision result is video transcoding.
  • features calculated based on the target characteristics of the target object corresponding to the target video and the target characteristics of historical transcoded videos can be used Compare the threshold and quickly decide whether to transcode the target video, so that when the target object's historical video playback volume exceeds 10,000 and accounts for a large proportion, the target video uploaded by the target object will be played in large quantities by default.
  • the probability is relatively high, so transcoding and playback can be performed directly, improving the timeliness of transcoding and subsequent video playback revenue.
  • Step 204 If the first video decision result does not meet the decision condition, play the target video.
  • the specific application scenarios of the video processing method provided by the embodiments of this specification are different, the first video decision result is different, and the content of judging whether the first video decision result meets the decision condition is also different; for example, the video processing method is applied to video transcoding
  • the first video decision result can be understood as video transcoding or video non-transcoding introduced in the above embodiment, and the corresponding video decision conditions can be understood as video transcoding conditions;
  • the video processing method is applied to the video recommendation scenario
  • the first video decision result can be understood as video recommendation or video non-recommendation
  • the corresponding video decision conditions can be understood as video recommendation conditions, etc.
  • the first video decision result is that the video is not transcoded
  • the first video decision result is video transcoding
  • Step 206 Within the target playback time period, determine the second video decision result according to the preset video processing strategy.
  • the target playback time period can be set according to the actual application, and the embodiment of the present application does not impose any limitation on this; for example, the target playback time period is set to 48 hours or 50 hours, etc.
  • the preset video processing strategy can also be set according to the actual application.
  • the video can be divided into segments, and whether the video needs to be transcoded is determined based on the playback volume of the segmented video; it can also be based on all plays within the target playback time period. The overall number of views or likes of the video determines whether the video needs to be transcoded.
  • the video is divided into segments, and whether the video needs to be transcoded is determined based on the playback volume of the segmented video as a preset video processing strategy.
  • the preset video processing strategy is used to determine whether the video needs to be transcoded. Determine the decision-making results of the second video and introduce them in detail.
  • Determining the second video decision result according to the preset video processing strategy includes:
  • At least two video clips are obtained according to the preset division rules, and the second video decision result is determined based on the playback volume of the at least two video clips.
  • the preset division rules can be set according to actual applications, and the embodiments of this application again do not impose any limitations.
  • the preset division rule is to divide a video clip every three minutes, or divide a video clip every five minutes, etc.
  • one video segment is divided every three minutes.
  • the second video decision result is determined based on the playback volume of the at least two divided video segments.
  • the video processing method provided by the embodiment of the present application can obtain at least two video clips according to the preset division rules when the target video starts to be played. Subsequently, the third video clip can be quickly determined based on the playback volume of the divided at least two video clips. The second video decision result is used to ensure the timely transcoding of the target video.
  • specific implementation methods for determining the second video decision result include at least two methods according to the playback volume of the divided at least two video clips.
  • One method can combine two adjacent video clips. Compare the playback volume, and quickly determine the decision-making result of the second video based on the growth of playback volume.
  • the specific implementation method is as follows:
  • Determining the second video decision result based on the playback volume of the at least two video clips includes:
  • the second video decision result is determined according to the correlation between the playback amount difference and the difference threshold.
  • the difference threshold can be set according to the actual application, for example, the difference threshold is 500 or 1000, etc.
  • any two adjacent video segments may be understood as video segment 1 and video segment 2, or video segment 2 and video segment 3.
  • any two adjacent video clips calculate the difference in playback volume of any two adjacent video clips; for example, any two adjacent video clips include video clip 1 and video clip 2, where the playback volume of video clip 1 The playback volume of video clip 2 is 100, and the playback volume of video clip 2 is 1100, then the playback volume difference between video clip 1 and video clip 2 is 1000; finally, according to the correlation between the playback volume difference and the preset difference threshold, Quickly determine the second video decision result to ensure the timeliness of video transcoding.
  • determining the second video decision result based on the correlation between the playback amount difference and the difference threshold includes:
  • the playback amount difference is less than the difference threshold, it is determined that the second video decision result is that the video is not transcoded.
  • the play volume difference of 1000 is equal to the difference threshold of 1000, then it can be determined that the second video decision result is video transcoding; and if When the difference in playback volume is 900 and the difference threshold is 1000, it can be determined that the playback volume difference 900 is less than the difference threshold 1000, and it can be determined that the second video decision result is that the video is not transcoded.
  • the second video can be quickly and accurately determined based on the correlation between the playback volume difference of any two adjacent video clips and the difference threshold during the playback of the target video. Decision result; that is, when the playback volume of the latter video clip has increased significantly compared with the playback volume of the previous video clip, it can be determined that the probability of the target video being played in large quantities is high. At this time, you can Video transcode the target video.
  • the playback amount of a continuous preset number of video clips can also be compared with the calculated popularity threshold, and the second video decision result can be quickly determined based on the relationship between the playback amount and the popularity threshold.
  • the specific implementation method is as follows:
  • Determining the second video decision result based on the playback volume of the at least two video clips includes:
  • the second video decision result is determined according to the play amount of each video segment in the at least two video segments and the popularity threshold.
  • the at least two video clips in this embodiment of the present application can be understood as all video clips divided according to the preset division rules within the target playback time period.
  • the popularity threshold for the target playback time period can be calculated based on the playback volume of all video clips; specifically, the calculation method of the popularity threshold is the same as the calculation method of the above characteristic threshold. are the same and will not be repeated here. For example, obtain the minimum value, average value, etc. of the playback volume of the video clip within the target playback time period, and perform calculations in the above manner to obtain the final popularity threshold.
  • the second video decision result can be quickly determined based on the playback volume of the at least two video clips and the popularity threshold.
  • Determining the second video decision result based on the play amount of each video segment in the at least two video segments and the popularity threshold includes:
  • the second video decision result is determined based on the play amount of each video segment in the continuous video segments and the correlation between the popularity threshold.
  • the preset number can be set according to the actual application, for example, the preset number can be set to 2, 3 or 4, etc.
  • two consecutive video clips are obtained from at least two video clips, and the playback amount of each video clip in the two consecutive video clips is determined; and then based on these two
  • the correlation between the playback volume of each video clip in the consecutive video clips and the popularity threshold determines the second video decision-making result.
  • two consecutive video clips include video clip 1 and video clip 2.
  • the playback volume of video clip 1 is 100
  • the playback volume of video clip 2 is 1100
  • the popularity threshold is 800.
  • the follow-up can be based on The playback volume of video clip 1 is 100
  • the playback volume of video clip 2 is 1100. They are respectively associated with the popularity threshold of 800, and the second video decision result is quickly obtained.
  • the specific implementation method of determining the second video decision result according to the play volume of each video segment in the consecutive video segments and the popularity threshold is as follows:
  • Determining the second video decision result based on the play amount of each video segment in the continuous video segments and the correlation between the popularity thresholds includes:
  • the playback volume of video clip 1 is 1000
  • the playback volume of video clip 2 is 1500
  • the popularity threshold is 800
  • the playback volume of each video clip in the continuous video clips is 1000, and the playback volume of video clip 2 is 1500, both of which are greater than or equal to the popularity threshold. 800, at this time, it can be determined that the second video decision result is video transcoding. And if any one or both of video clip 1 and video clip 2 are less than the popularity threshold 800, it can be determined that the second video decision result is that the video is not transcoded.
  • Step 208 If the second video decision result satisfies the decision condition, perform video processing on the target video.
  • the specific application scenarios of the video processing method provided by the embodiments of the present application are different, and the processing content of the video processing of the target video is also different; for example, the video processing method provided by the embodiments of the present application is applied to video transcoding.
  • video processing is performed on the target video, including:
  • the second video decision result is video transcoding, it is determined that the second video decision result satisfies the decision condition, and the target video is transcoded.
  • the decision condition is a video transcoding condition
  • the second video decision result is video transcoding
  • the video processing method provided by the embodiment of the present application uses the object characteristics of the target object corresponding to the target video and a pre-trained object characteristic decision model to make a video transcoding decision in advance before the target video is played; and before the video is played,
  • the transcoding decision is that the video is not transcoded
  • the video transcoding decision is made again through the preset video processing strategy to solve the waste of resources caused by transcoding all the target videos, and according to the above strategy
  • the target video should be transcoded effectively to avoid insufficient encoding and achieve accurate transcoding of the target video.
  • the video will be played again based on Based on the playback status of the target video that has been played, determine again whether the target video has transcoding value and whether video transcoding is required.
  • the method further includes:
  • the preset playback time can be set according to time, and the preset playback time is greater than or equal to the target playback time period.
  • the target playback time period is 48 hours
  • the preset playback time can be 50 hours or 60 hours.
  • the playback feature decision-making model is a pre-trained machine learning model, including but not limited to the XGBoost model.
  • XGBoost machine learning model
  • the preset playback time is obtained.
  • the video playback characteristics of the target video within the time period can be understood as, within 48 hours of playback of the target video, if the second video decision result obtained through any of the above preset video processing strategies still does not meet the decision conditions, Continue to play the target video, and when the target video plays for 50 hours, obtain the video playback characteristics of the target video during the 50 hours of playback.
  • the video playback features are obtained through data processing based on the obtained video playback attribute information of the target video within the preset playback time period.
  • the specific implementation method is as follows:
  • the video playback attribute information includes but is not limited to the number of views, reposts, likes, etc. after the target video is broadcast.
  • the specific processing method of performing data processing on the video playback attribute information to obtain the video playback characteristics of the target video is the same as the above-mentioned specific processing method of performing data processing on the object attribute information to obtain the object characteristics of the target object, and will not be used here. Again.
  • the video playback characteristics can be input into the playback characteristics decision model to obtain the third video decision result; when the third video decision result satisfies the decision conditions, the target video can be Perform video processing; such as transcoding videos.
  • the video decision results obtained are after the target video is played, so if the video decision results obtained are video transcoding, in order to avoid causing video transcoding Code omission, when the target video that has not been played is transcoded based on the video decision result, the target video that has been played before the video transcoding is determined will also be supplemented and transcoded.
  • the playback feature decision-making model Before using the playback feature decision-making model, the playback feature decision-making model will be pre-trained to improve the accuracy and effectiveness of the results of the playback feature decision-making model.
  • the specific training method of the playback feature decision model is as follows:
  • the training steps of the playback feature decision model are as follows:
  • the playback feature decision model is trained according to the training samples and the sample labels.
  • the video playback attribute information will also be data processed to obtain the video playback features of standard sample videos, and the playback feature decision model will be trained.
  • the specific implementation method is as follows:
  • Determining the training sample based on the video playback attribute information corresponding to the sample video includes:
  • the video playback characteristics of the sample video are determined as training samples.
  • the video processing method provided by the embodiment of the present application uses the object characteristics of the target object corresponding to the target video and a pre-trained object characteristic decision model to make a video transcoding decision in advance before the target video is played; and before the video is played, When the transcoding decision is that the video is not transcoded, after the target video is played, the video transcoding decision can be determined again through the preset video processing strategy within the target playback time period.
  • the video transcoding decision is that the video is not transcoded, after the target video has been played for a period of time, the video transcoding decision will be further determined based on the playback situation of the played video and the playback feature decision model; to solve the problem
  • Figure 3 shows a processing flow chart of a video processing method applied to a video transcoding scenario provided by an embodiment of the present application, which specifically includes the following steps:
  • Step 302 Obtain the video to be transcoded.
  • Step 304 Determine the uploader of the video to be transcoded, and obtain the uploader's historical video playback volume.
  • Step 306 Based on the uploader's historical video playback volume, determine the proportion of the uploader's video playback volume exceeding 10,000.
  • Step 308 Determine whether the proportion of the uploader's video playback volume exceeding 10,000 is greater than or equal to the preset proportion threshold. If yes, perform step 310. If not, perform step 312.
  • the preset proportion threshold is the same as the characteristic threshold in the above embodiment, and will not be described again here.
  • Step 310 Video transcoding.
  • Step 312 Obtain the object characteristics of the uploader, input the object characteristics of the uploader into the first machine learning model, and obtain the first video transcoding result of the video to be transcoded.
  • Step 314 Determine whether the first video transcoding result meets the transcoding conditions. If yes, execute step 310. If not, execute step 316.
  • the method of obtaining the object characteristics of the uploader is the same as the method of obtaining the object characteristics of the target object in the above embodiment; the first machine learning model can be understood as the object characteristics decision model in the above embodiment.
  • Step 316 Play the video to be transcoded, and determine the second video transcoding result according to the preset video transcoding strategy within the target playback time period.
  • the preset video transcoding strategy can be understood as the preset video processing strategy in the above embodiment.
  • Step 318 Determine whether the second video transcoding result meets the transcoding conditions. If yes, execute step 320. If not, execute step 322.
  • Step 320 Transcode the video and supplement the transcoding.
  • the second video transcoding result meets the transcoding conditions, that is, when video transcoding is required, the unplayed video to be transcoded is transcoded, and the previously played video to be transcoded is supplemented with transcoding.
  • Step 322 During the preset playback time period of the video to be transcoded, obtain the video playback characteristics of the video to be transcoded within the preset playback time period, and input the video playback characteristics into the second machine learning model to obtain the third Video transcoding results.
  • the video playback features of the video to be transcoded are obtained in the same manner as the video playback features of the target video in the above embodiment; the second machine learning model can be understood as the playback feature decision model in the above embodiment.
  • Step 324 Determine whether the third video transcoding result meets the transcoding conditions. If yes, execute step 320. If not, end.
  • the video processing method uses machine learning models and statistical methods to analyze video-related historical data, accurately determine whether the video has transcoding value, realize effective transcoding of the video, and achieve bandwidth benefits under limited resources. Maximize the difference with computing power and storage costs.
  • multiple data sources are used to conduct data analysis through machine learning models and statistical methods, and a transcoding decision-making strategy and transcoding decision-making model (the first machine learning model) are designed to make video conversions in advance before the video is opened. Coding decision-making: after the video is opened (played), another transcoding decision-making strategy and a transcoding decision-making model are used to complement the video transcoding in a timely manner to achieve timely and effective video transcoding, and to avoid unnecessary video transcoding and waste of resources.
  • videos with transcoding value should be identified as early as possible to ultimately maximize the difference between revenue and cost. That is to say, the video processing method provided by this application can conduct data analysis through machine learning models and statistical methods, design multiple transcoding decision strategies and transcoding decision models, and make video transcoding decisions in advance before the video is opened. Make up decisions in a timely manner to achieve timely and effective video transcoding.
  • FIG. 4 shows a schematic structural diagram of a video processing device provided by an embodiment of this application. As shown in Figure 4, the device includes:
  • the first result obtaining module 402 is configured to input the object characteristics of the target object corresponding to the target video into the object characteristic decision model to obtain the first video decision result when the target video is not played;
  • the video playback module 404 is configured to play the target video when the first video decision result does not meet the decision conditions
  • the second result obtaining module 406 is configured to determine the second video decision result according to the preset video processing strategy within the target playback time period;
  • the video processing module 408 is configured to perform video processing on the target video if the second video decision result satisfies the decision condition.
  • the device also includes:
  • the third result acquisition module is configured as:
  • the third result obtaining module is further configured as:
  • the second result obtaining module 406 is further configured as:
  • At least two video clips are obtained according to the preset division rules, and the second video decision result is determined based on the playback volume of the at least two video clips.
  • the second result obtaining module 406 is further configured as:
  • the second video decision result is determined according to the correlation between the playback amount difference and the difference threshold.
  • the second result obtaining module 406 is further configured as:
  • the playback amount difference is less than the difference threshold, it is determined that the second video decision result is that the video is not transcoded.
  • the second result obtaining module 406 is further configured as:
  • the second video decision result is determined according to the play amount of each video segment in the at least two video segments and the popularity threshold.
  • the second result obtaining module 406 is further configured as:
  • the second video decision result is determined based on the play amount of each video segment in the continuous video segments and the correlation between the popularity threshold.
  • the second result obtaining module 406 is further configured as:
  • the video processing module 408 is further configured to:
  • the second video decision result is video transcoding, it is determined that the second video decision result satisfies the decision condition, and the target video is transcoded.
  • the device also includes:
  • the first model training module is configured to: train the object feature decision-making model
  • the training steps of the object feature decision-making model are as follows:
  • the object feature decision model is trained according to the training samples and the sample labels.
  • the first model training module is further configured to:
  • the object characteristics of the sample object are determined as training samples.
  • the device also includes:
  • the feature threshold acquisition module is configured as:
  • the corresponding feature threshold is determined according to the target feature.
  • the device also includes:
  • the fourth result acquisition module is configured as:
  • the first result obtaining module 402 is further configured as:
  • the object characteristics of the target object are input into the object characteristics decision model to obtain the first video decision result.
  • the device also includes:
  • the second model training module is configured to: train the playback feature decision-making model
  • the training steps of the playback feature decision model are as follows:
  • the playback feature decision model is trained according to the training samples and the sample labels.
  • the second model training module is further configured as:
  • the video playback characteristics of the sample video are determined as training samples.
  • the video processing device makes a video transcoding decision in advance based on the object characteristics of the target object corresponding to the target video and a pre-trained object characteristic decision model before the target video is played; and when the video When the transcoding decision is that the video is not transcoded, after the target video is played, the video transcoding decision is made again through the preset video processing strategy to solve the waste of resources caused by transcoding all the target videos, and according to the above strategy When it is determined that the video needs to be transcoded, the target video should be transcoded effectively to avoid insufficient encoding and achieve accurate transcoding of the target video.
  • the above is a schematic solution of a video processing device in this embodiment. It should be noted that the technical solution of the video processing device and the technical solution of the above-mentioned video processing method belong to the same concept. For details that are not described in detail in the technical solution of the video processing device, please refer to the description of the technical solution of the above video processing method. .
  • Figure 5 shows a structural block diagram of a computing device 500 provided according to an embodiment of this specification.
  • Components of the computing device 500 include, but are not limited to, memory 510 and processor 520 .
  • the processor 520 is connected to the memory 510 through a bus 530, and the database 550 is used to save data.
  • Computing device 500 also includes an access device 540 that enables computing device 500 to communicate via one or more networks 560 .
  • networks include the Public Switched Telephone Network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communications networks such as the Internet.
  • Access device 540 may include one or more of any type of network interface (eg, a network interface card (NIC)), wired or wireless, such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, Global Interconnection for Microwave Access ( Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, etc.
  • NIC network interface card
  • the above-mentioned components of the computing device 500 and other components not shown in FIG. 5 may also be connected to each other, such as through a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 5 is for illustrative purposes only and does not limit the scope of this description. Those skilled in the art can add or replace other components as needed.
  • Computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile telephone (e.g., smartphone ), a wearable computing device (e.g., smart watch, smart glasses, etc.) or other type of mobile device, or a stationary computing device such as a desktop computer or PC.
  • a mobile computer or mobile computing device e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.
  • a mobile telephone e.g., smartphone
  • a wearable computing device e.g., smart watch, smart glasses, etc.
  • stationary computing device such as a desktop computer or PC.
  • Computing device 500 may also be a mobile or stationary server.
  • the above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above-mentioned video processing method belong to the same concept. For details that are not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above video processing method.
  • An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the instructions are executed by a processor, the steps of the video processing method as described above are implemented.
  • the computer instructions include computer program code, which may be in the form of source code, object code, executable file or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , random access memory (RAM, RandomAccess Memory), electrical carrier signals, telecommunications signals, and software distribution media, etc.
  • ROM Read-Only Memory
  • RAM RandomAccess Memory
  • electrical carrier signals telecommunications signals
  • software distribution media etc.
  • the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of legislation and patent practice in the jurisdiction.
  • the computer-readable medium Excludes electrical carrier signals and telecommunications signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Library & Information Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The present application provides a video processing method and apparatus. The method comprises: when a target video is not played back, inputting an object feature of a target object corresponding to the target video to an object feature decision model to obtain a first video decision result; when the first video decision result does not meet a decision condition, playing back the target video; within a target playback time period, determining a second video decision result according to a preset video processing strategy; and when the second video decision result meets the decision condition, performing video processing on the target video. According to the method, a transcoding decision model and a transcoding decision strategy are designed, a video transcoding decision is made in advance by means of the transcoding decision model before a video is opened, the decision is supplemented in a timely a manner by means of the transcoding decision strategy after the video is opened, thereby achieving timely and effective video transcoding.

Description

视频处理方法及装置Video processing method and device
本申请申明2022年03月28日递交的申请号为202210311587.2、名称为“视频处理方法及装置”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。This application declares the priority of the Chinese patent application with application number 202210311587.2 and titled "Video Processing Method and Device" submitted on March 28, 2022. The entire content of the Chinese patent application is incorporated into this application by reference.
技术领域Technical field
本申请涉及视频处理技术领域,特别涉及一种视频处理方法。本申请同时涉及一种视频处理装置,一种计算设备,以及一种计算机可读存储介质。The present application relates to the field of video processing technology, and in particular to a video processing method. This application also relates to a video processing device, a computing device, and a computer-readable storage medium.
背景技术Background technique
视频编码是视频领域一个重要的技术手段。未经过编码的视频的体积可能较大,对视频的存储和传输均会造成极大的压力。因此,在进行视频的存储和传输等,一般会通过视频编码实现对视频数据的压缩。Video coding is an important technical means in the video field. Unencoded videos may be larger in size, which will put great pressure on the storage and transmission of the videos. Therefore, when storing and transmitting videos, video data is generally compressed through video coding.
然而,发明人意识到,在是否进行视频编码,即转码决策上,目前采用的策略较为简单,一种是无差别的对全部视频均进行转码,另一种是通过人为主观判断进行转码决策;但是这两种策略均会存在资源浪费或编码不足的情况发生。However, the inventor realized that the currently adopted strategies for deciding whether to encode a video, that is, transcoding, are relatively simple. One is to transcode all videos indiscriminately, and the other is to transcode through human subjective judgment. Coding decision-making; however, both strategies will lead to waste of resources or insufficient coding.
发明内容Contents of the invention
有鉴于此,本申请实施例提供了一种视频处理方法。本申请同时涉及一种视频处理装置,一种计算设备,以及一种计算机可读存储介质,以解决现有技术中存在的视频转码时存在的资源浪费或者编码不足的技术问题。In view of this, embodiments of the present application provide a video processing method. The present application also relates to a video processing device, a computing device, and a computer-readable storage medium to solve the technical problems of resource waste or insufficient coding during video transcoding that exist in the prior art.
根据本申请实施例的第一方面,提供了一种视频处理方法,包括:According to a first aspect of the embodiments of the present application, a video processing method is provided, including:
在目标视频未播放的情况下,将所述目标视频对应的目标对象的对象特征,输入对象特征决策模型,获得第一视频决策结果;When the target video is not played, input the object characteristics of the target object corresponding to the target video into the object characteristics decision model to obtain the first video decision result;
在所述第一视频决策结果不满足决策条件的情况下,播放所述目标视频;When the first video decision result does not meet the decision conditions, play the target video;
在目标播放时间段内,根据预设视频处理策略确定第二视频决策结果;Within the target playback time period, determine the second video decision result according to the preset video processing strategy;
在所述第二视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理。If the second video decision result satisfies the decision condition, perform video processing on the target video.
根据本申请实施例的第二方面,提供了一种视频处理装置,包括:According to a second aspect of the embodiment of the present application, a video processing device is provided, including:
第一结果获得模块,被配置为在目标视频未播放的情况下,将所述目标视频对应的目标对象的对象特征,输入对象特征决策模型,获得第一视频决策结果;The first result obtaining module is configured to input the object characteristics of the target object corresponding to the target video into the object characteristic decision model to obtain the first video decision result when the target video is not played;
视频播放模块,被配置为在所述第一视频决策结果不满足决策条件的情况下,播放所述目标视频;A video playback module configured to play the target video when the first video decision result does not meet the decision condition;
第二结果获得模块,被配置为在目标播放时间段内,根据预设视频处理策略确定第二视频决策结果;The second result obtaining module is configured to determine the second video decision result according to the preset video processing strategy within the target playback time period;
视频处理模块,被配置为在所述第二视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理。A video processing module configured to perform video processing on the target video if the second video decision result satisfies the decision condition.
根据本申请实施例的第三方面,提供了一种计算设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,所述处理器执行所述指令时实现所述视频处理方法的步骤。According to a third aspect of the embodiment of the present application, a computing device is provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor. When the processor executes the instructions, the described instructions are implemented. Steps of video processing methods.
根据本申请实施例的第四方面,提供了一种计算机可读存储介质,其存储有计算机指令,该指令被处理器执行时实现所述视频处理方法的步骤。According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer instructions that implement the steps of the video processing method when executed by a processor.
本申请提供的视频处理方法,包括在目标视频未播放的情况下,将所述目标视频对应的目标对象的对象特征,输入对象特征决策模型,获得第一视频决策结果;在所述第一视频决策结果不满足决策条件的情况下,播放所述目标视频;在目标播放时间段内,根据预设视频处理策略确定第二视频决策结果;在所述第二视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理。The video processing method provided by this application includes, when the target video is not played, inputting the object characteristics of the target object corresponding to the target video into the object characteristics decision model to obtain the first video decision result; in the first video When the decision result does not meet the decision condition, the target video is played; within the target play time period, the second video decision result is determined according to the preset video processing strategy; when the second video decision result meets the decision condition In this case, perform video processing on the target video.
具体的,该视频处理方法在目标视频未播放之前,通过目标视频对应的目标对象的对象特征,结合预先训练的对象特征决策模型,提前做出视频转码决策;而在该视频转码决策为视频未转码的情况下,在目标视频播放后,通过预设视频处理策略再次进行视频转码决策,以解决对全部目标视频进行转码造成的资源浪费,以及在根据上述策略确定视频要转码的情况下,对目标视频进行有效转码,避免编码不足的情况发生,实现对目标视频的精准转码。Specifically, before the target video is played, the video processing method uses the object characteristics of the target object corresponding to the target video and combines the pre-trained object characteristics decision model to make the video transcoding decision in advance; and the video transcoding decision is When the video is not transcoded, after the target video is played, the video transcoding decision is made again through the preset video processing strategy to solve the waste of resources caused by transcoding all target videos, and after determining the video to be transcoded based on the above strategy. In the case of encoding, the target video is effectively transcoded to avoid insufficient encoding and achieve accurate transcoding of the target video.
附图说明Description of drawings
图1是本申请一实施例提供的一种视频处理方法在具体应用场景的示例性说明;Figure 1 is an exemplary illustration of a video processing method provided by an embodiment of the present application in a specific application scenario;
图2是本申请一实施例提供的一种视频处理方法的流程图;Figure 2 is a flow chart of a video processing method provided by an embodiment of the present application;
图3是本申请一实施例提供的一种应用于视频转码场景的视频处理方法的处理流程图;Figure 3 is a processing flow chart of a video processing method applied to a video transcoding scenario provided by an embodiment of the present application;
图4是本申请一实施例提供的一种视频处理装置的结构示意图;Figure 4 is a schematic structural diagram of a video processing device provided by an embodiment of the present application;
图5是本申请一实施例提供的一种计算设备的结构框图。Figure 5 is a structural block diagram of a computing device provided by an embodiment of the present application.
具体实施方式Detailed ways
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described here. Those skilled in the art can make similar extensions without violating the connotation of the present application. Therefore, the present application is not limited by the specific implementation disclosed below.
在本申请一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请一个或多个实施例。在本申请一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本申请一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to limit the one or more embodiments of the present application. As used in one or more embodiments of this application and the appended claims, the singular forms "a," "the" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used in one or more embodiments of this application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本申请一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be called the second, and similarly the second may also be called the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to determining."
首先,对本申请一个或多个实施例涉及的名词术语进行解释。First, the terminology involved in one or more embodiments of this application is explained.
数据挖掘:它基于机器学习、模式识别、统计学、数据库等学科,从数据中挖掘潜在信息,帮助决策者解决实际问题。Data mining: It is based on machine learning, pattern recognition, statistics, database and other disciplines to mine potential information from data to help decision-makers solve practical problems.
机器学习:是一门致力于如何通过计算的手段,利用经验来改善系统自身的性能的学科,它所研究的主要内容是关于在计算机上从数据中产生“模型”的算法,即“学习算法。Machine learning: It is a discipline dedicated to how to use experience to improve the performance of the system itself through computational means. The main content of its research is about algorithms that generate "models" from data on computers, that is, "learning algorithms" .
统计学:统计学是关于认识客观现象总体数量特征和数量关系的科学。它是通过搜集、整理、分析统计资料认识客观现象数量规律性的方法论科学。Statistics: Statistics is the science of understanding the overall quantitative characteristics and quantitative relationships of objective phenomena. It is a methodological science that understands the quantitative regularity of objective phenomena through collecting, organizing, and analyzing statistical data.
特征工程:是一种最大限度从原始数据中提取特征,供模型和算法使用的手段,包括数据预处理、特征选择、将维、特征扩展等。Feature engineering: It is a means of extracting features from original data to the maximum extent for use by models and algorithms, including data preprocessing, feature selection, dimension and feature expansion, etc.
视频转码:对视频进行编码,实现视频数据压缩。常见编码标准包括JPEG、MJPEG、H264、H265、AV1等。Video transcoding: Encode videos to achieve video data compression. Common encoding standards include JPEG, MJPEG, H264, H265, AV1, etc.
转码决策:是否对视频进行转码决策。Transcoding decision: whether to transcode the video.
带宽收益:视频转码后带来的带宽计费的降低。Bandwidth revenue: the reduction in bandwidth billing after video transcoding.
XGBoost模型:是一种梯度提升决策树(GBDT,Gradient Boosting DecisionTree),XGBoost其本质上还是基于树结构并结合集成学习的一种方法,其基础树结构为分类回归树(CART,Classification and Regression Tree)。XGBoost model: It is a gradient boosting decision tree (GBDT, Gradient Boosting DecisionTree). XGBoost is essentially a method based on a tree structure and combined with integrated learning. Its basic tree structure is a classification and regression tree (CART, Classification and Regression Tree) ).
在本申请中,提供了一种视频处理方法,本申请同时涉及一种视频处理装置,一种计算设备,以及一种计算机可读存储介质,在下面的实施例中逐一进行详细说明。In this application, a video processing method is provided. This application also relates to a video processing device, a computing device, and a computer-readable storage medium, which will be described in detail one by one in the following embodiments.
参见图1,图1是本申请一实施例提供的一种视频处理方法在具体应用场景的示例性说明。Referring to Figure 1, Figure 1 is an exemplary illustration of a video processing method provided by an embodiment of the present application in a specific application scenario.
图1的具体应用场景中包括客户端102和服务器104。The specific application scenario in Figure 1 includes a client 102 and a server 104.
具体实施时,用户(如视频的上传者)通过客户端102向服务器104发送待播放的视频。During specific implementation, the user (such as the uploader of the video) sends the video to be played to the server 104 through the client 102.
服务器104在接收到该待播放的视频之后,确定该待播放的视频的用户,获取该用户的所有视频中播放量过万的视频占比,在该视频占比大于预设占比阈值的情况下,对该待播放的视频进行转码,并将转码后的视频发送至客户端(包括但不限于客户端102)播放;其中,预设占比阈值可以根据历史数据进行计算,下述实施例会介绍具体计算过程。After receiving the video to be played, the server 104 determines the user of the video to be played, and obtains the proportion of videos with more than 10,000 views among all videos of the user. When the proportion of the video is greater than the preset proportion threshold Next, transcode the video to be played, and send the transcoded video to the client (including but not limited to client 102) for playback; wherein, the preset proportion threshold can be calculated based on historical data, as follows The specific calculation process will be introduced in the embodiment.
而在该视频占比小于预设占比阈值的情况下,获取该用户的多个维度的数据,例如粉丝数、转发量、点赞量等;对这些多个维度的数据进行数据处理,获得该用户的用户特征。将该用户的用户特征输入预先训练的对象特征决策模型,获得该用户特征对应的标签,根据该标签确定视频转码决策结果,即标签为0的情况下,该视频转码决策结果为不转码;标签为1的情况下,该视频转码决策结果为转码;那么在视频转码决策结果为转码的情况下,对该待播放的视频进行转码,并将转码后的视频发送至客户端播放。When the proportion of the video is less than the preset proportion threshold, obtain the user's data in multiple dimensions, such as the number of fans, the number of forwards, the number of likes, etc.; perform data processing on these multi-dimensional data to obtain User characteristics of this user. Input the user characteristics of the user into the pre-trained object characteristic decision model, obtain the label corresponding to the user characteristics, and determine the video transcoding decision result based on the label, that is, when the label is 0, the video transcoding decision result is not transcoding. code; when the tag is 1, the video transcoding decision result is transcoding; then when the video transcoding decision result is transcoding, the video to be played is transcoded, and the transcoded video Send to client for playback.
而在该视频决策结果为不转码的情况下,根据预设决策策略对该视频是否转码进行决策。具体的,播放该视频,并在视频播放后预设时间段内(例如48小时内),每三分钟或者五分钟等划分一个视频片段,在下一个视频片段上的播放量相较于上一个视频片段上的播放量,增长超过1000以上的播放量的情况下,对该视频进行转码,并对已经播放的视频进行补足转码;又或者可以根据统计学计算出每个视频片段上的播放量阈值,即热度阈值,在连续的三个或者四个等视频片段上的播放量均超过该播放量阈值的情况下,对该视频进行转码,并对已经播放的视频进行补足转码;且将转码后的视频发送至客户端播放。When the decision result of the video is not to transcode, a decision is made as to whether to transcode the video according to the preset decision strategy. Specifically, the video is played, and within a preset time period (for example, within 48 hours) after the video is played, a video segment is divided every three minutes or five minutes, and the playback volume of the next video segment is compared with the previous video. When the number of views on a clip increases to more than 1,000, the video will be transcoded and the video that has been played will be supplemented and transcoded; or the playback rate of each video clip can be calculated based on statistics Volume threshold, that is, the popularity threshold. When the play volume of three or four consecutive video clips exceeds the play volume threshold, the video will be transcoded, and the video that has been played will be supplemented and transcoded; And send the transcoded video to the client for playback.
若视频播放后预设时间段结束,该视频仍旧没有转码,则获取该预设时间段内视频播放后的播放量、转发量以及点赞量等,对这些视频播放后的播放量、转发量以及点赞量等进行数据处理,获得该视频播放后的视频播放特征。将该视频播放特征输入预先训练的播放特征决策模型,获得该播放特征对应的标签,根据该标签确定视频转码决策结果,即标签为0的情况下,该视频转码决策结果为不转码;标签为1的情况下,该视频转码决策结 果为转码;那么在视频转码决策结果为转码的情况下,对该视频进行转码,并对已经播放的视频进行补足转码,且将转码后的视频发送至客户端播放。If the preset time period ends after the video is played and the video is still not transcoded, the number of views, reposts, and likes after the video is played within the preset time period are obtained, and the playback volume, reposts, etc. of these videos are obtained. Perform data processing on the volume and number of likes, etc., to obtain the video playback characteristics after the video is played. Input the video playback features into the pre-trained playback feature decision model, obtain the label corresponding to the playback feature, and determine the video transcoding decision result based on the label. That is, if the label is 0, the video transcoding decision result is no transcoding. ; When the tag is 1, the video transcoding decision result is transcoding; then when the video transcoding decision result is transcoding, the video is transcoded, and the video that has been played is supplementary transcoded. And send the transcoded video to the client for playback.
本申请实施例提供的视频处理方法,利用机器学习与统计学方法实现了一个由两个模型和一个决策策略顺序构成的转码决策方案,实现对视频的及时且有效的转码决策。具体的,在视频播放前,利用视频所属用户的多个维度数据(如粉丝数、转发量、点赞量等)以及视频信息(如视频播放量过万占比等),结合第一个机器学习模型(即对象特征决策模型),提前作出视频转码决策触发转码;而在第一机器学习模型的视频转码决策为不转码的情况下,播放视频,并在视频播放预设时间内(如48小时内),利用实时热度数据(如视频片段上的播放量等)结合预设转码决策策略进行转码决策;而在通过该预设转码决策策略也未进行视频转码的情况下,会再利用视频在播放几日后的数据(如视频播放量、转发量、点赞量等)结合播放特征决策模型,确定视频转码决策结果。由于视频所处阶段的不同导致可用的数据不同,两个模型以及一个决策策略对视频转码的及时性依次递减而对于视频转码的准确性依次递增,通过两个模型以及一个决策策略顺序执行,对视频是否转码进行决策,既能够实现转码的及时性,也能够实现转码的准确性,使得可以及时有效的进行视频转码,实现收益与成本差值最大化。The video processing method provided by the embodiments of this application uses machine learning and statistical methods to implement a transcoding decision-making scheme consisting of two models and a decision-making strategy sequence, achieving timely and effective transcoding decisions for videos. Specifically, before the video is played, the multi-dimensional data of the user to which the video belongs (such as the number of fans, the number of forwards, the number of likes, etc.) and the video information (such as the proportion of video playback volume exceeding 10,000, etc.) are used, combined with the first machine Learning model (i.e. object feature decision-making model), makes a video transcoding decision in advance to trigger transcoding; and when the video transcoding decision of the first machine learning model is not to transcode, the video is played and the video is played at the preset time Within (such as within 48 hours), use real-time popularity data (such as playback volume on video clips, etc.) combined with the preset transcoding decision strategy to make transcoding decisions; and no video transcoding is performed through this preset transcoding decision strategy. In this case, the data of a few days after the video is played (such as the number of video views, reposts, likes, etc.) combined with the playback feature decision model will be used to determine the video transcoding decision result. Due to the different stages of the video, the available data is different. The timeliness of video transcoding of the two models and a decision strategy decreases in sequence, while the accuracy of video transcoding increases in sequence. The two models and a decision strategy are executed sequentially. , making a decision on whether to transcode the video can not only achieve the timeliness of transcoding, but also achieve the accuracy of transcoding, so that the video can be transcoded in a timely and effective manner to maximize the difference between revenue and cost.
参见图2,图2示出了根据本申请一实施例提供的一种视频处理方法的流程图,具体包括以下步骤:Referring to Figure 2, Figure 2 shows a flow chart of a video processing method according to an embodiment of the present application, which specifically includes the following steps:
步骤202:在目标视频未播放的情况下,将所述目标视频对应的目标对象的对象特征,输入对象特征决策模型,获得第一视频决策结果。Step 202: When the target video is not played, input the object characteristics of the target object corresponding to the target video into the object characteristic decision model to obtain the first video decision result.
其中,目标视频可以理解为上述的待播放的视频,可以为任意类型、任意时长、任意格式的视频,例如体育视频、娱乐视频、时长为两小时的电影等。The target video can be understood as the above-mentioned video to be played, which can be any type, any length, any format of video, such as sports videos, entertainment videos, two-hour movies, etc.
目标视频对应的目标对象,可以理解为目标视频的上传者;目标对象的对象特征,可以理解为对目标对象的对象属性信息进行数据处理后形成的对象特征,其中,对象属性信息包括但不限于粉丝数、转发量、点赞量等。The target object corresponding to the target video can be understood as the uploader of the target video; the object characteristics of the target object can be understood as the object characteristics formed after data processing of the object attribute information of the target object, where the object attribute information includes but is not limited to Number of fans, number of retweets, number of likes, etc.
实际应用中,会存在一些对象属性信息无法直接使用,例如视频分区仅有一个分区号,该分区号本身没有任何意义,但是该视频分区本身会是属于热门分区或者冷门分区;若直接采用分区号作为对象特征,该视频分区就没有任何意义,因此,对于该视频分区会进行一些数据处理,为该视频分区配置一个得分,用于表示该视频分区为热门分区或者冷门分区,从而形成一个有实际意义的对象特征。In actual applications, there will be some object attribute information that cannot be used directly. For example, a video partition has only one partition number. The partition number itself has no meaning, but the video partition itself will be a popular partition or an unpopular partition; if the partition number is used directly As an object feature, the video partition has no meaning. Therefore, some data processing will be performed on the video partition, and a score is configured for the video partition to indicate that the video partition is a popular partition or an unpopular partition, thus forming a realistic Object characteristics of meaning.
因此,在获取目标对象的对象属性信息之后,会对该对象属性信息进行数据处理,以确定该目标对象的对象特征,后续可以根据该对象特征结合对象特征决策模型,快速且准确的获得第一视频决策结果。具体实现方式如下所述:Therefore, after obtaining the object attribute information of the target object, the object attribute information will be data processed to determine the object characteristics of the target object. Subsequently, the object characteristics can be combined with the object characteristics decision-making model to quickly and accurately obtain the first Video decision results. The specific implementation method is as follows:
所述将所述目标视频对应的目标对象的对象特征、输入对象特征决策模型,获得第一视频决策结果,包括:The method of inputting the object characteristics of the target object corresponding to the target video and the object characteristics decision-making model to obtain the first video decision-making result includes:
获取所述目标视频对应的目标对象的对象属性信息;Obtain object attribute information of the target object corresponding to the target video;
对所述对象属性信息进行数据处理,获得所述目标对象的对象特征;Perform data processing on the object attribute information to obtain the object characteristics of the target object;
将所述目标对象的对象特征输入对象特征决策模型,获得第一视频决策结果。The object characteristics of the target object are input into the object characteristics decision model to obtain the first video decision result.
其中,目标对象的对象属性信息的详细介绍可以参见上述实施例,在此不再赘述;对象特征决策模型包括但不限于XGBoost模型。The detailed introduction of the object attribute information of the target object can be found in the above embodiments and will not be described again here; the object feature decision-making model includes but is not limited to the XGBoost model.
而对所述对象属性信息进行数据处理,获得所述目标对象的对象特征;可以理解为某些对象属性信息直接作为对象特征使用的话,使用效果不明显,如上述的视频分区的分区号等,那么就可以对视频分区这个对象属性信息进行加工和处理,如为视频分区设置可以区分冷热情况的度量值,使得该视频分区这个对象属性信息变为有意义的对象特征。And perform data processing on the object attribute information to obtain the object characteristics of the target object; it can be understood that if some object attribute information is used directly as object characteristics, the use effect is not obvious, such as the partition number of the above-mentioned video partition, etc. Then the object attribute information of the video partition can be processed and processed, such as setting a metric value for the video partition that can distinguish hot and cold conditions, so that the object attribute information of the video partition becomes a meaningful object feature.
具体使用时,将目标对象的对象特征输入预先训练好的对象特征决策模型,获得该目标视频的第一视频决策结果;而实际应用中,该视频处理方法的具体应用场景不同,第一视频决策结果也就不同,例如视频处理方法应用于视频转码场景的话,该第一视频决策结果就可以为视频转码或视频不转码;该视频处理方法应用于视频快进场景的话,该第一视频决策结果就可以为视频快进或者视频不快进等。When used specifically, the object characteristics of the target object are input into the pre-trained object characteristic decision model to obtain the first video decision result of the target video; in actual applications, the specific application scenarios of this video processing method are different, and the first video decision The results will be different. For example, if the video processing method is applied to the video transcoding scenario, the first video decision result can be video transcoding or the video is not transcoded; if the video processing method is applied to the video fast-forwarding scenario, the first video decision result can be The video decision result can be fast forwarding of the video or not fast forwarding of the video.
为了便于理解,以下实施例均以该视频处理方法应用于视频转码场景为例进行介绍,但是并不能限定该视频处理方法可以应用于其他可实现场景,例如上述介绍的视频快进场景等。For ease of understanding, the following embodiments take the video processing method being applied to a video transcoding scenario as an example. However, this does not limit the video processing method to other achievable scenarios, such as the video fast-forward scenario introduced above.
此外,在使用对象特征决策模型对视频是否转码进行决策之前,需要预先训练获得对象特征决策模型,以保证后续应用的视频转码决策的快速以及准确性。具体实现方式如下所述:In addition, before using the object feature decision model to decide whether to transcode a video, the object feature decision model needs to be pre-trained to ensure the speed and accuracy of subsequent video transcoding decisions. The specific implementation method is as follows:
所述对象特征决策模型的训练步骤如下:The training steps of the object feature decision-making model are as follows:
所述对象特征决策模型的训练步骤如下:The training steps of the object feature decision-making model are as follows:
获取样本视频,确定每个样本视频对应的样本对象、以及视频播放量;Obtain sample videos, determine the sample objects corresponding to each sample video, and the video playback volume;
根据所述样本对象的对象属性信息确定训练样本;Determine the training sample according to the object attribute information of the sample object;
根据所述视频播放量确定所述训练样本对应的样本标签;Determine the sample label corresponding to the training sample according to the video playback volume;
根据所述训练样本以及所述样本标签训练所述对象特征决策模型。The object feature decision model is trained according to the training samples and the sample labels.
其中,样本视频可以理解为历史已播放过的任意类型、任意播放时长、任意格式的多个视频;样本视频的样本对象,可以理解为样本视频的上传者;样本视频的视频播放量,可以理解为该样本视频被播放了多少次,即被观看了多少次;样本对象的对象属性信息与上述实施例中目标对象的对象属性信息相同,可以理解为粉丝数、转发量、点赞量等。Among them, the sample video can be understood as multiple videos of any type, any playing time, and any format that have been played in history; the sample object of the sample video can be understood as the uploader of the sample video; the video playback volume of the sample video can be understood The number of times the sample video has been played, that is, the number of times it has been viewed; the object attribute information of the sample object is the same as the object attribute information of the target object in the above embodiment, and can be understood as the number of fans, the number of forwards, the number of likes, etc.
具体实施时,首先获取多个样本视频,再确定每个样本视频对应的样本对象、视频播放量;根据样本对象的对象属性信息确定训练样本,根据视频播放量确定每个训练样本对应的样本标签;再根据训练样本和训练标签训练该对象特征决策模型。During the specific implementation, multiple sample videos are first obtained, and then the sample object and video playback volume corresponding to each sample video are determined; the training sample is determined based on the object attribute information of the sample object, and the sample label corresponding to each training sample is determined based on the video playback volume. ; Then train the object feature decision-making model based on the training samples and training labels.
其中,根据视频播放量确定训练样本对应的样本标签,可以理解为视频播放量大于等于预设播放量阈值(如500个)的情况下,设置该样本标签为1,确定与该样本标签对应的训练样本为正样本;视频播放量小于该预设播放量阈值的情况下,设置该样本标签为0,确定与该样本标签对应的训练样本为负样本。Among them, the sample label corresponding to the training sample is determined based on the video playback volume. It can be understood that when the video playback volume is greater than or equal to the preset playback volume threshold (such as 500), the sample label is set to 1, and the sample label corresponding to the sample label is determined. The training sample is a positive sample; when the video playback volume is less than the preset playback volume threshold, the sample label is set to 0, and the training sample corresponding to the sample label is determined to be a negative sample.
例如,某个样本视频对应的视频播放量为1000个,那么在预设播放量阈值为500的情况下,则可以确定该样本视频对应的样本对象的对象属性信息为训练样本、以该样本视频对应的视频播放量,为该训练样本确定的样本标签为1,即表示该训练样本为正样本。For example, if the video playback volume corresponding to a certain sample video is 1,000, then when the preset playback volume threshold is 500, it can be determined that the object attribute information of the sample object corresponding to the sample video is a training sample. For the corresponding video playback volume, the sample label determined for this training sample is 1, which means that the training sample is a positive sample.
而实际应用中,样本对象的对象属性信息中可能会存在一些无效的信息,为了提高对象特征决策模型的训练效果,会对样本对象的对象属性信息进行数据处理,实现特征构建;以使得后续可以基于构建的较为合理的对象特征作为训练样本,实现对对象特征决策模型的训练,提高其模型准确性。具体实现方式如下所述:In actual applications, there may be some invalid information in the object attribute information of the sample object. In order to improve the training effect of the object feature decision-making model, the object attribute information of the sample object will be data processed to achieve feature construction; so that subsequent Based on the constructed more reasonable object features as training samples, the object feature decision-making model is trained and the accuracy of the model is improved. The specific implementation method is as follows:
所述根据所述样本对象的对象属性信息确定训练样本,包括:Determining the training sample based on the object attribute information of the sample object includes:
对所述样本对象的对象属性信息进行数据处理,获得所述样本对象的对象特征;Perform data processing on the object attribute information of the sample object to obtain the object characteristics of the sample object;
将所述样本对象的对象特征确定为训练样本。The object characteristics of the sample object are determined as training samples.
其中,对样本对象的属性信息进行数据处理,获得样本对象的对象特征的具体实现方式,可以参见上述实施例的详细介绍,在此不再赘述。The specific implementation method of performing data processing on the attribute information of the sample object and obtaining the object characteristics of the sample object can be found in the detailed introduction of the above embodiments, and will not be described again here.
具体的,在获取样本对象的对象属性信息之后,再对样本对象的属性信息进行数据处理,获得样本对象的对象特征;后续可以将该样本对象的对象特征作为训练样本,再结合根据视频播放量确定的该训练样本的样本标签,实现对对象特征决策模型的训练,以提高该对象特征决策模型的使用效果。Specifically, after obtaining the object attribute information of the sample object, data processing is performed on the attribute information of the sample object to obtain the object characteristics of the sample object; subsequently, the object characteristics of the sample object can be used as a training sample, and then combined with the video playback volume according to the The sample label of the training sample is determined to implement the training of the object feature decision-making model, so as to improve the use effect of the object feature decision-making model.
而在使用对象特征决策模型之前,若该目标视频对应的目标对象历史上传的视频播放量都比较高,那么该目标视频上传后,会被大量播放的概率就会很大,因此在目标视频未播放之前,可以先根据该目标视频对应的目标对象的历史视频数据,结合当前其他视频播放情况,来确定视频是否需要进行转码,以避免目标视频上线后即会被大量播放的情况下,造成的转码不及时,影响观看体验的情况发生。Before using the object feature decision-making model, if the target video corresponding to the target object has a relatively high playback volume in history, then the target video will have a high probability of being played in large numbers after it is uploaded. Therefore, the target video will not be played until the target video is uploaded. Before playing, you can first determine whether the video needs to be transcoded based on the historical video data of the target object corresponding to the target video, combined with the current playback status of other videos, to avoid the situation where the target video will be played in large numbers immediately after it goes online. The transcoding is not timely, which affects the viewing experience.
例如,从上述的训练样本中,确定出正样本视频,然后确定正样本视频的对象在某个特征下的历史数据,确定出该特征下的特征阈值;具体使用时,可以获取该目标视频的目标对象的该特征,将该特征与正样本下获取的特征阈值进行比较,以确定该目标视频是否需要进行视频转码。具体的,该特征阈值的具体获取方式如下所述:For example, from the above training samples, determine the positive sample video, then determine the historical data of the object of the positive sample video under a certain feature, and determine the feature threshold under the feature; for specific use, you can obtain the target video This feature of the target object is compared with the feature threshold obtained under the positive sample to determine whether the target video requires video transcoding. Specifically, the specific acquisition method of the feature threshold is as follows:
所述根据所述视频播放量确定所述训练样本对应的样本标签之后,还包括:After determining the sample label corresponding to the training sample according to the video playback volume, the method further includes:
根据所述样本标签,确定所述样本视频中的正样本视频;Determine the positive sample video in the sample video according to the sample label;
确定所述正样本视频对应的正样本对象,并根据所述正样本对象的历史视频数据确定目标特征;Determine the positive sample object corresponding to the positive sample video, and determine the target characteristics according to the historical video data of the positive sample object;
根据所述目标特征确定对应的特征阈值。The corresponding feature threshold is determined according to the target feature.
其中,目标特征可以为任意特征,例如视频点赞量过万占比或者视频播放量过万占比等;在目标特征为视频点赞量过万占比的情况下,根据所述正样本对象的历史视频数据确定目标特征,可以理解为,获取该正样本对象历史上传的所有视频中每个视频的点赞量,根据每个视频的点赞量确定该正样本对象的所有视频点赞量过万的视频占比,即视频点赞量过万占比;在目标特征为视频播放量过万占比的情况下,根据所述正样本对象的历史视频数据确定目标特征,可以理解为,获取该正样本对象历史上传的所有视频中每个视频的播放量,根据每个视频的播放量确定该正样本对象的所有视频播放量过万的视频占比,即视频播放量过万占比。Among them, the target feature can be any feature, such as the proportion of videos with more than 10,000 likes or the proportion of videos with more than 10,000 views; when the target feature is the proportion of videos with more than 10,000 likes, according to the positive sample object Determining the target characteristics of the historical video data can be understood as obtaining the number of likes for each video in all the videos uploaded by the positive sample object in the past, and determining the number of likes for all videos of the positive sample object based on the number of likes for each video. The proportion of videos with more than 10,000 likes, that is, the proportion of videos with more than 10,000 likes; when the target feature is the proportion of videos with more than 10,000 views, the target feature is determined based on the historical video data of the positive sample object, which can be understood as, Obtain the playback volume of each video among all the videos uploaded by the positive sample object in history, and determine the proportion of all videos of the positive sample object that have a playback volume of more than 10,000 based on the playback volume of each video, that is, the proportion of videos with a playback volume of more than 10,000 .
具体的,以目标特征为视频播放量过万占比为例,根据所述目标特征确定对应的特征阈值,可以理解为,获取所有正样本对象的视频播放量过万的占比,确定其均值、最小值、最大值等统计量;训练各统计量的权重,最后各统计量加权求和得到最终阈值(即特征阈值)。实际应用中,对权重的训练,是对权重的参数组合进行了遍历,在测试集上进行测试最终得到的一组权重值,比如,要训练最小值和均值的权重,假设步长选0.1,那么参数组合就有0.1、0.9;0.2、0.8;0.3、0.7等。Specifically, taking the target feature as the proportion of video playback volume exceeding 10,000 as an example, determining the corresponding feature threshold based on the target feature can be understood as obtaining the proportion of video playback volume exceeding 10,000 for all positive sample objects, and determining its mean value. , minimum value, maximum value and other statistics; train the weight of each statistic, and finally the weighted sum of each statistic obtains the final threshold (i.e., feature threshold). In practical applications, the training of weights involves traversing the parameter combinations of weights and testing the final set of weight values on the test set. For example, to train the weights of the minimum and mean values, assume that the step size is 0.1. Then the parameter combinations include 0.1, 0.9; 0.2, 0.8; 0.3, 0.7, etc.
本说明书实施例中,获取当前已知转码的视频的上传者历史所有视频中视频播放量过万的占比,或者历史所有视频中视频点赞量过万的占比;后续根据每个上传者视频播放量过万的占比或者每个上传者视频点赞量过万的占比,计算出对应的特征阈值;后续在判断目标视频是否转码时,可以先根据该目标视频对应的上传者的视频播放量过万的占比或者 视频点赞量过万的占比,与其对应的特征阈值的比对,快速的确定是否需要对目标视频进行转码。具体实现方式如下所述:In the embodiment of this specification, the uploader of currently known transcoded videos obtains the proportion of videos with more than 10,000 views among all historical videos, or the proportion of videos with more than 10,000 likes among all historical videos; subsequently, based on each upload The proportion of each uploader's video playback volume exceeding 10,000 or the proportion of each uploader's video's likes volume exceeding 10,000 is calculated to calculate the corresponding feature threshold; when later determining whether the target video is transcoded, the target video can be first uploaded based on the corresponding By comparing the proportion of video views with over 10,000 views or the proportion of videos with over 10,000 likes and their corresponding feature thresholds, you can quickly determine whether the target video needs to be transcoded. The specific implementation method is as follows:
所述将所述目标对象的对象特征输入对象特征决策模型,获得第一视频决策结果之前,还包括:Before inputting the object characteristics of the target object into the object characteristic decision-making model and obtaining the first video decision-making result, the method further includes:
确定所述目标视频对应的目标对象的目标特征,以及所述目标特征的特征值;Determine the target feature of the target object corresponding to the target video, and the characteristic value of the target feature;
根据所述目标特征的特征值、与所述特征阈值的关联关系,获得第四视频决策结果;Obtain a fourth video decision result according to the correlation between the characteristic value of the target characteristic and the characteristic threshold;
在所述第四视频决策结果满足决策条件的情况下,根据所述第四视频决策结果,对所述目标视频进行视频处理。When the fourth video decision result satisfies the decision condition, video processing is performed on the target video according to the fourth video decision result.
其中,目标对象的目标特征与上述进行特征阈值获取的目标特征相同,例如上述获取的为视频播放量过万占比的特征阈值,则该目标特征则为视频播放量过万占比;且目标特征的特征值则为具体的占比比值。Among them, the target feature of the target object is the same as the target feature obtained by obtaining the feature threshold. For example, the feature threshold obtained above is the proportion of video playback volume exceeding 10,000, then the target feature is the proportion of video playback volume exceeding 10,000; and the target The characteristic value of a feature is a specific proportion value.
具体的,在目标视频未播放的情况下,获取该目标视频对应的目标对象的目标特征以及该目标特征的特征值,即视频播放量过万占比以及占比比值;将该视频量过万占比的占比比值与上述获得的特征阈值进行比对,根据具体的比对结果获得第四视频决策结果,即视频转码或不转码;最后在确定第四视频决策结果为转码的情况下,确定该第四视频决策结果满足决策条件;此时,则可以根据该第四视频决策结果对该目标视频进行转码。Specifically, when the target video is not played, the target feature of the target object corresponding to the target video and the characteristic value of the target feature are obtained, that is, the proportion and proportion of the video playback volume exceeding 10,000; The proportion of the proportion is compared with the characteristic threshold obtained above, and the fourth video decision result is obtained based on the specific comparison result, that is, the video is transcoded or not transcoded; finally, it is determined that the fourth video decision result is transcoded. In this case, it is determined that the fourth video decision result satisfies the decision condition; at this time, the target video can be transcoded according to the fourth video decision result.
实际应用中,根据所述目标特征的特征值、与所述特征阈值的关联关系,获得第四视频决策结果,可以理解为,将目标特征的特征值、与特征阈值进行比对,在目标特征的特征值大于等于特征阈值的情况下,确定第四视频决策结果为视频转码;在目标特征的特征值小于特征阈值的情况下,确定第四视频决策结果为视频不转码。In practical applications, the fourth video decision result is obtained based on the correlation between the characteristic value of the target feature and the characteristic threshold. It can be understood that the characteristic value of the target feature is compared with the characteristic threshold, and the target feature is If the feature value of is greater than or equal to the feature threshold, the fourth video decision result is determined to be video transcoding; if the feature value of the target feature is less than the feature threshold, the fourth video decision result is determined to be video non-transcoding.
例如,特征阈值为70%,该视频量过万占比的占比比值为75%,将该视频量过万占比的占比比值75%与上述获得的特征阈值70%进行比对,则可以确定该视频量过万占比的占比比值大于特征阈值,此时,则可以确定第四视频决策结果为视频转码。For example, if the feature threshold is 70%, the proportion of videos with more than 10,000 videos is 75%, and the 75% proportion of videos with more than 10,000 videos is compared with the feature threshold of 70% obtained above, then It can be determined that the proportion of the video that exceeds 10,000 is greater than the feature threshold. At this time, it can be determined that the fourth video decision result is video transcoding.
本说明书实施例中,为了保证对目标视频转码的及时性,在目标视频转码之前,可以根据该目标视频对应的目标对象的目标特征、与根据历史转码视频的目标特征计算出的特征阈值进行比对,快速的对目标视频是否转码进行决策,以实现在目标对象的历史视频播放量过万占比较大的情况下,默认该目标对象上传的该目标视频后续会被大量播放的概率较大,从而可以直接进行转码播放,提高其转码及时性以及后续的视频播放收益。In the embodiment of this specification, in order to ensure the timeliness of transcoding the target video, before transcoding the target video, features calculated based on the target characteristics of the target object corresponding to the target video and the target characteristics of historical transcoded videos can be used Compare the threshold and quickly decide whether to transcode the target video, so that when the target object's historical video playback volume exceeds 10,000 and accounts for a large proportion, the target video uploaded by the target object will be played in large quantities by default. The probability is relatively high, so transcoding and playback can be performed directly, improving the timeliness of transcoding and subsequent video playback revenue.
步骤204:在所述第一视频决策结果不满足决策条件的情况下,播放所述目标视频。Step 204: If the first video decision result does not meet the decision condition, play the target video.
具体的,本说明书实施例提供的视频处理方法的具体应用场景不同,第一视频决策结果不同,判断第一视频决策结果是否满足决策条件的内容也不同;例如,视频处理方法应用于视频转码场景中,第一视频决策结果即可以理解为上述实施例介绍的视频转码或者视频不转码,而对应的视频决策条件则可以理解为视频转码条件;若视频处理方法应用于视频推荐场景中,第一视频决策结果即可以理解为视频推荐或者视频不推荐,而对应的视频决策条件则可以理解为视频推荐条件等。Specifically, the specific application scenarios of the video processing method provided by the embodiments of this specification are different, the first video decision result is different, and the content of judging whether the first video decision result meets the decision condition is also different; for example, the video processing method is applied to video transcoding In the scenario, the first video decision result can be understood as video transcoding or video non-transcoding introduced in the above embodiment, and the corresponding video decision conditions can be understood as video transcoding conditions; if the video processing method is applied to the video recommendation scenario , the first video decision result can be understood as video recommendation or video non-recommendation, and the corresponding video decision conditions can be understood as video recommendation conditions, etc.
那么,在第一视频决策结果为视频不转码的情况下,则可以确定该第一视频决策结果不满足该决策条件;此时,则在不转码的情况下,播放该目标视频的原始视频数据。Then, when the first video decision result is that the video is not transcoded, it can be determined that the first video decision result does not meet the decision condition; at this time, the original version of the target video is played without transcoding. video data.
而在第一视频决策结果为视频转码的情况下,则可以确定该第一视频决策结果满足该决策条件;此时,则直接对该目标视频进行转码并播放转码后的目标视频。When the first video decision result is video transcoding, it can be determined that the first video decision result satisfies the decision condition; at this time, the target video is directly transcoded and the transcoded target video is played.
步骤206:在目标播放时间段内,根据预设视频处理策略确定第二视频决策结果。Step 206: Within the target playback time period, determine the second video decision result according to the preset video processing strategy.
其中,目标播放时间段可以根据实际应用进行设置,本申请实施例对此不做任何限定;例如目标播放时间段设置为48小时或者50小时等。The target playback time period can be set according to the actual application, and the embodiment of the present application does not impose any limitation on this; for example, the target playback time period is set to 48 hours or 50 hours, etc.
并且,预设视频处理策略也可以根据实际应用进行设置,例如可以对视频进行分片,根据分片视频的播放量确定是否需要对视频进行转码;也可以根据该目标播放时间段内所有播放视频的整体播放量或者点赞量,确定是否需要对视频进行转码。Moreover, the preset video processing strategy can also be set according to the actual application. For example, the video can be divided into segments, and whether the video needs to be transcoded is determined based on the playback volume of the segmented video; it can also be based on all plays within the target playback time period. The overall number of views or likes of the video determines whether the video needs to be transcoded.
本申请实施例中,以对视频进行分片,根据分片视频的播放量确定是否需要对视频进行转码,作为预设视频处理策略,对在目标播放时间段内,根据预设视频处理策略确定第二视频决策结果进行详细介绍。具体实现方式如下所述:In the embodiment of this application, the video is divided into segments, and whether the video needs to be transcoded is determined based on the playback volume of the segmented video as a preset video processing strategy. Within the target playback time period, the preset video processing strategy is used to determine whether the video needs to be transcoded. Determine the decision-making results of the second video and introduce them in detail. The specific implementation method is as follows:
所述根据预设视频处理策略确定第二视频决策结果,包括:Determining the second video decision result according to the preset video processing strategy includes:
根据预设划分规则获取至少两个视频片段,并根据所述至少两个视频片段的播放量,确定第二视频决策结果。At least two video clips are obtained according to the preset division rules, and the second video decision result is determined based on the playback volume of the at least two video clips.
其中,预设划分规则可以根据实际应用进行设置,本申请实施例再次不做任何限定。例如预设划分规则为每三分钟划分一个视频片段、或者每五分钟划分一个视频片段等。Among them, the preset division rules can be set according to actual applications, and the embodiments of this application again do not impose any limitations. For example, the preset division rule is to divide a video clip every three minutes, or divide a video clip every five minutes, etc.
为了便于理解,以下实施例均以预设划分规则为每三分钟划分一个视频片段为例进行具体介绍。For ease of understanding, the following embodiments take the preset dividing rule of dividing a video segment every three minutes as an example for detailed introduction.
具体实施时,从目标视频开始播放,每三分钟划分一个视频片段,在划分出至少两个视频片段的情况下,根据划分出的至少两个视频片段的播放量,确定第二视频决策结果。In specific implementation, starting from the target video, one video segment is divided every three minutes. When at least two video segments are divided, the second video decision result is determined based on the playback volume of the at least two divided video segments.
本申请实施例提供的视频处理方法,在目标视频开始播放的情况下,可以根据预设划分规则获取至少两个视频片段,后续可以根据划分出的至少两个视频片段的播放量,快速确定第二视频决策结果,以保证对目标视频的转码及时性。The video processing method provided by the embodiment of the present application can obtain at least two video clips according to the preset division rules when the target video starts to be played. Subsequently, the third video clip can be quickly determined based on the playback volume of the divided at least two video clips. The second video decision result is used to ensure the timely transcoding of the target video.
而在划分出至少两个视频片段之后,根据划分出的至少两个视频片段的播放量,确定第二视频决策结果的具体实现方式包括至少两种,一种可以将两个相邻的视频片段的播放量进行比对,通过播放量的增长情况,快速确定第二视频决策结果。具体实现方式如下所述:After dividing at least two video clips, specific implementation methods for determining the second video decision result include at least two methods according to the playback volume of the divided at least two video clips. One method can combine two adjacent video clips. Compare the playback volume, and quickly determine the decision-making result of the second video based on the growth of playback volume. The specific implementation method is as follows:
所述根据所述至少两个视频片段的播放量,确定第二视频决策结果,包括:Determining the second video decision result based on the playback volume of the at least two video clips includes:
确定所述至少两个视频片段中任意两个相邻视频片段的播放量差值;Determine the difference in playback volume of any two adjacent video clips among the at least two video clips;
根据所述播放量差值与差值阈值的关联关系,确定第二视频决策结果。The second video decision result is determined according to the correlation between the playback amount difference and the difference threshold.
其中,差值阈值可以根据实际应用进行设置,例如差值阈值为500或者1000等。The difference threshold can be set according to the actual application, for example, the difference threshold is 500 or 1000, etc.
若至少两个视频片段包括视频片段1、视频片段2、视频片段3,则任意两个相邻视频片段可以理解为视频片段1和视频片段2、或者视频片段2和视频片段3。If at least two video segments include video segment 1, video segment 2, and video segment 3, any two adjacent video segments may be understood as video segment 1 and video segment 2, or video segment 2 and video segment 3.
那么在确定任意两个相邻视频片段之后,计算任意两个相邻视频片段的播放量差值;例如任意两个相邻视频片段包括视频片段1和视频片段2,其中,视频片段1的播放量为100,视频片段2的播放量为1100,那么该视频片段1和视频片段2的播放量差值为1000;最后根据该播放量差值与预设的差值阈值之间的关联关系,快速确定第二视频决策结果,以保证视频转码的及时性。Then after determining any two adjacent video clips, calculate the difference in playback volume of any two adjacent video clips; for example, any two adjacent video clips include video clip 1 and video clip 2, where the playback volume of video clip 1 The playback volume of video clip 2 is 100, and the playback volume of video clip 2 is 1100, then the playback volume difference between video clip 1 and video clip 2 is 1000; finally, according to the correlation between the playback volume difference and the preset difference threshold, Quickly determine the second video decision result to ensure the timeliness of video transcoding.
具体实施时,所述根据所述播放量差值与差值阈值的关联关系,确定第二视频决策结果,包括:During specific implementation, determining the second video decision result based on the correlation between the playback amount difference and the difference threshold includes:
在所述播放量差值大于等于差值阈值的情况下,确定第二视频决策结果为视频转码;或者If the playback amount difference is greater than or equal to the difference threshold, determine that the second video decision result is video transcoding; or
在所述播放量差值小于所述差值阈值的情况下,确定第二视频决策结果为视频不转码。If the playback amount difference is less than the difference threshold, it is determined that the second video decision result is that the video is not transcoded.
沿用上例,以播放量差值为1000,差值阈值为1000为例,可以确定该播放量差值1000等于差值阈值1000,则可以确定该第二视频决策结果为视频转码;而若播放量差值为900,差值阈值为1000的情况下,则可以确定该播放量差值900小于差值阈值1000,则可以确定该第二视频决策结果为视频不转码。Following the above example, taking the play volume difference as 1000 and the difference threshold as 1000, it can be determined that the play volume difference of 1000 is equal to the difference threshold of 1000, then it can be determined that the second video decision result is video transcoding; and if When the difference in playback volume is 900 and the difference threshold is 1000, it can be determined that the playback volume difference 900 is less than the difference threshold 1000, and it can be determined that the second video decision result is that the video is not transcoded.
实际应用中,可以在目标视频开始播放,即每三分钟分割一个视频片段,并获取该视频片段的当前播放量,在分割出第二个视频片段,并获取该视频片段的当前播放量之后,若确定该第二个视频片段相较于第一个视频片段的增长幅度较大的情况下,则可以对该目标视频进行视频转码;以此类推,即可以做到实时播放及时进行视频转码判断。In practical applications, you can start playing the target video, that is, split a video clip every three minutes and obtain the current playback volume of the video clip. After dividing the second video clip and obtaining the current playback volume of the video clip, If it is determined that the growth rate of the second video clip is larger than that of the first video clip, the target video can be video transcoded; and by analogy, real-time playback and timely video transcoding can be achieved. code judgment.
本申请实施例提供的视频处理方法中,可以根据目标视频播放过程中,任意两个相邻的视频片段的播放量差值与差值阈值之间的关联关系,快速且准确的确定第二视频决策结果;即在后一个视频片段的播放量相较于前一个视频片段的播放量有较大幅度的增长的情况下,可以确定该目标视频被大量播放的概率较高,此时,则可以对该目标视频进行视频转码。In the video processing method provided by the embodiment of the present application, the second video can be quickly and accurately determined based on the correlation between the playback volume difference of any two adjacent video clips and the difference threshold during the playback of the target video. Decision result; that is, when the playback volume of the latter video clip has increased significantly compared with the playback volume of the previous video clip, it can be determined that the probability of the target video being played in large quantities is high. At this time, you can Video transcode the target video.
另一种,也可以将连续的预设数量的视频片段的播放量与计算的热度阈值进行比对,通过播放量与热度阈值的关系,快速确定第二视频决策结果。具体实现方式如下所述:Alternatively, the playback amount of a continuous preset number of video clips can also be compared with the calculated popularity threshold, and the second video decision result can be quickly determined based on the relationship between the playback amount and the popularity threshold. The specific implementation method is as follows:
所述根据所述至少两个视频片段的播放量,确定第二视频决策结果,包括:Determining the second video decision result based on the playback volume of the at least two video clips includes:
确定所述至少两个视频片段中每个视频片段的播放量;Determining the amount of playback of each of the at least two video clips;
根据所述每个视频片段的播放量,确定所述至少两个视频片段的热度阈值;Determine the popularity threshold of the at least two video clips based on the playback volume of each video clip;
根据所述至少两个视频片段中每个视频片段的播放量、以及所述热度阈值,确定第二视频决策结果。The second video decision result is determined according to the play amount of each video segment in the at least two video segments and the popularity threshold.
其中,本申请实施例的至少两个视频片段可以理解为,目标播放时间段内根据预设划分规则划分的所有的视频片段。The at least two video clips in this embodiment of the present application can be understood as all video clips divided according to the preset division rules within the target playback time period.
那么在获取每个视频片段的播放量之后,则可以根据所有视频片段的播放量,计算出针对该目标播放时间段的热度阈值;具体的,该热度阈值的计算方式与上述特征阈值的计算方式相同,在此不再赘述。例如获取该目标播放时间段内视频片段的播放量的最小值、均值等,按照上述方式进行计算,获得最终的热度阈值。Then after obtaining the playback volume of each video clip, the popularity threshold for the target playback time period can be calculated based on the playback volume of all video clips; specifically, the calculation method of the popularity threshold is the same as the calculation method of the above characteristic threshold. are the same and will not be repeated here. For example, obtain the minimum value, average value, etc. of the playback volume of the video clip within the target playback time period, and perform calculations in the above manner to obtain the final popularity threshold.
而在根据每个视频片段的播放量,确定至少两个视频片段的热度阈值之后,则可以根据该至少两个视频片段的播放量,与热度阈值,快速的确定第二视频决策结果。具体实现方式如下所述:After determining the popularity thresholds of at least two video clips based on the playback volume of each video clip, the second video decision result can be quickly determined based on the playback volume of the at least two video clips and the popularity threshold. The specific implementation method is as follows:
所述根据所述至少两个视频片段中每个视频片段的播放量、以及所述热度阈值,确定第二视频决策结果,包括:Determining the second video decision result based on the play amount of each video segment in the at least two video segments and the popularity threshold includes:
从所述至少两个视频片段中、获取预设数量的连续视频片段;Obtain a preset number of consecutive video segments from the at least two video segments;
确定所述连续视频片段中每个视频片段的播放量;Determine the playback amount of each video segment in the continuous video segments;
根据所述连续视频片段中每个视频片段的播放量,以及热度阈值的关联关系,确定第二视频决策结果。The second video decision result is determined based on the play amount of each video segment in the continuous video segments and the correlation between the popularity threshold.
其中,预设数量可以根据实际应用进行设置,例如预设数量可以设置为2、3或4等。Among them, the preset number can be set according to the actual application, for example, the preset number can be set to 2, 3 or 4, etc.
以预设数量为2为例,具体实施时,从至少两个视频片段中获取2个连续的视频片段,并确定这两个连续的视频片段中每个视频片段的播放量;再根据这两个连续的视频片段中每个视频片段的播放量,与热度阈值的关联关系,确定第二视频决策结果。Taking the preset number as 2 as an example, during specific implementation, two consecutive video clips are obtained from at least two video clips, and the playback amount of each video clip in the two consecutive video clips is determined; and then based on these two The correlation between the playback volume of each video clip in the consecutive video clips and the popularity threshold determines the second video decision-making result.
仍沿用上例,两个连续的视频片段包括视频片段1和视频片段2,其中,视频片段1的播放量为100,视频片段2的播放量为1100,热度阈值为800,那么后续则可以根据该视频片段1的播放量100,视频片段2的播放量1100,分别与热度阈值800的关联关系,快速的获得第二视频决策结果。Still using the above example, two consecutive video clips include video clip 1 and video clip 2. Among them, the playback volume of video clip 1 is 100, the playback volume of video clip 2 is 1100, and the popularity threshold is 800. Then the follow-up can be based on The playback volume of video clip 1 is 100, and the playback volume of video clip 2 is 1100. They are respectively associated with the popularity threshold of 800, and the second video decision result is quickly obtained.
其中,根据连续视频片段中每个视频片段的播放量,以及热度阈值,确定第二视频决策结果的具体实现方式如下所述:Among them, the specific implementation method of determining the second video decision result according to the play volume of each video segment in the consecutive video segments and the popularity threshold is as follows:
所述根据所述连续视频片段中每个视频片段的播放量,以及热度阈值的关联关系,确定第二视频决策结果,包括:Determining the second video decision result based on the play amount of each video segment in the continuous video segments and the correlation between the popularity thresholds includes:
在所述连续视频片段中每个视频片段的播放量均大于等于热度阈值的情况下,确定第二视频决策结果为视频转码;或者When the playback volume of each video segment in the continuous video segments is greater than or equal to the popularity threshold, determine that the second video decision result is video transcoding; or
在所述连续视频片段中任意一个视频片段的播放量小于所述热度阈值的情况下,确定第二视频决策结果为视频不转码。When the play amount of any one of the continuous video segments is less than the popularity threshold, it is determined that the second video decision result is that the video is not transcoded.
仍沿用上例,若视频片段1的播放量为1000,视频片段2的播放量为1500,热度阈值为800;Still using the above example, if the playback volume of video clip 1 is 1000, the playback volume of video clip 2 is 1500, and the popularity threshold is 800;
那么,将连续视频片段中每个视频片段的播放量均与热度阈值进行比对,则可以确定连续视频片段中视频片段1的播放量1000、以及视频片段2的播放量1500均大于等于热度阈值800,此时,则可以确定第二视频决策结果为视频转码。而若视频片段1和视频片段2中的任意一个或者全部小于热度阈值800,则可以确定第二视频决策结果为视频不转码。Then, by comparing the playback volume of each video clip in the continuous video clips with the popularity threshold, it can be determined that the playback volume of video clip 1 in the continuous video clips is 1000, and the playback volume of video clip 2 is 1500, both of which are greater than or equal to the popularity threshold. 800, at this time, it can be determined that the second video decision result is video transcoding. And if any one or both of video clip 1 and video clip 2 are less than the popularity threshold 800, it can be determined that the second video decision result is that the video is not transcoded.
步骤208:在所述第二视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理。Step 208: If the second video decision result satisfies the decision condition, perform video processing on the target video.
具体实施时,本申请实施例提供的视频处理方法的具体应用场景不同,其对所述目标视频进行视频处理的处理内容也不同;例如在本申请实施例提供的视频处理方法应用于视频转码场景的情况下,所述在所述第二视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理,包括:During specific implementation, the specific application scenarios of the video processing method provided by the embodiments of the present application are different, and the processing content of the video processing of the target video is also different; for example, the video processing method provided by the embodiments of the present application is applied to video transcoding. In the case of the scene, when the second video decision result satisfies the decision condition, video processing is performed on the target video, including:
在所述第二视频决策结果为视频转码的情况下,确定所述第二视频决策结果满足所述决策条件,并对所述目标视频进行转码处理。When the second video decision result is video transcoding, it is determined that the second video decision result satisfies the decision condition, and the target video is transcoded.
那么在决策条件为视频转码条件的情况下,通过上述方式确定第二视频决策结果之后,若第二视频决策结果为视频转码,则可以确定该第二视频决策结果满足视频转码条件,此时即可对该目标视频进行视频转码。Then when the decision condition is a video transcoding condition, after the second video decision result is determined through the above method, if the second video decision result is video transcoding, it can be determined that the second video decision result satisfies the video transcoding condition, At this point, the target video can be video transcoded.
本申请实施例提供的该视频处理方法,在目标视频未播放之前,通过目标视频对应的目标对象的对象特征,结合预先训练的对象特征决策模型,提前做出视频转码决策;而在该视频转码决策为视频未转码的情况下,在目标视频播放后,通过预设视频处理策略再次进行视频转码决策,以解决对全部目标视频进行转码造成的资源浪费,以及在根据上述策略确定视频要转码的情况下,对目标视频进行有效转码,避免编码不足的情况发生,实现对目标视频的精准转码。The video processing method provided by the embodiment of the present application uses the object characteristics of the target object corresponding to the target video and a pre-trained object characteristic decision model to make a video transcoding decision in advance before the target video is played; and before the video is played, When the transcoding decision is that the video is not transcoded, after the target video is played, the video transcoding decision is made again through the preset video processing strategy to solve the waste of resources caused by transcoding all the target videos, and according to the above strategy When it is determined that the video needs to be transcoded, the target video should be transcoded effectively to avoid insufficient encoding and achieve accurate transcoding of the target video.
而若第二视频决策结果也不满足决策条件的情况下,为了在资源有限的情况下,达到带宽收益与算力、存储成本的差值最大化,在目标视频播放一段时间后,会再根据已播放的目标视频的播放情况,再次判断该目标视频是否具有转码价值,是否需要进行视频转码。具体实现方式如下所述:If the second video decision result does not meet the decision conditions, in order to maximize the difference between bandwidth revenue, computing power, and storage costs under limited resources, after the target video is played for a period of time, the video will be played again based on Based on the playback status of the target video that has been played, determine again whether the target video has transcoding value and whether video transcoding is required. The specific implementation method is as follows:
所述根据预设视频处理策略确定第二视频决策结果之后,还包括:After determining the second video decision result according to the preset video processing strategy, the method further includes:
在所述目标播放时间段结束,且所述第二视频决策结果不满足所述决策条件的情况下,获取预设播放时间内所述目标视频的视频播放特征;When the target playback time period ends and the second video decision result does not meet the decision condition, obtain the video playback characteristics of the target video within the preset playback time;
将所述视频播放特征输入播放特征决策模型,获得第三视频决策结果;Input the video playback features into the playback feature decision model to obtain the third video decision result;
在所述第三视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理。If the third video decision result satisfies the decision condition, perform video processing on the target video.
其中,预设播放时间可以根据时间进行设置,且该预设播放时间大于等于目标播放时间段。例如目标播放时间段为48小时,该预设播放时间则可以为50小时或者60小时等。并且播放特征决策模型为预先训练的机器学习模型,包括但不限于XGBoost模型,具体的训练过程可参见下述对播放特征决策模型训练的详细介绍。Among them, the preset playback time can be set according to time, and the preset playback time is greater than or equal to the target playback time period. For example, the target playback time period is 48 hours, and the preset playback time can be 50 hours or 60 hours. And the playback feature decision-making model is a pre-trained machine learning model, including but not limited to the XGBoost model. For the specific training process, please refer to the detailed introduction to the playback feature decision-making model training below.
以目标播放时间段为48小时,预设播放时间为50小时为例,在所述目标播放时间段结束,且所述第二视频决策结果不满足所述决策条件的情况下,获取预设播放时间内所述目标视频的视频播放特征,可以理解为,在该目标视频播放48小时内,通过上述任意预设视频处理策略获得的第二视频决策结果,仍不满足该决策条件的情况下,继续播放该目标视频,并在该目标视频播放50个小时的情况下,获取该目标视频在播放的这50个小时内的视频播放特征。Taking the target playback time period as 48 hours and the preset playback time as 50 hours as an example, when the target playback time period ends and the second video decision result does not meet the decision-making condition, the preset playback time is obtained. The video playback characteristics of the target video within the time period can be understood as, within 48 hours of playback of the target video, if the second video decision result obtained through any of the above preset video processing strategies still does not meet the decision conditions, Continue to play the target video, and when the target video plays for 50 hours, obtain the video playback characteristics of the target video during the 50 hours of playback.
而为了保证视频播放特征的准确性,以及后续播放特征决策模型的快速识别;该视频播放特征为根据获取的预设播放时间段内该目标视频的视频播放属性信息进行数据处理获得。具体实现方式如下所述:In order to ensure the accuracy of video playback features and the rapid identification of subsequent playback feature decision-making models; the video playback features are obtained through data processing based on the obtained video playback attribute information of the target video within the preset playback time period. The specific implementation method is as follows:
所述获取所述预设播放时间段内所述目标视频的视频播放特征,包括:The obtaining the video playback characteristics of the target video within the preset playback time period includes:
获取所述预设播放时间段内所述目标视频的视频播放属性信息;Obtain video playback attribute information of the target video within the preset playback time period;
对所述视频播放属性信息进行数据处理,获得所述目标视频的视频播放特征。Perform data processing on the video playback attribute information to obtain the video playback characteristics of the target video.
其中,视频播放属性信息包括但不限于目标视频开播后的播放量、转发量、点赞量等。Among them, the video playback attribute information includes but is not limited to the number of views, reposts, likes, etc. after the target video is broadcast.
实际应用中,对视频播放属性信息进行数据处理,获得目标视频的视频播放特征的具体处理方式,与上述对对象属性信息进行数据处理,获得目标对象的对象特征的具体处理方式相同,在此不再赘述。In practical applications, the specific processing method of performing data processing on the video playback attribute information to obtain the video playback characteristics of the target video is the same as the above-mentioned specific processing method of performing data processing on the object attribute information to obtain the object characteristics of the target object, and will not be used here. Again.
具体的,在获得目标视频的视频播放特征之后,则可以将视频播放特征输入播放特征决策模型,获得第三视频决策结果;在第三视频决策结果满足决策条件的情况下,即可对目标视频进行视频处理;例如对视频进行转码处理。Specifically, after obtaining the video playback characteristics of the target video, the video playback characteristics can be input into the playback characteristics decision model to obtain the third video decision result; when the third video decision result satisfies the decision conditions, the target video can be Perform video processing; such as transcoding videos.
实际应用中,由于通过预设视频处理策略以及播放特征决策模型,获得的视频决策结果均是在目标视频播放之后,那么若获得的视频决策结果为视频转码的情况下,为了避免造成视频转码遗漏,在根据视频决策结果对未播放的目标视频进行转码的情况下,也会将在确定视频转码之前已播放的目标视频进行补足转码。In practical applications, due to the preset video processing strategy and playback feature decision model, the video decision results obtained are after the target video is played, so if the video decision results obtained are video transcoding, in order to avoid causing video transcoding Code omission, when the target video that has not been played is transcoded based on the video decision result, the target video that has been played before the video transcoding is determined will also be supplemented and transcoded.
本说明书实施例中,在通过上述的对象特征决策模型,获得的第一视频决策结果、根据预设视频处理策略,获得的第二视频决策结果均不满足视频转码条件的情况下,为了在资源有限的情况下,达到带宽收益与算力、存储成本的差值最大化,在目标视频播放一段时间后,会再根据已播放的目标视频的播放情况,再次判断该目标视频是否具有转码价值,是否需要进行视频转码,以保证可以实现对目标视频的精准及时转码。In the embodiment of this specification, when neither the first video decision result obtained through the above-mentioned object feature decision model nor the second video decision result obtained according to the preset video processing strategy satisfies the video transcoding conditions, in order to When resources are limited, the difference between bandwidth revenue, computing power, and storage costs is maximized. After the target video is played for a period of time, it will be judged again whether the target video has transcoding based on the playback status of the target video that has been played. Value, whether video transcoding is required to ensure accurate and timely transcoding of the target video.
而在使用播放特征决策模型之前,会预先训练该播放特征决策模型,以提高该播放特征决策模型的结果准确性和有效性。具体的播放特征决策模型的训练方式如下所述:Before using the playback feature decision-making model, the playback feature decision-making model will be pre-trained to improve the accuracy and effectiveness of the results of the playback feature decision-making model. The specific training method of the playback feature decision model is as follows:
所述播放特征决策模型的训练步骤如下:The training steps of the playback feature decision model are as follows:
获取样本视频,确定每个样本视频对应的视频播放属性信息;Obtain sample videos and determine the video playback attribute information corresponding to each sample video;
根据所述样本视频对应的视频播放属性信息确定训练样本;Determine the training sample according to the video playback attribute information corresponding to the sample video;
根据所述视频播放属性信息中的视频播放量确定所述训练样本对应的样本标签;Determine the sample label corresponding to the training sample according to the video playback amount in the video playback attribute information;
根据所述训练样本以及所述样本标签训练所述播放特征决策模型。The playback feature decision model is trained according to the training samples and the sample labels.
其中,样本视频、每个样本视频对应的视频播放属性信息的具体介绍可以参见上述实施例。For a detailed introduction to the sample videos and the video playback attribute information corresponding to each sample video, please refer to the above embodiment.
并且,播放特征决策模型训练中,为了提高播放特征决策模型的训练效果,也会对视频播放属性信息进行数据处理,以获得标准的样本视频的视频播放特征,对播放特征决策模型进行训练。具体实现方式如下所述:Moreover, during the training of the playback feature decision model, in order to improve the training effect of the playback feature decision model, the video playback attribute information will also be data processed to obtain the video playback features of standard sample videos, and the playback feature decision model will be trained. The specific implementation method is as follows:
所述根据所述样本视频对应的视频播放属性信息确定训练样本,包括:Determining the training sample based on the video playback attribute information corresponding to the sample video includes:
对所述样本视频对应的视频播放属性信息进行数据处理,获得所述样本视频的视频播放特征;Perform data processing on the video playback attribute information corresponding to the sample video to obtain the video playback characteristics of the sample video;
将所述样本视频的视频播放特征确定为训练样本。The video playback characteristics of the sample video are determined as training samples.
具体实施时,对于播放特征决策模型的具体训练过程,以及对样本视频对应的视频播放属性信息的数据处理过程,均可以参见上述实施例中对对象特征决策模型的具体实现过程,在此不再赘述。During the specific implementation, for the specific training process of the playback feature decision model and the data processing process of the video playback attribute information corresponding to the sample video, please refer to the specific implementation process of the object feature decision model in the above embodiment, which will not be discussed here. Repeat.
本申请实施例提供的该视频处理方法,在目标视频未播放之前,通过目标视频对应的目标对象的对象特征,结合预先训练的对象特征决策模型,提前做出视频转码决策;而在该视频转码决策为视频未转码的情况下,在目标视频播放后,目标播放时间段内可以再通过预设视频处理策略再次进行视频转码决策的确定,而在根据预设视频处理策略确定的该视频转码决策为视频未转码的情况下,会在该目标视频播放一段时间后,根据该已播放视频的播放情况,结合播放特征决策模型进一步的进行视频转码决策的确定;以解决对全部目标视频进行转码造成的资源浪费,以及在根据上述策略确定视频要转码的情况下,对目标视频进行有效转码,避免编码不足的情况发生,实现对目标视频的精准转码。The video processing method provided by the embodiment of the present application uses the object characteristics of the target object corresponding to the target video and a pre-trained object characteristic decision model to make a video transcoding decision in advance before the target video is played; and before the video is played, When the transcoding decision is that the video is not transcoded, after the target video is played, the video transcoding decision can be determined again through the preset video processing strategy within the target playback time period. If the video transcoding decision is that the video is not transcoded, after the target video has been played for a period of time, the video transcoding decision will be further determined based on the playback situation of the played video and the playback feature decision model; to solve the problem The waste of resources caused by transcoding all target videos, and when the video is determined to be transcoded according to the above strategy, the target video is effectively transcoded to avoid insufficient encoding and achieve accurate transcoding of the target video.
下述结合附图3,以本申请提供的视频处理方法在视频转码场景的应用为例,对所述视频处理方法进行进一步说明。其中,图3示出了本申请一实施例提供的一种应用于视频转码场景的视频处理方法的处理流程图,具体包括以下步骤:The video processing method will be further described below with reference to Figure 3, taking the application of the video processing method provided by this application in a video transcoding scenario as an example. Among them, Figure 3 shows a processing flow chart of a video processing method applied to a video transcoding scenario provided by an embodiment of the present application, which specifically includes the following steps:
步骤302:获取待转码视频。Step 302: Obtain the video to be transcoded.
步骤304:确定该待转码视频的上传者,获取该上传者的历史视频播放量。Step 304: Determine the uploader of the video to be transcoded, and obtain the uploader's historical video playback volume.
步骤306:根据该上传者的历史视频播放量,确定该上传者的视频播放量过万占比。Step 306: Based on the uploader's historical video playback volume, determine the proportion of the uploader's video playback volume exceeding 10,000.
步骤308:判断该上传者的视频播放量过万占比是否大于等于预设占比阈值,若是,则执行步骤310,若否,则执行步骤312。Step 308: Determine whether the proportion of the uploader's video playback volume exceeding 10,000 is greater than or equal to the preset proportion threshold. If yes, perform step 310. If not, perform step 312.
其中,预设占比阈值与上述实施例中的特征阈值相同,在此不再赘述。The preset proportion threshold is the same as the characteristic threshold in the above embodiment, and will not be described again here.
步骤310:视频转码。Step 310: Video transcoding.
步骤312:获取该上传者的对象特征,将该上传者的对象特征输入第一机器学习模型,获得该待转码视频的第一视频转码结果。Step 312: Obtain the object characteristics of the uploader, input the object characteristics of the uploader into the first machine learning model, and obtain the first video transcoding result of the video to be transcoded.
步骤314:判断该第一视频转码结果是否满足转码条件,若是,则执行步骤310,若否,则执行步骤316。Step 314: Determine whether the first video transcoding result meets the transcoding conditions. If yes, execute step 310. If not, execute step 316.
其中,该上传者的对象特征的获取方式,与上述实施例中的目标对象的对象特征的获取方式相同;第一机器学习模型,可以理解为上述实施例中的对象特征决策模型。The method of obtaining the object characteristics of the uploader is the same as the method of obtaining the object characteristics of the target object in the above embodiment; the first machine learning model can be understood as the object characteristics decision model in the above embodiment.
步骤316:播放该待转码视频,并在目标播放时间段内,根据预设视频转码策略确定第二视频转码结果。Step 316: Play the video to be transcoded, and determine the second video transcoding result according to the preset video transcoding strategy within the target playback time period.
其中,预设视频转码策略,可以理解为上述实施例的预设视频处理策略。The preset video transcoding strategy can be understood as the preset video processing strategy in the above embodiment.
步骤318:判断该第二视频转码结果是否满足转码条件,若是,则执行步骤320,若否,则执行步骤322。Step 318: Determine whether the second video transcoding result meets the transcoding conditions. If yes, execute step 320. If not, execute step 322.
步骤320:视频转码,并补足转码。Step 320: Transcode the video and supplement the transcoding.
具体的,在第二视频转码结果满足转码条件,即需要视频转码的情况下,对未播放的该待转码视频进行转码,并对之前播放的该待转码视频补足转码。Specifically, when the second video transcoding result meets the transcoding conditions, that is, when video transcoding is required, the unplayed video to be transcoded is transcoded, and the previously played video to be transcoded is supplemented with transcoding. .
步骤322:在该待转码视频播放预设播放时间段内,获取预设播放时间段内该待转码视频的视频播放特征,并将该视频播放特征输入第二机器学习模型,获得第三视频转码结果。Step 322: During the preset playback time period of the video to be transcoded, obtain the video playback characteristics of the video to be transcoded within the preset playback time period, and input the video playback characteristics into the second machine learning model to obtain the third Video transcoding results.
其中,该待转码视频的视频播放特征的获取方式,与上述实施例中目标视频的视频播放特征的获取方式相同;第二机器学习模型,可以理解为上述实施例中的播放特征决策模型。The video playback features of the video to be transcoded are obtained in the same manner as the video playback features of the target video in the above embodiment; the second machine learning model can be understood as the playback feature decision model in the above embodiment.
步骤324:判断该第三视频转码结果是否满足转码条件,若是,则执行步骤320,若否,则结束。Step 324: Determine whether the third video transcoding result meets the transcoding conditions. If yes, execute step 320. If not, end.
本申请实施例提供的视频处理方法,通过机器学习模型及统计学方法分析视频相关的历史数据,精准判断视频是否具有转码价值,实现视频的有效转码,在资源有限的情况下达到带宽收益与算力、存储成本的差值最大化。具体的,利用多种数据源,通过机器学习模型及统计学方法进行数据分析,设计一种转码决策策略以及转码决策模型(第一机器学习模型),在视频开放前提前做出视频转码决策,在视频开放(播放)后通过另一种转码决策策略以及转码决策模型,及时补足视频转码,实现及时有效的视频转码,并且可以避免不必要的视频转码浪费资源,同时尽可能提前识别出具有转码价值的视频,最终达到收益与成本的差值最大化。即本申请提供的视频处理方法,可以通过机器学习模型及统计学方法进行数据分析,设计多个转码决策策略以及转码决策模型,在视频开放前提前做出视频转码决策,在视频开放后及时补足决策,实现及时有效的视频转码。The video processing method provided by the embodiments of this application uses machine learning models and statistical methods to analyze video-related historical data, accurately determine whether the video has transcoding value, realize effective transcoding of the video, and achieve bandwidth benefits under limited resources. Maximize the difference with computing power and storage costs. Specifically, multiple data sources are used to conduct data analysis through machine learning models and statistical methods, and a transcoding decision-making strategy and transcoding decision-making model (the first machine learning model) are designed to make video conversions in advance before the video is opened. Coding decision-making: after the video is opened (played), another transcoding decision-making strategy and a transcoding decision-making model are used to complement the video transcoding in a timely manner to achieve timely and effective video transcoding, and to avoid unnecessary video transcoding and waste of resources. At the same time, videos with transcoding value should be identified as early as possible to ultimately maximize the difference between revenue and cost. That is to say, the video processing method provided by this application can conduct data analysis through machine learning models and statistical methods, design multiple transcoding decision strategies and transcoding decision models, and make video transcoding decisions in advance before the video is opened. Make up decisions in a timely manner to achieve timely and effective video transcoding.
与上述方法实施例相对应,本申请还提供了视频处理装置实施例,图4示出了本申请一实施例提供的一种视频处理装置的结构示意图。如图4所示,该装置包括:Corresponding to the above method embodiments, this application also provides an embodiment of a video processing device. Figure 4 shows a schematic structural diagram of a video processing device provided by an embodiment of this application. As shown in Figure 4, the device includes:
第一结果获得模块402,被配置为在目标视频未播放的情况下,将所述目标视频对应的目标对象的对象特征,输入对象特征决策模型,获得第一视频决策结果;The first result obtaining module 402 is configured to input the object characteristics of the target object corresponding to the target video into the object characteristic decision model to obtain the first video decision result when the target video is not played;
视频播放模块404,被配置为在所述第一视频决策结果不满足决策条件的情况下,播放所述目标视频;The video playback module 404 is configured to play the target video when the first video decision result does not meet the decision conditions;
第二结果获得模块406,被配置为在目标播放时间段内,根据预设视频处理策略确定第二视频决策结果;The second result obtaining module 406 is configured to determine the second video decision result according to the preset video processing strategy within the target playback time period;
视频处理模块408,被配置为在所述第二视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理。The video processing module 408 is configured to perform video processing on the target video if the second video decision result satisfies the decision condition.
可选地,所述装置,还包括:Optionally, the device also includes:
第三结果获得模块,被配置为:The third result acquisition module is configured as:
在所述目标播放时间段结束,且所述第二视频决策结果不满足所述决策条件的情况下,获取预设播放时间段内所述目标视频的视频播放特征;When the target playback time period ends and the second video decision result does not meet the decision-making condition, obtain the video playback characteristics of the target video within the preset playback time period;
将所述视频播放特征输入播放特征决策模型,获得第三视频决策结果;Input the video playback features into the playback feature decision model to obtain the third video decision result;
在所述第三视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理。If the third video decision result satisfies the decision condition, perform video processing on the target video.
可选地,所述第三结果获得模块,进一步被配置为:Optionally, the third result obtaining module is further configured as:
获取所述预设播放时间段内所述目标视频的视频播放属性信息;Obtain video playback attribute information of the target video within the preset playback time period;
对所述视频播放属性信息进行数据处理,获得所述目标视频的视频播放特征。Perform data processing on the video playback attribute information to obtain the video playback characteristics of the target video.
可选地,所述第二结果获得模块406,进一步被配置为:Optionally, the second result obtaining module 406 is further configured as:
根据预设划分规则获取至少两个视频片段,并根据所述至少两个视频片段的播放量,确定第二视频决策结果。At least two video clips are obtained according to the preset division rules, and the second video decision result is determined based on the playback volume of the at least two video clips.
可选地,所述第二结果获得模块406,进一步被配置为:Optionally, the second result obtaining module 406 is further configured as:
确定所述至少两个视频片段中任意两个相邻视频片段的播放量差值;Determine the difference in playback volume of any two adjacent video clips among the at least two video clips;
根据所述播放量差值与差值阈值的关联关系,确定第二视频决策结果。The second video decision result is determined according to the correlation between the playback amount difference and the difference threshold.
可选地,所述第二结果获得模块406,进一步被配置为:Optionally, the second result obtaining module 406 is further configured as:
在所述播放量差值大于等于差值阈值的情况下,确定第二视频决策结果为视频转码;或者If the playback amount difference is greater than or equal to the difference threshold, determine that the second video decision result is video transcoding; or
在所述播放量差值小于所述差值阈值的情况下,确定第二视频决策结果为视频不转码。If the playback amount difference is less than the difference threshold, it is determined that the second video decision result is that the video is not transcoded.
可选地,所述第二结果获得模块406,进一步被配置为:Optionally, the second result obtaining module 406 is further configured as:
确定所述至少两个视频片段中每个视频片段的播放量;Determining the amount of playback of each of the at least two video clips;
根据所述每个视频片段的播放量,确定所述至少两个视频片段的热度阈值;Determine the popularity threshold of the at least two video clips based on the playback volume of each video clip;
根据所述至少两个视频片段中每个视频片段的播放量、以及所述热度阈值,确定第二视频决策结果。The second video decision result is determined according to the play amount of each video segment in the at least two video segments and the popularity threshold.
可选地,所述第二结果获得模块406,进一步被配置为:Optionally, the second result obtaining module 406 is further configured as:
从所述至少两个视频片段中、获取预设数量的连续视频片段;Obtain a preset number of consecutive video segments from the at least two video segments;
确定所述连续视频片段中每个视频片段的播放量;Determine the playback amount of each video segment in the continuous video segments;
根据所述连续视频片段中每个视频片段的播放量,以及热度阈值的关联关系,确定第二视频决策结果。The second video decision result is determined based on the play amount of each video segment in the continuous video segments and the correlation between the popularity threshold.
可选地,所述第二结果获得模块406,进一步被配置为:Optionally, the second result obtaining module 406 is further configured as:
在所述连续视频片段中每个视频片段的播放量均大于等于热度阈值的情况下,确定第二视频决策结果为视频转码;或者When the playback volume of each video segment in the continuous video segments is greater than or equal to the popularity threshold, determine that the second video decision result is video transcoding; or
在所述连续视频片段中任意一个视频片段的播放量小于所述热度阈值的情况下,确定第二视频决策结果为视频不转码。When the play amount of any one of the continuous video segments is less than the popularity threshold, it is determined that the second video decision result is that the video is not transcoded.
可选地,视频处理模块408,进一步被配置为:Optionally, the video processing module 408 is further configured to:
在所述第二视频决策结果为视频转码的情况下,确定所述第二视频决策结果满足所述决策条件,并对所述目标视频进行转码处理。When the second video decision result is video transcoding, it is determined that the second video decision result satisfies the decision condition, and the target video is transcoded.
可选地,所述装置,还包括:Optionally, the device also includes:
第一模型训练模块,被配置为:训练所述对象特征决策模型;The first model training module is configured to: train the object feature decision-making model;
所述对象特征决策模型的训练步骤如下:The training steps of the object feature decision-making model are as follows:
获取样本视频,确定每个样本视频对应的样本对象、以及视频播放量;Obtain sample videos, determine the sample objects corresponding to each sample video, and the video playback volume;
根据所述样本对象的对象属性信息确定训练样本;Determine the training sample according to the object attribute information of the sample object;
根据所述视频播放量确定所述训练样本对应的样本标签;Determine the sample label corresponding to the training sample according to the video playback volume;
根据所述训练样本以及所述样本标签训练所述对象特征决策模型。The object feature decision model is trained according to the training samples and the sample labels.
可选地,所述第一模型训练模块,进一步被配置为:Optionally, the first model training module is further configured to:
对所述样本对象的对象属性信息进行数据处理,获得所述样本对象的对象特征;Perform data processing on the object attribute information of the sample object to obtain the object characteristics of the sample object;
将所述样本对象的对象特征确定为训练样本。The object characteristics of the sample object are determined as training samples.
可选地,所述装置,还包括:Optionally, the device also includes:
特征阈值获取模块,被配置为:The feature threshold acquisition module is configured as:
根据所述样本标签,确定所述样本视频中的正样本视频;Determine the positive sample video in the sample video according to the sample label;
确定所述正样本视频对应的正样本对象,并根据所述正样本对象的历史视频数据确定目标特征;Determine the positive sample object corresponding to the positive sample video, and determine the target characteristics according to the historical video data of the positive sample object;
根据所述目标特征确定对应的特征阈值。The corresponding feature threshold is determined according to the target feature.
可选地,所述装置,还包括:Optionally, the device also includes:
第四结果获得模块,被配置为:The fourth result acquisition module is configured as:
确定所述目标视频对应的目标对象的目标特征,以及所述目标特征的特征值;Determine the target feature of the target object corresponding to the target video, and the characteristic value of the target feature;
根据所述目标特征的特征值、与所述特征阈值的关联关系,获得第四视频决策结果;Obtain a fourth video decision result according to the correlation between the characteristic value of the target characteristic and the characteristic threshold;
在所述第四视频决策结果满足决策条件的情况下,根据所述第四视频决策结果,对所述目标视频进行视频处理。When the fourth video decision result satisfies the decision condition, video processing is performed on the target video according to the fourth video decision result.
可选地,所述第一结果获得模块402,进一步被配置为:Optionally, the first result obtaining module 402 is further configured as:
获取所述目标视频对应的目标对象的对象属性信息;Obtain object attribute information of the target object corresponding to the target video;
对所述对象属性信息进行数据处理,获得所述目标对象的对象特征;Perform data processing on the object attribute information to obtain the object characteristics of the target object;
将所述目标对象的对象特征输入对象特征决策模型,获得第一视频决策结果。The object characteristics of the target object are input into the object characteristics decision model to obtain the first video decision result.
可选地,所述装置,还包括:Optionally, the device also includes:
第二模型训练模块,被配置为:训练所述播放特征决策模型;The second model training module is configured to: train the playback feature decision-making model;
所述播放特征决策模型的训练步骤如下:The training steps of the playback feature decision model are as follows:
获取样本视频,确定每个样本视频对应的视频播放属性信息;Obtain sample videos and determine the video playback attribute information corresponding to each sample video;
根据所述样本视频对应的视频播放属性信息确定训练样本;Determine the training sample according to the video playback attribute information corresponding to the sample video;
根据所述视频播放属性信息中的视频播放量确定所述训练样本对应的样本标签;Determine the sample label corresponding to the training sample according to the video playback amount in the video playback attribute information;
根据所述训练样本以及所述样本标签训练所述播放特征决策模型。The playback feature decision model is trained according to the training samples and the sample labels.
可选地,所述第二模型训练模块,进一步被配置为:Optionally, the second model training module is further configured as:
对所述样本视频对应的视频播放属性信息进行数据处理,获得所述样本视频的视频播放特征;Perform data processing on the video playback attribute information corresponding to the sample video to obtain the video playback characteristics of the sample video;
将所述样本视频的视频播放特征确定为训练样本。The video playback characteristics of the sample video are determined as training samples.
本申请实施例提供的该视频处理装置,在目标视频未播放之前,通过目标视频对应的目标对象的对象特征,结合预先训练的对象特征决策模型,提前做出视频转码决策;而在该视频转码决策为视频未转码的情况下,在目标视频播放后,通过预设视频处理策略再次进行视频转码决策,以解决对全部目标视频进行转码造成的资源浪费,以及在根据上述策略确定视频要转码的情况下,对目标视频进行有效转码,避免编码不足的情况发生,实现对目标视频的精准转码。The video processing device provided by the embodiment of the present application makes a video transcoding decision in advance based on the object characteristics of the target object corresponding to the target video and a pre-trained object characteristic decision model before the target video is played; and when the video When the transcoding decision is that the video is not transcoded, after the target video is played, the video transcoding decision is made again through the preset video processing strategy to solve the waste of resources caused by transcoding all the target videos, and according to the above strategy When it is determined that the video needs to be transcoded, the target video should be transcoded effectively to avoid insufficient encoding and achieve accurate transcoding of the target video.
上述为本实施例的一种视频处理装置的示意性方案。需要说明的是,该视频处理装置的技术方案与上述的视频处理方法的技术方案属于同一构思,视频处理装置的技术方案未详细描述的细节内容,均可以参见上述视频处理方法的技术方案的描述。The above is a schematic solution of a video processing device in this embodiment. It should be noted that the technical solution of the video processing device and the technical solution of the above-mentioned video processing method belong to the same concept. For details that are not described in detail in the technical solution of the video processing device, please refer to the description of the technical solution of the above video processing method. .
图5示出了根据本说明书一个实施例提供的一种计算设备500的结构框图。该计算设备500的部件包括但不限于存储器510和处理器520。处理器520与存储器510通过总线530相连接,数据库550用于保存数据。Figure 5 shows a structural block diagram of a computing device 500 provided according to an embodiment of this specification. Components of the computing device 500 include, but are not limited to, memory 510 and processor 520 . The processor 520 is connected to the memory 510 through a bus 530, and the database 550 is used to save data.
计算设备500还包括接入设备540,接入设备540使得计算设备500能够经由一个或多个网络560通信。这些网络的示例包括公用交换电话网(PSTN)、局域网(LAN)、广域网(WAN)、个域网(PAN)或诸如因特网的通信网络的组合。接入设备540可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC))中的一个或多个,诸如IEEE802.11无线局域网(WLAN)无线接口、全球微波互联接入(Wi-MAX)接口、以太网接口、通用串行总线(USB)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC)接口,等等。Computing device 500 also includes an access device 540 that enables computing device 500 to communicate via one or more networks 560 . Examples of these networks include the Public Switched Telephone Network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communications networks such as the Internet. Access device 540 may include one or more of any type of network interface (eg, a network interface card (NIC)), wired or wireless, such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, Global Interconnection for Microwave Access ( Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, etc.
在本说明书的一个实施例中,计算设备500的上述部件以及图5中未示出的其他部件也可以彼此相连接,例如通过总线。应当理解,图5所示的计算设备结构框图仅仅是出于示例的目的,而不是对本说明书范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。In one embodiment of this specification, the above-mentioned components of the computing device 500 and other components not shown in FIG. 5 may also be connected to each other, such as through a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 5 is for illustrative purposes only and does not limit the scope of this description. Those skilled in the art can add or replace other components as needed.
计算设备500可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或PC的静止计算设备。计算设备500还可以是移动式或静止式的服务器。Computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile telephone (e.g., smartphone ), a wearable computing device (e.g., smart watch, smart glasses, etc.) or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 500 may also be a mobile or stationary server.
其中,处理器520执行所述指令时实现所述的视频处理方法的步骤。When the processor 520 executes the instructions, the steps of the video processing method are implemented.
上述为本实施例的一种计算设备的示意性方案。需要说明的是,该计算设备的技术方案与上述的视频处理方法的技术方案属于同一构思,计算设备的技术方案未详细描述的细节内容,均可以参见上述视频处理方法的技术方案的描述。The above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above-mentioned video processing method belong to the same concept. For details that are not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above video processing method.
本申请一实施例还提供一种计算机可读存储介质,其存储有计算机指令,该指令被处理器执行时实现如前所述视频处理方法的步骤。An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the instructions are executed by a processor, the steps of the video processing method as described above are implemented.
上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的视频处理方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述视频处理方法的技术方案的描述。The above is a schematic solution of a computer-readable storage medium in this embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the above-mentioned video processing method belong to the same concept. For details that are not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above video processing method.
上述对本申请特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The above has described specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desired results. Additionally, the processes depicted in the figures do not necessarily require the specific order shown, or sequential order, to achieve desirable results. Multitasking and parallel processing are also possible or may be advantageous in certain implementations.
所述计算机指令包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The computer instructions include computer program code, which may be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , random access memory (RAM, RandomAccess Memory), electrical carrier signals, telecommunications signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium Excludes electrical carrier signals and telecommunications signals.
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本申请所必须的。It should be noted that for the convenience of description, the foregoing method embodiments are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence. Because according to this application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary for this application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above embodiments, each embodiment is described with its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
以上公开的本申请优选实施例只是用于帮助阐述本申请。可选实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本申请的内容,可作很多的修改和变化。本申请选取并具体描述这些实施例,是为了更好地解释本申请的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本申请。本申请仅受权利要求书及其全部范围和等效物的限制。The preferred embodiments of the present application disclosed above are only used to help explain the present application. Alternative embodiments are not described in all details, nor are the inventions limited to the specific embodiments described. Obviously, many modifications and variations are possible in light of the teachings of this application. This application selects and specifically describes these embodiments in order to better explain the principles and practical applications of this application, so that those skilled in the art can better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.

Claims (20)

  1. 一种视频处理方法,包括:A video processing method including:
    在目标视频未播放的情况下,将所述目标视频对应的目标对象的对象特征,输入对象特征决策模型,获得第一视频决策结果;When the target video is not played, input the object characteristics of the target object corresponding to the target video into the object characteristics decision model to obtain the first video decision result;
    在所述第一视频决策结果不满足决策条件的情况下,播放所述目标视频;When the first video decision result does not meet the decision conditions, play the target video;
    在目标播放时间段内,根据预设视频处理策略确定第二视频决策结果;Within the target playback time period, determine the second video decision result according to the preset video processing strategy;
    在所述第二视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理。If the second video decision result satisfies the decision condition, perform video processing on the target video.
  2. 根据权利要求1所述的视频处理方法,所述根据预设视频处理策略确定第二视频决策结果之后,还包括:The video processing method according to claim 1, after determining the second video decision result according to the preset video processing strategy, further comprising:
    在所述目标播放时间段结束,且所述第二视频决策结果不满足所述决策条件的情况下,获取预设播放时间段内所述目标视频的视频播放特征;When the target playback time period ends and the second video decision result does not meet the decision-making condition, obtain the video playback characteristics of the target video within the preset playback time period;
    将所述视频播放特征输入播放特征决策模型,获得第三视频决策结果;Input the video playback features into the playback feature decision model to obtain the third video decision result;
    在所述第三视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理。If the third video decision result satisfies the decision condition, perform video processing on the target video.
  3. 根据权利要求2所述的视频处理方法,所述获取预设播放时间段内所述目标视频的视频播放特征,包括:According to the video processing method of claim 2, said obtaining the video playback characteristics of the target video within the preset playback time period includes:
    获取所述预设播放时间段内所述目标视频的视频播放属性信息;Obtain video playback attribute information of the target video within the preset playback time period;
    对所述视频播放属性信息进行数据处理,获得所述目标视频的视频播放特征。Perform data processing on the video playback attribute information to obtain the video playback characteristics of the target video.
  4. 根据权利要求1所述的视频处理方法,所述根据预设视频处理策略确定第二视频决策结果,包括:The video processing method according to claim 1, wherein determining the second video decision result according to a preset video processing strategy includes:
    根据预设划分规则获取至少两个视频片段,并根据所述至少两个视频片段的播放量,确定第二视频决策结果。At least two video clips are obtained according to the preset division rules, and the second video decision result is determined based on the playback volume of the at least two video clips.
  5. 根据权利要求4所述的视频处理方法,所述根据所述至少两个视频片段的播放量,确定第二视频决策结果,包括:The video processing method according to claim 4, wherein determining the second video decision result based on the playback volume of the at least two video clips includes:
    确定所述至少两个视频片段中任意两个相邻视频片段的播放量差值;Determine the difference in playback volume of any two adjacent video clips among the at least two video clips;
    根据所述播放量差值与差值阈值的关联关系,确定第二视频决策结果。The second video decision result is determined according to the correlation between the playback amount difference and the difference threshold.
  6. 根据权利要求5所述的视频处理方法,所述根据所述播放量差值与差值阈值的关联关系,确定第二视频决策结果,包括:The video processing method according to claim 5, wherein determining the second video decision result based on the correlation between the playback volume difference and the difference threshold includes:
    在所述播放量差值大于等于差值阈值的情况下,确定第二视频决策结果为视频转码;或者If the playback amount difference is greater than or equal to the difference threshold, determine that the second video decision result is video transcoding; or
    在所述播放量差值小于所述差值阈值的情况下,确定第二视频决策结果为视频不转码。If the playback amount difference is less than the difference threshold, it is determined that the second video decision result is that the video is not transcoded.
  7. 根据权利要求4所述的视频处理方法,所述根据所述至少两个视频片段的播放量,确定第二视频决策结果,包括:The video processing method according to claim 4, wherein determining the second video decision result based on the playback volume of the at least two video clips includes:
    确定所述至少两个视频片段中每个视频片段的播放量;Determining the amount of playback of each of the at least two video clips;
    根据所述每个视频片段的播放量,确定所述至少两个视频片段的热度阈值;Determine the popularity threshold of the at least two video clips based on the playback volume of each video clip;
    根据所述至少两个视频片段中每个视频片段的播放量、以及所述热度阈值,确定第二视频决策结果。The second video decision result is determined according to the play amount of each video segment in the at least two video segments and the popularity threshold.
  8. 根据权利要求7所述的视频处理方法,所述根据所述至少两个视频片段中每个视频片段的播放量、以及所述热度阈值,确定第二视频决策结果,包括:The video processing method according to claim 7, wherein determining the second video decision result based on the play amount of each video segment in the at least two video segments and the popularity threshold includes:
    从所述至少两个视频片段中、获取预设数量的连续视频片段;Obtain a preset number of consecutive video segments from the at least two video segments;
    确定所述连续视频片段中每个视频片段的播放量;Determine the playback amount of each video segment in the continuous video segments;
    根据所述连续视频片段中每个视频片段的播放量,以及热度阈值的关联关系,确定第二视频决策结果。The second video decision result is determined based on the play amount of each video segment in the continuous video segments and the correlation between the popularity threshold.
  9. 根据权利要求8所述的视频处理方法,所述根据所述连续视频片段中每个视频片段的播放量,以及热度阈值的关联关系,确定第二视频决策结果,包括:The video processing method according to claim 8, wherein determining the second video decision result based on the play amount of each video segment in the continuous video segments and the correlation between the popularity thresholds includes:
    在所述连续视频片段中每个视频片段的播放量均大于等于热度阈值的情况下,确定第二视频决策结果为视频转码;或者When the playback volume of each video segment in the continuous video segments is greater than or equal to the popularity threshold, determine that the second video decision result is video transcoding; or
    在所述连续视频片段中任意一个视频片段的播放量小于所述热度阈值的情况下,确定第二视频决策结果为视频不转码。When the play amount of any one of the continuous video segments is less than the popularity threshold, it is determined that the second video decision result is that the video is not transcoded.
  10. 根据权利要求6或9所述的视频处理方法,所述在所述第二视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理,包括:The video processing method according to claim 6 or 9, said performing video processing on the target video when the second video decision result satisfies the decision condition, including:
    在所述第二视频决策结果为视频转码的情况下,确定所述第二视频决策结果满足所述决策条件,并对所述目标视频进行转码处理。When the second video decision result is video transcoding, it is determined that the second video decision result satisfies the decision condition, and the target video is transcoded.
  11. 根据权利要求1所述的视频处理方法,所述对象特征决策模型的训练步骤如下:According to the video processing method of claim 1, the training steps of the object feature decision model are as follows:
    获取样本视频,确定每个样本视频对应的样本对象、以及视频播放量;Obtain sample videos, determine the sample objects corresponding to each sample video, and the video playback volume;
    根据所述样本对象的对象属性信息确定训练样本;Determine the training sample according to the object attribute information of the sample object;
    根据所述视频播放量确定所述训练样本对应的样本标签;Determine the sample label corresponding to the training sample according to the video playback volume;
    根据所述训练样本以及所述样本标签训练所述对象特征决策模型。The object feature decision model is trained according to the training samples and the sample labels.
  12. 根据权利要求11所述的视频处理方法,所述根据所述样本对象的对象属性信息确定训练样本,包括:The video processing method according to claim 11, wherein determining the training sample according to the object attribute information of the sample object includes:
    对所述样本对象的对象属性信息进行数据处理,获得所述样本对象的对象特征;Perform data processing on the object attribute information of the sample object to obtain the object characteristics of the sample object;
    将所述样本对象的对象特征确定为训练样本。The object characteristics of the sample object are determined as training samples.
  13. 根据权利要求12所述的视频处理方法,所述根据所述视频播放量确定所述训练样本对应的样本标签之后,还包括:The video processing method according to claim 12, after determining the sample label corresponding to the training sample according to the video playback amount, further comprising:
    根据所述样本标签,确定所述样本视频中的正样本视频;Determine the positive sample video in the sample video according to the sample label;
    确定所述正样本视频对应的正样本对象,并根据所述正样本对象的历史视频数据确定目标特征;Determine the positive sample object corresponding to the positive sample video, and determine the target characteristics according to the historical video data of the positive sample object;
    根据所述目标特征确定对应的特征阈值。The corresponding feature threshold is determined according to the target feature.
  14. 根据权利要求13所述的视频处理方法,所述将所述目标对象的对象特征输入对象特征决策模型,获得第一视频决策结果之前,还包括:The video processing method according to claim 13, before inputting the object characteristics of the target object into the object characteristic decision model and obtaining the first video decision result, it further includes:
    确定所述目标视频对应的目标对象的目标特征,以及所述目标特征的特征值;Determine the target feature of the target object corresponding to the target video, and the characteristic value of the target feature;
    根据所述目标特征的特征值、与所述特征阈值的关联关系,获得第四视频决策结果;Obtain a fourth video decision result according to the correlation between the characteristic value of the target characteristic and the characteristic threshold;
    在所述第四视频决策结果满足决策条件的情况下,根据所述第四视频决策结果,对所述目标视频进行视频处理。When the fourth video decision result satisfies the decision condition, video processing is performed on the target video according to the fourth video decision result.
  15. 根据权利要求1所述的视频处理方法,所述将所述目标视频对应的目标对象的对象特征、输入对象特征决策模型,获得第一视频决策结果,包括:The video processing method according to claim 1, wherein the object characteristics of the target object corresponding to the target video are input into the object characteristics decision model to obtain the first video decision result, including:
    获取所述目标视频对应的目标对象的对象属性信息;Obtain object attribute information of the target object corresponding to the target video;
    对所述对象属性信息进行数据处理,获得所述目标对象的对象特征;Perform data processing on the object attribute information to obtain the object characteristics of the target object;
    将所述目标对象的对象特征输入对象特征决策模型,获得第一视频决策结果。The object characteristics of the target object are input into the object characteristics decision model to obtain the first video decision result.
  16. 根据权利要求2所述的视频处理方法,所述播放特征决策模型的训练步骤如下:According to the video processing method of claim 2, the training steps of the playback feature decision model are as follows:
    获取样本视频,确定每个样本视频对应的视频播放属性信息;Obtain sample videos and determine the video playback attribute information corresponding to each sample video;
    根据所述样本视频对应的视频播放属性信息确定训练样本;Determine the training sample according to the video playback attribute information corresponding to the sample video;
    根据所述视频播放属性信息中的视频播放量确定所述训练样本对应的样本标签;Determine the sample label corresponding to the training sample according to the video playback amount in the video playback attribute information;
    根据所述训练样本以及所述样本标签训练所述播放特征决策模型。The playback feature decision model is trained according to the training samples and the sample labels.
  17. 根据权利要求16所述的视频处理方法,所述根据所述样本视频对应的视频播放属性信息确定训练样本,包括:The video processing method according to claim 16, wherein determining the training sample based on the video playback attribute information corresponding to the sample video includes:
    对所述样本视频对应的视频播放属性信息进行数据处理,获得所述样本视频的视频播放特征;Perform data processing on the video playback attribute information corresponding to the sample video to obtain the video playback characteristics of the sample video;
    将所述样本视频的视频播放特征确定为训练样本。The video playback characteristics of the sample video are determined as training samples.
  18. 一种视频处理装置,包括:A video processing device including:
    第一结果获得模块,被配置为在目标视频未播放的情况下,将所述目标视频对应的目标对象的对象特征,输入对象特征决策模型,获得第一视频决策结果;The first result obtaining module is configured to input the object characteristics of the target object corresponding to the target video into the object characteristic decision model to obtain the first video decision result when the target video is not played;
    视频播放模块,被配置为在所述第一视频决策结果不满足决策条件的情况下,播放所述目标视频;A video playback module configured to play the target video when the first video decision result does not meet the decision condition;
    第二结果获得模块,被配置为在目标播放时间段内,根据预设视频处理策略确定第二视频决策结果;The second result obtaining module is configured to determine the second video decision result according to the preset video processing strategy within the target playback time period;
    视频处理模块,被配置为在所述第二视频决策结果满足所述决策条件的情况下,对所述目标视频进行视频处理。A video processing module configured to perform video processing on the target video if the second video decision result satisfies the decision condition.
  19. 一种计算设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,所述处理器执行所述指令时实现权利要求1-17任意一项所述视频处理方法的步骤。A computing device, including a memory, a processor, and computer instructions stored in the memory and executable on the processor. When the processor executes the instructions, the video processing method of any one of claims 1-17 is implemented. step.
  20. 一种计算机可读存储介质,其存储有计算机指令,该指令被处理器执行时实现权利要求1-17任意一项所述视频处理方法的步骤。A computer-readable storage medium stores computer instructions that, when executed by a processor, implement the steps of the video processing method described in any one of claims 1-17.
PCT/CN2022/144210 2022-03-28 2022-12-30 Video processing method and apparatus WO2023185175A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210311587.2 2022-03-28
CN202210311587.2A CN114693812A (en) 2022-03-28 2022-03-28 Video processing method and device

Publications (1)

Publication Number Publication Date
WO2023185175A1 true WO2023185175A1 (en) 2023-10-05

Family

ID=82141821

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/144210 WO2023185175A1 (en) 2022-03-28 2022-12-30 Video processing method and apparatus

Country Status (2)

Country Link
CN (1) CN114693812A (en)
WO (1) WO2023185175A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114693812A (en) * 2022-03-28 2022-07-01 上海哔哩哔哩科技有限公司 Video processing method and device
CN115396683B (en) * 2022-08-22 2024-04-09 广州博冠信息科技有限公司 Video optimization processing method and device, electronic equipment and computer readable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104967868A (en) * 2014-04-04 2015-10-07 清华大学 Video transcoding method, video transcoding apparatus and server
CN111565316A (en) * 2020-07-15 2020-08-21 腾讯科技(深圳)有限公司 Video processing method, video processing device, computer equipment and storage medium
CN112492351A (en) * 2020-11-26 2021-03-12 广州市网星信息技术有限公司 Video processing method, device, equipment and storage medium
CN112565775A (en) * 2020-11-26 2021-03-26 北京达佳互联信息技术有限公司 Method and device for audio and video transcoding and storage medium
US20210112116A1 (en) * 2019-10-14 2021-04-15 Qatar University Forecasting and reservation of transcoding resources for live streaming
CN112883231A (en) * 2021-02-24 2021-06-01 广东技术师范大学 Short video popularity prediction method, system, electronic device and storage medium
CN114693812A (en) * 2022-03-28 2022-07-01 上海哔哩哔哩科技有限公司 Video processing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104967868A (en) * 2014-04-04 2015-10-07 清华大学 Video transcoding method, video transcoding apparatus and server
US20210112116A1 (en) * 2019-10-14 2021-04-15 Qatar University Forecasting and reservation of transcoding resources for live streaming
CN111565316A (en) * 2020-07-15 2020-08-21 腾讯科技(深圳)有限公司 Video processing method, video processing device, computer equipment and storage medium
CN112492351A (en) * 2020-11-26 2021-03-12 广州市网星信息技术有限公司 Video processing method, device, equipment and storage medium
CN112565775A (en) * 2020-11-26 2021-03-26 北京达佳互联信息技术有限公司 Method and device for audio and video transcoding and storage medium
CN112883231A (en) * 2021-02-24 2021-06-01 广东技术师范大学 Short video popularity prediction method, system, electronic device and storage medium
CN114693812A (en) * 2022-03-28 2022-07-01 上海哔哩哔哩科技有限公司 Video processing method and device

Also Published As

Publication number Publication date
CN114693812A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
WO2023185175A1 (en) Video processing method and apparatus
CN109360028B (en) Method and device for pushing information
CN112511854B (en) Live video highlight generation method, device, medium and equipment
KR102592402B1 (en) Method of generating deep learning model for user characteristic analysis using federated learning
CN110149529B (en) Media information processing method, server and storage medium
CN112565775B (en) Method, device and storage medium for audio and video transcoding
Tan et al. A novel time series approach for predicting the long-term popularity of online videos
CN112423123B (en) Video loading method and device
CN112423125A (en) Video loading method and device
CN112752113B (en) Method and device for determining abnormal factors of live broadcast server
CN114982227A (en) Optimal format selection for video players based on predicted visual quality using machine learning
WO2023024749A1 (en) Video retrieval method and apparatus, device, and storage medium
CN110248195B (en) Method and apparatus for outputting information
CN111491175B (en) Edge network caching method and device based on video content characteristics
CN111898698A (en) Object processing method and device, storage medium and electronic equipment
WO2023077813A1 (en) Method and apparatus for determining fake traffic in live broadcast room
CN108512817B (en) Multi-video transcoding scheduling method and device
Wu et al. Paas: A preference-aware deep reinforcement learning approach for 360 video streaming
Zhu et al. A semantic-aware transmission with adaptive control scheme for volumetric video service
Zhang et al. Duasvs: A mobile data saving strategy in short-form video streaming
CN112925990B (en) Target group classification method and device
CN108563648B (en) Data display method and device, storage medium and electronic device
KR101871116B1 (en) Quality of exprerience maximization scheme to limit transcoding power consumption
CN110135465B (en) Model parameter representation space size estimation method and device and recommendation method
CN112464106A (en) Object recommendation method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22934985

Country of ref document: EP

Kind code of ref document: A1