Video processing method and device
By using the object feature decision model before video playback and the video processing strategy adjusted in real time during playback, the problem of waste of resources and insufficient encoding in video transcoding is solved, and the timeliness and accuracy of video transcoding is achieved.
Patent Information
- Application Number
- CN202210311587.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-03-28
AI Technical Summary
There are problems of wasted resources or insufficient encoding in the existing video encoding strategies, resulting in insufficient video transcoding.
By using the object feature decision model to make preliminary decisions before the target video is played, and real-time adjustments are made during playback with the preset video processing strategy, the timeliness and accuracy of video transcoding are achieved.
The timeliness and accuracy of video transcoding is achieved, resource waste and insufficient encoding are avoided, and the bandwidth benefits and cost difference is maximized.
Smart Images

Figure CN114693812B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video processing technology, and in particular to a video processing method, a video processing device, a computing device, and a computer-readable storage medium. Background Art
[0002] Video encoding is a crucial technology in the video industry. Unencoded videos can be quite large, placing significant strain on both storage and transmission. Therefore, video encoding is often used to compress video data during storage and transmission.
[0003] However, when it comes to deciding whether to encode a video, or transcoding, the current strategies used are relatively simple. One is to transcode all videos indiscriminately, and the other is to make transcoding decisions based on subjective judgment. However, both strategies may result in wasted resources or insufficient encoding. Summary of the Invention
[0004] In view of this, embodiments of the present application provide a video processing method. The present application also relates to a video processing apparatus, a computing device, and a computer-readable storage medium to solve the technical problems of resource waste or insufficient encoding in video transcoding in the prior art.
[0005] According to a first aspect of an embodiment of the present application, a video processing method is provided, including:
[0006] In a case where the target video is not played, inputting the object features of the target object corresponding to the target video into the object feature decision model to obtain a first video decision result;
[0007] If the decision result of the first video does not meet the decision condition, playing the target video;
[0008] Determine the second video decision result according to the preset video processing strategy within the target playback time period;
[0009] When the second video decision result meets the decision condition, video processing is performed on the target video.
[0010] According to a second aspect of an embodiment of the present application, there is provided a video processing apparatus, including:
[0011] A first result obtaining module is configured to input the object features of the target object corresponding to the target video into the object feature decision model to obtain a first video decision result when the target video is not played;
[0012] a video playing module, configured to play the target video if the decision result of the first video does not meet the decision condition;
[0013] A second result obtaining module is configured to determine a second video decision result according to a preset video processing strategy within a target playback time period;
[0014] The video processing module is configured to perform video processing on the target video when the second video decision result meets the decision condition.
[0015] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the video processing method when executing the instructions.
[0016] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the instructions are executed by a processor, the steps of the video processing method are implemented.
[0017] The video processing method provided in the present application includes, when the target video is not played, inputting the object features of the target object corresponding to the target video into the object feature decision model to obtain a first video decision result; when the first video decision result does not meet the decision conditions, playing the target video; within the target playback time period, determining the second video decision result according to a preset video processing strategy; when the second video decision result meets the decision conditions, performing video processing on the target video.
[0018] Specifically, before the target video is played, the video processing method makes a video transcoding decision in advance through the object features of the target object corresponding to the target video, combined with a pre-trained object feature decision model; and when the video transcoding decision is that the video is not transcoded, after the target video is played, the video transcoding decision is made again through a preset video processing strategy to solve the resource waste caused by transcoding all target videos, and when it is determined that the video needs 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is an exemplary description of a video processing method provided by an embodiment of the present application in a specific application scenario;
[0020] Figure 2 This is a flowchart of a video processing method provided by an embodiment of the present application;
[0021] Figure 3This is a processing flow chart of a video processing method applied to a video transcoding scenario provided by an embodiment of the present application;
[0022] Figure 4 is a structural diagram of a video processing device provided by an embodiment of the present application;
[0023] Figure 5 This is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0024] The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.
[0025] The terms used in one or more embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "the" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0026] 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, such 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 referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0027] First, the terms involved in one or more embodiments of the present application are explained.
[0028] Data mining: It is based on disciplines such as machine learning, pattern recognition, statistics, and databases to extract potential information from data and help decision makers solve practical problems.
[0029] Machine learning is a discipline that studies how to improve the performance of a system through computational means and experience. Its main research focuses on algorithms that generate "models" from data on computers, namely "learning algorithms."
[0030] Statistics: Statistics is the science of understanding the quantitative characteristics and quantitative relationships of objective phenomena. It is a methodological science that understands the quantitative regularities of objective phenomena by collecting, organizing, and analyzing statistical data.
[0031] Feature engineering: It is a method of extracting features from raw data to the maximum extent possible for use in models and algorithms, including data preprocessing, feature selection, dimension expansion, feature expansion, etc.
[0032] Video transcoding: Encode videos to achieve video data compression. Common encoding standards include JPEG, MJPEG, H264, H265, AV1, etc.
[0033] Transcoding decision: whether to transcode the video.
[0034] Bandwidth revenue: reduction in bandwidth charges due to video transcoding.
[0035] XGBoost model: It is a gradient boosting decision tree (GBDT). XGBoost is essentially a method based on tree structure and combined with ensemble learning. Its basic tree structure is classification and regression tree (CART).
[0036] 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 are described in detail one by one in the following embodiments.
[0037] See also Figure 1 , Figure 1 This is an exemplary description of a video processing method provided in an embodiment of the present application in a specific application scenario.
[0038] Figure 1 The specific application scenario includes a client 102 and a server 104.
[0039] During specific implementation, a user (such as a video uploader) sends a video to be played to the server 104 via the client 102 .
[0040] After receiving the video to be played, server 104 determines the user of the video to be played, obtains the proportion of videos with more than 10,000 views among all videos of the user, and if the proportion of videos is greater than a preset proportion threshold, transcodes the video to be played and sends 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, and the following embodiment will introduce the specific calculation process.
[0041] If the video's share is less than a preset threshold, data from multiple dimensions of the user is obtained, such as the number of followers, number of reposts, and number of likes. These data dimensions are then processed to obtain the user's features. The user's features are then input into a pre-trained object feature decision model to obtain a label corresponding to the user feature. The video transcoding decision result is determined based on the label. For example, if the label is 0, the video transcoding decision result is not to transcode; if the label is 1, the video transcoding decision result is to transcode. If the video transcoding decision result is to transcode, the video to be played is transcoded and the transcoded video is sent to the client for playback.
[0042] In the case where the decision result of the video is not to transcode, a decision is made on whether to transcode the video based on a preset decision strategy. Specifically, the video is played, and within a preset time period after the video is played (for example, within 48 hours), a video segment is divided every three minutes or five minutes. When the number of views on the next video segment increases by more than 1,000 compared to the number of views on the previous video segment, the video is transcoded, and the video that has been played is supplemented with transcoding; or the playback volume threshold of each video segment, that is, the heat threshold, can be calculated based on statistics. When the number of views on three or four consecutive video segments exceeds the playback volume threshold, the video is transcoded, and the video that has been played is supplemented with transcoding; and the transcoded video is sent to the client for playback.
[0043] If the preset time period ends after the video is played and the video is still not transcoded, the number of views, forwardings, and likes after the video is played within the preset time period is obtained, and the number of views, forwardings, and likes after the video is played are processed to obtain the video playback features after the video is played. The video playback features are input into the pre-trained playback feature decision model to obtain the label corresponding to the playback feature, and the video transcoding decision result is determined based on the label. That is, if the label is 0, the video transcoding decision result is not transcoded; if the label is 1, the video transcoding decision result is transcoded; then, if the video transcoding decision result is transcoded, the video is transcoded, and the already played video is supplemented with transcoding, and the transcoded video is sent to the client for playback.
[0044] The video processing method provided in the embodiment of the present application uses machine learning and statistical methods to implement a transcoding decision scheme consisting of two models and a decision strategy sequence, so as to achieve timely and effective transcoding decisions for videos. Specifically, before the video is played, the multi-dimensional data of the user to whom the video belongs (such as the number of fans, forwarding volume, likes, etc.) and video information (such as the proportion of video playback volume exceeding 10,000, etc.) are used in combination with the first machine learning model (i.e., the object feature decision model) to make 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 within the preset time of video playback (such as 48 hours), the real-time heat data (such as the number of views on the video clip, etc.) is combined with the preset transcoding decision strategy to make a transcoding decision; and when the video is not transcoded by the preset transcoding decision strategy, the data of the video after a few days of playback (such as the number of video views, forwarding volume, likes, etc.) will be used in combination with the playback feature decision model to determine the video transcoding decision result. Since the available data is different due to the different stages of the video, the two models and one decision-making strategy have decreasing timeliness for video transcoding and increasing accuracy for video transcoding. By sequentially executing the two models and one decision-making strategy to decide whether to transcode the video, both the timeliness and accuracy of transcoding can be achieved, so that video transcoding can be carried out in a timely and effective manner, maximizing the difference between benefits and costs.
[0045] See also Figure 2 , Figure 2 A flowchart of a video processing method according to an embodiment of the present application is shown, which specifically includes the following steps:
[0046] Step 202: When the target video is not played, the object features of the target object corresponding to the target video are input into the object feature decision model to obtain a first video decision result.
[0047] The target video can be understood as the aforementioned video to be played, which can be a video of any type, any length, and any format, such as a sports video, an entertainment video, a two-hour movie, and the like.
[0048] 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, wherein the object attribute information includes but is not limited to the number of fans, number of reposts, number of likes, etc.
[0049] In actual applications, there may be some object attribute information that cannot be used directly. For example, a video partition has only one partition number, which itself has no meaning, but the video partition itself may belong to a popular partition or an unpopular partition. If the partition number is directly used as the object feature, the video partition will have no meaning. Therefore, some data processing will be performed on the video partition, and a score will be configured for the video partition to indicate whether the video partition is a popular partition or an unpopular partition, thereby forming a meaningful object feature.
[0050] Therefore, after obtaining the object attribute information of the target object, data processing will be performed on the object attribute information to determine the object features of the target object. Subsequently, the first video decision result can be quickly and accurately obtained based on the object features combined with the object feature decision model. The specific implementation method is as follows:
[0051] The step of inputting the object features of the target object corresponding to the target video into the object feature decision model to obtain the first video decision result includes:
[0052] Obtaining object attribute information of a target object corresponding to the target video;
[0053] Performing data processing on the object attribute information to obtain object features of the target object;
[0054] The object features of the target object are input into an object feature decision model to obtain a first video decision result.
[0055] Among them, the detailed description of the object attribute information of the target object can be found in the above embodiment, which will not be repeated here; the object feature decision model includes but is not limited to the XGBoost model.
[0056] The object attribute information is processed to obtain the object characteristics of the target object. It can be understood that if some object attribute information is used directly as an object characteristic, the 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 handled, such as setting a measurement value for the video partition that can distinguish between hot and cold conditions, so that the object attribute information of the video partition becomes a meaningful object characteristic.
[0057] During specific use, the object features of the target object are input into a pre-trained object feature decision model to obtain the first video decision result of the target video; and in actual applications, the specific application scenarios of the video processing method are different, and the first video decision result is also different. For example, if the video processing method is applied to a video transcoding scenario, the first video decision result can be video transcoding or video not transcoding; if the video processing method is applied to a video fast-forward scenario, the first video decision result can be video fast-forward or video not fast-forward, etc.
[0058] For ease of understanding, the following embodiments are introduced using the video processing method applied to a video transcoding scenario as an example, but the video processing method cannot be limited to other feasible scenarios, such as the video fast-forward scenario introduced above.
[0059] In addition, before using the object feature decision model to decide whether to transcode a video, it is necessary to pre-train the object feature decision model to ensure the speed and accuracy of video transcoding decisions in subsequent applications. The specific implementation method is as follows:
[0060] The training steps of the object feature decision model are as follows:
[0061] The training steps of the object feature decision model are as follows:
[0062] Obtain sample videos, determine the sample object corresponding to each sample video, and the video playback volume;
[0063] determining a training sample according to object attribute information of the sample object;
[0064] Determining a sample label corresponding to the training sample according to the video playback volume;
[0065] The object feature decision model is trained according to the training samples and the sample labels.
[0066] Among them, the sample videos can be understood as multiple videos of any type, any playback duration, and any format that have been played in the 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 as how many times the sample video has been played, that is, how many 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, which can be understood as the number of fans, forwarding volume, likes, etc.
[0067] In 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 samples are determined based on the object attribute information of the sample objects, and the sample labels corresponding to each training sample are determined based on the video playback volume; and then the object feature decision model is trained based on the training samples and training labels.
[0068] Among them, the sample label corresponding to the training sample is determined according to 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 training sample corresponding to the sample label is determined to be 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.
[0069] For example, if the video playback volume corresponding to a sample video is 1,000, then when the preset playback volume threshold is 500, the object attribute information of the sample object corresponding to the sample video can be determined as a training sample, and the sample label determined for the training sample based on the video playback volume corresponding to the sample video is 1, which means that the training sample is a positive sample.
[0070] In actual applications, the object attribute information of sample objects may contain some invalid information. In order to improve the training effect of the object feature decision model, the object attribute information of the sample objects will be processed to achieve feature construction; so that the object feature decision model can be trained based on the constructed more reasonable object features and improve its model accuracy. The specific implementation method is as follows:
[0071] The determining of the training sample according to the object attribute information of the sample object includes:
[0072] performing data processing on the object attribute information of the sample object to obtain the object features of the sample object;
[0073] The object features of the sample objects are determined as training samples.
[0074] The specific implementation method of performing data processing on the attribute information of the sample object to obtain the object characteristics of the sample object can be found in the detailed introduction of the above embodiment and will not be repeated here.
[0075] Specifically, after obtaining the object attribute information of the sample object, the attribute information of the sample object is processed to obtain the object features of the sample object; subsequently, the object features of the sample object can be used as training samples, and then combined with the sample labels of the training samples determined according to the video playback volume, to realize the training of the object feature decision model, so as to improve the use effect of the object feature decision model.
[0076] Before using the object feature decision model, if the target object corresponding to the target video has a relatively high number of historical uploaded videos, then the probability that the target video will be played in large quantities after it is uploaded will be very high. Therefore, before the target video is played, it is possible to first determine whether the video needs to be transcoded based on the historical video data of the target object corresponding to the target video and the current playback status of other videos, so as to avoid the situation where the target video will be played in large quantities after it is launched, resulting in untimely transcoding and affecting the viewing experience.
[0077] For example, from the above training samples, a positive sample video is determined, and then the historical data of the object of the positive sample video under a certain feature is determined, and the feature threshold under this feature is determined; in specific use, the feature of the target object of the target video can be obtained, and this feature can be compared with the feature threshold obtained under the positive sample to determine whether the target video needs to be transcoded. Specifically, the specific method for obtaining the feature threshold is as follows:
[0078] After determining the sample label corresponding to the training sample according to the video playback volume, the method further includes:
[0079] Determining a positive sample video in the sample video according to the sample label;
[0080] Determining a positive sample object corresponding to the positive sample video, and determining target features based on historical video data of the positive sample object;
[0081] A corresponding feature threshold is determined according to the target feature.
[0082] 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 playbacks, etc.; when the target feature is the proportion of videos with more than 10,000 likes, the target feature is determined based on the historical video data of the positive sample object, which can be understood as obtaining the number of likes for each video in all videos historically uploaded by the positive sample object, and determining the proportion of all videos of the positive sample object with more than 10,000 likes based on the number of likes for each video, 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 playbacks, the target feature is determined based on the historical video data of the positive sample object, which can be understood as obtaining the number of playbacks of each video in all videos historically uploaded by the positive sample object, and determining the proportion of all videos of the positive sample object with more than 10,000 playbacks based on the number of playbacks of each video, that is, the proportion of videos with more than 10,000 playbacks.
[0083] Specifically, taking the target feature as the percentage of videos with over 10,000 views, determining the corresponding feature threshold based on the target feature can be understood as obtaining the percentage of videos with over 10,000 views for all positive sample objects, determining its mean, minimum, maximum, and other statistics; training the weights of each statistic, and finally taking the weighted sum of each statistic to obtain the final threshold (i.e., the feature threshold). In practical applications, training weights involves traversing the parameter combinations of weights and testing them on the test set to obtain a set of weight values. For example, to train the weights for the minimum and mean values, assuming a step size of 0.1, the parameter combinations are 0.1, 0.9; 0.2, 0.8; 0.3, 0.7, etc.
[0084] In the embodiment of this specification, the percentage of videos with over 10,000 views or over 10,000 likes in the history of all videos of the uploader of the currently known transcoded video is obtained; then, the corresponding feature threshold is calculated based on the percentage of videos with over 10,000 views or the percentage of videos with over 10,000 likes for each uploader; then, when determining whether the target video needs to be transcoded, the percentage of videos with over 10,000 views or over 10,000 likes of the uploader corresponding to the target video can be compared with the corresponding feature threshold to quickly determine whether the target video needs to be transcoded. The specific implementation method is as follows:
[0085] Before inputting the object feature of the target object into the object feature decision model to obtain the first video decision result, the method further includes:
[0086] Determining a target feature of a target object corresponding to the target video and a feature value of the target feature;
[0087] Obtaining a fourth video decision result according to the characteristic value of the target characteristic and the correlation relationship with the characteristic threshold;
[0088] In a case where the fourth video decision result meets a decision condition, video processing is performed on the target video according to the fourth video decision result.
[0089] Among them, the target feature of the target object is the same as the target feature obtained by the feature threshold mentioned above. 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 feature value of the target feature is the specific proportion ratio.
[0090] Specifically, when the target video is not played, the target feature of the target object corresponding to the target video and the feature value of the target feature are obtained, that is, the proportion of video playback volume exceeding 10,000 and the ratio of the proportion; the ratio of the proportion of video playback volume exceeding 10,000 is compared with the feature threshold obtained above, and the fourth video decision result is obtained according to the specific comparison result, that is, whether the video is transcoded or not; finally, when it is determined that the fourth video decision result is transcoding, it is determined that the fourth video decision result meets the decision condition; at this time, the target video can be transcoded according to the fourth video decision result.
[0091] In practical applications, the fourth video decision result is obtained based on the characteristic value of the target feature and the correlation with the characteristic threshold. It can be understood that the characteristic value of the target feature is compared with the characteristic threshold. When the characteristic value of the target feature is greater than or equal to the characteristic threshold, the fourth video decision result is determined to be video transcoding; when the characteristic value of the target feature is less than the characteristic threshold, the fourth video decision result is determined to be video not transcoding.
[0092] For example, the feature threshold is 70%, and the ratio of the number of videos exceeding 10,000 is 75%. By comparing the ratio of the number of videos exceeding 10,000 of 75% with the feature threshold of 70% obtained above, it can be determined that the ratio of the number of videos exceeding 10,000 is greater than the feature threshold. At this time, it can be determined that the fourth video decision result is video transcoding.
[0093] In the embodiments of this specification, in order to ensure the timeliness of transcoding of the target video, before the target video is transcoded, a comparison can be made between the target features of the target object corresponding to the target video and the feature threshold calculated based on the target features of historical transcoded videos, so as to quickly decide whether to transcode the target video. This is so that when the target object's historical video playback volume exceeds 10,000 and accounts for a large proportion, it is assumed that the target video uploaded by the target object has a high probability of being played in large quantities in the future, so that it can be directly transcoded and played, thereby improving its transcoding timeliness and subsequent video playback revenue.
[0094] Step 204: If the decision result of the first video does not meet the decision condition, play the target video.
[0095] Specifically, the specific application scenarios of the video processing method provided in the embodiments of this specification are different, the first video decision results are different, and the content for judging whether the first video decision result meets the decision conditions is also different; for example, the video processing method is applied to a video transcoding scenario, and the first video decision result can be understood as the video transcoding or non-video transcoding introduced in the above embodiment, and the corresponding video decision condition can be understood as the video transcoding condition; if the video processing method is applied to a video recommendation scenario, the first video decision result can be understood as video recommendation or non-video recommendation, and the corresponding video decision condition can be understood as the video recommendation condition, etc.
[0096] 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 video data of the target video is played without transcoding.
[0097] In the case where the first video decision result is video transcoding, it can be determined that the first video decision result meets the decision condition; at this time, the target video is directly transcoded and the transcoded target video is played.
[0098] Step 206: Determine a second video decision result according to a preset video processing strategy within the target playback time period.
[0099] Among them, the target playback time period can be set according to actual application, and the embodiment of the present application does not impose any restrictions on this; for example, the target playback time period is set to 48 hours or 50 hours, etc.
[0100] In addition, the preset video processing strategy can also be set according to the actual application. For example, the video can be segmented and whether the video needs to be transcoded can be determined based on the playback volume of the segmented video; or whether the video needs to be transcoded can be determined based on the overall playback volume or likes of all videos played within the target playback time period.
[0101] In the embodiment of the present application, the video is segmented and the need for transcoding is determined based on the playback volume of the segmented video as a preset video processing strategy. The second video decision result determined according to the preset video processing strategy within the target playback time period is described in detail. The specific implementation method is as follows:
[0102] Determining the second video decision result according to the preset video processing strategy includes:
[0103] At least two video segments are obtained according to a preset division rule, and a second video decision result is determined according to the playback volume of the at least two video segments.
[0104] The preset division rule can be set according to actual application, and the present embodiment does not impose any limitation thereon. For example, the preset division rule is to divide a video segment into three minutes or five minutes.
[0105] For ease of understanding, the following embodiments are specifically described by taking the preset division rule of dividing a video segment every three minutes as an example.
[0106] In specific implementation, the target video is played and divided into a video segment every three minutes. When at least two video segments are divided, the second video decision result is determined according to the playback volume of the at least two divided video segments.
[0107] The video processing method provided in the embodiment of the present application can obtain at least two video segments according to preset division rules when the target video starts to play. Subsequently, the second video decision result can be quickly determined based on the playback volume of the at least two divided video segments to ensure the timely transcoding of the target video.
[0108] After dividing at least two video segments, there are at least two specific implementation methods for determining the second video decision result based on the playback volume of the at least two divided video segments. One method is to compare the playback volume of two adjacent video segments and quickly determine the second video decision result based on the growth of the playback volume. The specific implementation methods are as follows:
[0109] The determining of the second video decision result according to the playback amounts of the at least two video clips includes:
[0110] Determining a difference in playback volume between any two adjacent video segments of the at least two video segments;
[0111] The second video decision result is determined based on the correlation between the playback volume difference and the difference threshold.
[0112] The difference threshold can be set according to actual application, for example, the difference threshold is 500 or 1000.
[0113] If the at least two video segments include video segment 1, video segment 2, and video segment 3, any two adjacent video segments can be understood as video segment 1 and video segment 2, or video segment 2 and video segment 3.
[0114] Then, after determining any two adjacent video segments, the difference in playback volume between the two adjacent video segments is calculated; for example, any two adjacent video segments include video segment 1 and video segment 2, where the playback volume of video segment 1 is 100 and the playback volume of video segment 2 is 1100, then the difference in playback volume between video segment 1 and video segment 2 is 1000; finally, based on the correlation between the playback volume difference and the preset difference threshold, the second video decision result is quickly determined to ensure the timeliness of video transcoding.
[0115] In a specific implementation, determining the second video decision result according to the correlation between the playback volume difference and the difference threshold includes:
[0116] If the playback amount difference is greater than or equal to the difference threshold, determining the second video decision result as video transcoding; or
[0117] When the playback amount difference is less than the difference threshold, the second video decision result is determined to be that the video is not transcoded.
[0118] Continuing with the above example, taking the playback volume difference of 1000 and the difference threshold of 1000 as an example, it can be determined that the playback volume difference of 1000 is equal to the difference threshold of 1000, and then it can be determined that the second video decision result is video transcoding; and if the playback volume difference is 900 and the difference threshold is 1000, then it can be determined that the playback volume difference of 900 is less than the difference threshold of 1000, and then it can be determined that the second video decision result is video not transcoded.
[0119] In actual applications, when the target video starts playing, a video segment can be divided every three minutes, and the current playback volume of the video segment can be obtained. After dividing the second video segment and obtaining the current playback volume of the video segment, if it is determined that the second video segment has a larger increase than the first video segment, the target video can be transcoded; and so on, real-time playback can be achieved and video transcoding judgment can be made in a timely manner.
[0120] In the video processing method provided in the embodiment of the present application, the second video decision result can be quickly and accurately determined based on the correlation between the difference in the playback volume of any two adjacent video clips and the difference threshold during the playback of the target video; that is, when the playback volume of the latter video clip increases significantly compared to 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, and at this time, the target video can be transcoded.
[0121] Alternatively, the playback volume of a preset number of consecutive video clips can be compared with the calculated popularity threshold, and the second video decision result can be quickly determined based on the relationship between the playback volume and the popularity threshold. The specific implementation method is as follows:
[0122] The determining of the second video decision result according to the playback amounts of the at least two video clips includes:
[0123] Determining a playback volume of each of the at least two video segments;
[0124] Determining a popularity threshold of the at least two video clips according to the playback volume of each video clip;
[0125] A second video decision result is determined based on the playback volume of each video segment in the at least two video segments and the heat threshold.
[0126] The at least two video segments in the embodiment of the present application can be understood as all video segments divided according to a preset division rule within the target playback time period.
[0127] After obtaining the number of views for each video clip, the popularity threshold for the target playback time period can be calculated based on the number of views for all video clips. Specifically, the calculation method for this popularity threshold is the same as the characteristic threshold calculation method described above, so it will not be repeated here. For example, the minimum or average number of views for the video clips within the target playback time period can be obtained, and the final popularity threshold can be calculated using the above method.
[0128] After determining the popularity threshold of at least two video segments based on the number of views of each video segment, the second video decision result can be quickly determined based on the number of views of the at least two video segments and the popularity threshold. The specific implementation method is as follows:
[0129] The determining the second video decision result according to the playback volume of each video segment in the at least two video segments and the heat threshold includes:
[0130] Obtaining a preset number of consecutive video segments from the at least two video segments;
[0131] Determining the playback amount of each video segment in the continuous video segments;
[0132] The second video decision result is determined based on the playback volume of each video segment in the continuous video segments and the correlation relationship between the heat threshold.
[0133] The preset number can be set according to actual application, for example, the preset number can be set to 2, 3 or 4.
[0134] Taking the preset number of 2 as an example, in the specific implementation, 2 consecutive video clips are obtained from at least two video clips, and the playback volume of each video clip in the two consecutive video clips is determined; then, based on the correlation between the playback volume of each video clip in the two consecutive video clips and the heat threshold, the second video decision result is determined.
[0135] Still using the above example, two consecutive video clips include video clip 1 and video clip 2, where the playback volume of video clip 1 is 100, the playback volume of video clip 2 is 1100, and the heat threshold is 800. Then, based on the correlation between the playback volume of video clip 1 100, the playback volume of video clip 2 1100, and the heat threshold 800, the second video decision result can be quickly obtained.
[0136] The specific implementation method of determining the second video decision result based on the playback volume of each video segment in the continuous video segments and the heat threshold is as follows:
[0137] The determining of the second video decision result according to the playback volume of each video segment in the continuous video segments and the correlation between the heat thresholds includes:
[0138] When the playback amount of each video segment in the continuous video segments is greater than or equal to the heat threshold, determining the second video decision result as video transcoding; or
[0139] When the playback amount of any one of the continuous video segments is less than the heat threshold, the second video decision result is determined to be that the video is not transcoded.
[0140] Using the above example, if the number of views of video clip 1 is 1000, the number of views of video clip 2 is 1500, and the popularity threshold is 800;
[0141] Then, by comparing the playback volume of each video segment in the continuous video segment with the heat threshold, it can be determined that the playback volume of video segment 1 (1000) and the playback volume of video segment 2 (1500) in the continuous video segment are both greater than or equal to the heat threshold of 800. In this case, the second video decision result can be determined to be video transcoding. If either or both of video segments 1 and 2 are less than the heat threshold of 800, the second video decision result can be determined to be video non-transcoding.
[0142] Step 208: When the second video decision result satisfies the decision condition, perform video processing on the target video.
[0143] In specific implementation, the specific application scenarios of the video processing method provided in the embodiment of the present application are different, and the processing content of the video processing performed on the target video is also different; for example, when the video processing method provided in the embodiment of the present application is applied to a video transcoding scenario, when the second video decision result meets the decision condition, the video processing of the target video includes:
[0144] In a case where the second video decision result is video transcoding, it is determined that the second video decision result meets the decision condition, and transcoding processing is performed on the target video.
[0145] Then, when the decision condition is a video transcoding condition, after determining the second video decision result in the above manner, if the second video decision result is video transcoding, it can be determined that the second video decision result meets the video transcoding condition, and the target video can be transcoded at this time.
[0146] The video processing method provided in the embodiment of the present application makes a video transcoding decision in advance before the target video is played, based on the object features of the target object corresponding to the target video, combined with a pre-trained object feature decision model; and when the video transcoding decision is that the video is not transcoded, after the target video is played, the video transcoding decision is made again through a preset video processing strategy to solve the resource waste caused by transcoding all target videos, and when it is determined that the video needs 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.
[0147] If the second video decision result does not meet the decision conditions, in order to maximize the difference between bandwidth benefits and computing power and storage costs under limited resources, after the target video has been played for a period of time, it will be determined again based on the playback status of the target video that has been played to determine whether the target video is worth transcoding and whether video transcoding is required. The specific implementation method is as follows:
[0148] After determining the second video decision result according to the preset video processing strategy, the method further includes:
[0149] When the target playback time period ends and the second video decision result does not meet the decision condition, obtaining the video playback characteristics of the target video within the preset playback time;
[0150] Inputting the video playback feature into a playback feature decision model to obtain a third video decision result;
[0151] In a case where the third video decision result meets the decision condition, video processing is performed on the target video.
[0152] The preset playback time can be set based on time and can be greater than or equal to the target playback time period. For example, if the target playback time period is 48 hours, the preset playback time can be 50 hours or 60 hours. The playback feature decision model is a pre-trained machine learning model, including but not limited to an XGBoost model. The specific training process is described in detail below regarding the playback feature decision model training.
[0153] Taking the target playback time period of 48 hours and the preset playback time of 50 hours as an example, when the target playback time period ends and the second video decision result does not meet the decision condition, the video playback characteristics of the target video within the preset playback time are obtained. It can be understood that within 48 hours of the playback of the target video, if the second video decision result obtained by any of the above-mentioned preset video processing strategies still does not meet the decision condition, the target video continues to be played, and when the target video is played for 50 hours, the video playback characteristics of the target video within these 50 hours of playback are obtained.
[0154] In order to ensure the accuracy of the video playback features and the rapid identification of the subsequent playback feature decision model, the video playback features are obtained by data processing based on the video playback attribute information of the target video within the preset playback time period. The specific implementation method is as follows:
[0155] The acquiring of the video playback feature of the target video within the preset playback time period includes:
[0156] Obtaining video playback attribute information of the target video within the preset playback time period;
[0157] Data processing is performed on the video playback attribute information to obtain the video playback characteristics of the target video.
[0158] The video playback attribute information includes but is not limited to the number of views, forwardings, and likes of the target video after it is broadcast.
[0159] In actual 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 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 repeated here.
[0160] Specifically, after obtaining the video playback features of the target video, the video playback features can be input into the playback feature decision model to obtain a third video decision result; when the third video decision result meets the decision conditions, the target video can be processed; for example, the video can be transcoded.
[0161] In actual applications, since the video decision results obtained through the preset video processing strategy and playback feature decision model are all after the target video is played, if the video decision result obtained is video transcoding, in order to avoid omissions in video transcoding, when the target video that has not been played is transcoded according to the video decision result, the target video that has been played before the video transcoding is determined will also be supplemented and transcoded.
[0162] In the embodiments of this specification, when the first video decision result obtained by the above-mentioned object feature decision model and the second video decision result obtained according to the preset video processing strategy do not meet the video transcoding conditions, in order to maximize the difference between bandwidth benefits and computing power and storage costs under limited resources, after the target video is played for a period of time, it will be judged again based on the playback status of the target video that has been played whether the target video has transcoding value and whether video transcoding is required to ensure that the target video can be accurately and timely transcoded.
[0163] Before using the playback feature decision model, the playback feature decision model will be pre-trained to improve the accuracy and effectiveness of the playback feature decision model's results. The specific training method of the playback feature decision model is as follows:
[0164] The training steps of the playback feature decision model are as follows:
[0165] Obtain sample videos and determine video playback attribute information corresponding to each sample video;
[0166] Determining a training sample based on video playback attribute information corresponding to the sample video;
[0167] Determining a sample label corresponding to the training sample according to the video playback amount in the video playback attribute information;
[0168] The playback feature decision model is trained according to the training samples and the sample labels.
[0169] For a detailed introduction to the sample videos and the video playback attribute information corresponding to each sample video, please refer to the above embodiments.
[0170] Furthermore, during the training of the playback feature decision model, in order to improve the training effect of the playback feature decision model, data processing of the video playback attribute information is also performed to obtain the video playback features of standard sample videos and train the playback feature decision model. The specific implementation method is as follows:
[0171] The determining of the training sample according to the video playback attribute information corresponding to the sample video includes:
[0172] Performing data processing on the video playback attribute information corresponding to the sample video to obtain the video playback characteristics of the sample video;
[0173] The video playback features of the sample video are determined as training samples.
[0174] In 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 repeated here.
[0175] The video processing method provided in the embodiment of the present application makes a video transcoding decision in advance before the target video is played through the object features of the target object corresponding to the target video, combined with a pre-trained object feature decision model; and in a case where the video transcoding decision is that the video is not transcoded, after the target video is played, the video transcoding decision can be determined again within the target playback time period through a preset video processing strategy, and in a case where the video transcoding decision determined according to the preset video processing strategy is that the video is not transcoded, after the target video is played for a period of time, the video transcoding decision will be further determined based on the playback status of the played video in combination with the playback feature decision model; so as to solve the waste of resources caused by transcoding all target videos, and when it is determined that the video needs 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.
[0176] The following combined Figure 3 , taking the application of the video processing method provided by this application in the video transcoding scenario as an example, the video processing method is further explained. Figure 3 A processing flow chart of a video processing method applied to a video transcoding scenario provided by an embodiment of the present application is shown, which specifically includes the following steps:
[0177] Step 302: Obtain the video to be transcoded.
[0178] Step 304: Determine the uploader of the video to be transcoded and obtain the uploader's historical video playback volume.
[0179] Step 306: Determine the percentage of the uploader's video playbacks exceeding 10,000 based on the uploader's historical video playback volume.
[0180] Step 308: Determine whether the percentage of the uploader's video playback volume exceeding 10,000 is greater than or equal to a preset percentage threshold. If so, execute step 310; if not, execute step 312.
[0181] The preset ratio threshold is the same as the characteristic threshold in the above embodiment and will not be described again here.
[0182] Step 310: Video transcoding.
[0183] Step 312: Obtain the object features of the uploader, input the object features of the uploader into a first machine learning model, and obtain a first video transcoding result of the video to be transcoded.
[0184] Step 314: Determine whether the first video transcoding result meets the transcoding condition. If so, execute step 310; if not, execute step 316.
[0185] Among them, the method of obtaining the object features of the uploader is the same as the method of obtaining the object features of the target object in the above embodiment; the first machine learning model can be understood as the object feature decision model in the above embodiment.
[0186] Step 316: Play the video to be transcoded, and determine a second video transcoding result according to a preset video transcoding strategy within the target playback time period.
[0187] The preset video transcoding strategy may be understood as the preset video processing strategy in the above embodiment.
[0188] Step 318: Determine whether the second video transcoding result meets the transcoding condition. If so, execute step 320; if not, execute step 322.
[0189] Step 320: Video transcoding and supplementary transcoding.
[0190] Specifically, when the second video transcoding result meets the transcoding condition, 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.
[0191] Step 322: within the preset playback time period of the video to be transcoded, obtain the video playback features of the video to be transcoded within the preset playback time period, and input the video playback features into the second machine learning model to obtain a third video transcoding result.
[0192] Among them, the method for obtaining the video playback features of the video to be transcoded is the same as the method for obtaining 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.
[0193] Step 324: Determine whether the third video transcoding result meets the transcoding condition. If so, execute step 320; if not, end.
[0194] The video processing method provided in the embodiment of the present application analyzes historical data related to the video through machine learning models and statistical methods, accurately determines whether the video has transcoding value, realizes effective transcoding of the video, and maximizes the difference between bandwidth benefits and computing power and storage costs under limited resources. Specifically, using multiple data sources, data analysis is performed through machine learning models and statistical methods, and a transcoding decision strategy and a transcoding decision model (first machine learning model) are designed to make a video transcoding decision in advance before the video is opened. After the video is opened (played), another transcoding decision strategy and a transcoding decision model are used to supplement the video transcoding in time, thereby realizing timely and effective video transcoding, and avoiding unnecessary video transcoding to waste resources. At the same time, videos with transcoding value are identified as early as possible, ultimately maximizing the difference between benefits and costs. That is, the video processing method provided in the present application can be used to perform data analysis through machine learning models and statistical methods, design multiple transcoding decision strategies and transcoding decision models, make a video transcoding decision in advance before the video is opened, and supplement the decision in time after the video is opened, thereby realizing timely and effective video transcoding.
[0195] Corresponding to the above method embodiment, the present application also provides a video processing device embodiment, Figure 4 FIG. 1 shows a schematic diagram of the structure of a video processing device provided by an embodiment of the present application. Figure 4 As shown, the device includes:
[0196] The first result obtaining module 402 is configured to input the object features of the target object corresponding to the target video into the object feature decision model to obtain a first video decision result when the target video is not played;
[0197] The video playing module 404 is configured to play the target video if the first video decision result does not meet the decision condition;
[0198] The second result obtaining module 406 is configured to determine a second video decision result according to a preset video processing strategy within the target playback time period;
[0199] The video processing module 408 is configured to perform video processing on the target video if the second video decision result meets the decision condition.
[0200] Optionally, the device further includes:
[0201] The third result obtaining module is configured to:
[0202] When the target playback time period ends and the second video decision result does not meet the decision condition, obtaining the video playback characteristics of the target video in the preset playback time period;
[0203] Inputting the video playback feature into a playback feature decision model to obtain a third video decision result;
[0204] In a case where the third video decision result meets the decision condition, video processing is performed on the target video.
[0205] Optionally, the third result obtaining module is further configured to:
[0206] Obtaining video playback attribute information of the target video within the preset playback time period;
[0207] Data processing is performed on the video playback attribute information to obtain the video playback characteristics of the target video.
[0208] Optionally, the second result obtaining module 406 is further configured to:
[0209] At least two video segments are obtained according to a preset division rule, and a second video decision result is determined according to the playback volume of the at least two video segments.
[0210] Optionally, the second result obtaining module 406 is further configured to:
[0211] Determining a difference in playback volume between any two adjacent video segments of the at least two video segments;
[0212] The second video decision result is determined based on the correlation between the playback volume difference and the difference threshold.
[0213] Optionally, the second result obtaining module 406 is further configured to:
[0214] If the playback amount difference is greater than or equal to the difference threshold, determining the second video decision result as video transcoding; or
[0215] When the playback amount difference is less than the difference threshold, the second video decision result is determined to be that the video is not transcoded.
[0216] Optionally, the second result obtaining module 406 is further configured to:
[0217] Determining a playback volume of each of the at least two video segments;
[0218] Determining a popularity threshold of the at least two video clips according to the playback volume of each video clip;
[0219] A second video decision result is determined based on the playback volume of each video segment in the at least two video segments and the heat threshold.
[0220] Optionally, the second result obtaining module 406 is further configured to:
[0221] Obtaining a preset number of consecutive video segments from the at least two video segments;
[0222] Determining the playback amount of each video segment in the continuous video segments;
[0223] The second video decision result is determined based on the playback volume of each video segment in the continuous video segments and the correlation relationship between the heat threshold.
[0224] Optionally, the second result obtaining module 406 is further configured to:
[0225] When the playback amount of each video segment in the continuous video segments is greater than or equal to the heat threshold, determining the second video decision result as video transcoding; or
[0226] When the playback amount of any one of the continuous video segments is less than the heat threshold, the second video decision result is determined to be that the video is not transcoded.
[0227] Optionally, the video processing module 408 is further configured to:
[0228] In a case where the second video decision result is video transcoding, it is determined that the second video decision result meets the decision condition, and transcoding processing is performed on the target video.
[0229] Optionally, the device further includes:
[0230] A first model training module is configured to: train the object feature decision model;
[0231] The training steps of the object feature decision model are as follows:
[0232] Obtain sample videos, determine the sample object corresponding to each sample video, and the video playback volume;
[0233] determining a training sample according to object attribute information of the sample object;
[0234] Determining a sample label corresponding to the training sample according to the video playback volume;
[0235] The object feature decision model is trained according to the training samples and the sample labels.
[0236] Optionally, the first model training module is further configured to:
[0237] performing data processing on the object attribute information of the sample object to obtain the object features of the sample object;
[0238] The object features of the sample objects are determined as training samples.
[0239] Optionally, the device further includes:
[0240] The feature threshold acquisition module is configured as follows:
[0241] Determining a positive sample video in the sample video according to the sample label;
[0242] Determining a positive sample object corresponding to the positive sample video, and determining target features based on historical video data of the positive sample object;
[0243] A corresponding feature threshold is determined according to the target feature.
[0244] Optionally, the device further includes:
[0245] The fourth result obtaining module is configured to:
[0246] Determining a target feature of a target object corresponding to the target video and a feature value of the target feature;
[0247] Obtaining a fourth video decision result according to the characteristic value of the target characteristic and the correlation relationship with the characteristic threshold;
[0248] In a case where the fourth video decision result meets a decision condition, video processing is performed on the target video according to the fourth video decision result.
[0249] Optionally, the first result obtaining module 402 is further configured to:
[0250] Obtaining object attribute information of a target object corresponding to the target video;
[0251] Performing data processing on the object attribute information to obtain object features of the target object;
[0252] The object features of the target object are input into an object feature decision model to obtain a first video decision result.
[0253] Optionally, the device further includes:
[0254] A second model training module is configured to: train the playback feature decision model;
[0255] The training steps of the playback feature decision model are as follows:
[0256] Obtain sample videos and determine video playback attribute information corresponding to each sample video;
[0257] Determining a training sample based on video playback attribute information corresponding to the sample video;
[0258] Determining a sample label corresponding to the training sample according to the video playback amount in the video playback attribute information;
[0259] The playback feature decision model is trained according to the training samples and the sample labels.
[0260] Optionally, the second model training module is further configured to:
[0261] Performing data processing on the video playback attribute information corresponding to the sample video to obtain the video playback characteristics of the sample video;
[0262] The video playback features of the sample video are determined as training samples.
[0263] The video processing device provided in the embodiment of the present application makes a video transcoding decision in advance before the target video is played, based on the object features of the target object corresponding to the target video, combined with a pre-trained object feature decision model; and when the video transcoding decision is that the video is not transcoded, after the target video is played, the video transcoding decision is made again through a preset video processing strategy to solve the resource waste caused by transcoding all target videos, and when it is determined that the video needs 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.
[0264] The above is a schematic scheme of a video processing device of this embodiment. It should be noted that the technical scheme of the video processing device and the technical scheme of the above-mentioned video processing method are based on the same concept. For details not described in detail in the technical scheme of the video processing device, please refer to the description of the technical scheme of the above-mentioned video processing method.
[0265] Figure 5 The block diagram of a computing device 500 according to one embodiment of the present disclosure is shown. Components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.
[0266] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)), whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0267] In one embodiment of the present specification, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 5 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed.
[0268] Computing device 500 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. Computing device 500 can also be a mobile or stationary server.
[0269] When the processor 520 executes the instructions, the steps of the video processing method are implemented.
[0270] The above is a schematic solution of a computing device of 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 are of the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above-mentioned video processing method.
[0271] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the video processing method described above.
[0272] The above is a schematic solution of a computer-readable storage medium of 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 are based on the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-mentioned video processing method.
[0273] The foregoing description describes 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 an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0274] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0275] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0276] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0277] The preferred embodiments of the present application disclosed above are intended only to help illustrate the present application. The optional embodiments do not describe all details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of this application. This application selects and describes these embodiments in detail 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
1. A video processing method, characterized in that: include: In a case where the target video is not played, inputting the object features of the target object corresponding to the target video into the object feature decision model to obtain a first video decision result; If the decision result of the first video does not meet the decision condition, playing the target video; Determine the second video decision result according to the preset video processing strategy within the target playback time period; When the second video decision result satisfies the decision condition, performing video processing on the target video; 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, obtaining the video playback characteristics of the target video in the preset playback time period; Inputting the video playback feature into a playback feature decision model to obtain a third video decision result; In a case where the third video decision result meets the decision condition, video processing is performed on the target video.
2. The video processing method according to claim 1, wherein: The acquiring of the video playback characteristics of the target video within the preset playback time period includes: Obtaining video playback attribute information of the target video within the preset playback time period; Data processing is performed on the video playback attribute information to obtain the video playback characteristics of the target video.
3. The video processing method according to claim 1, wherein: Determining the second video decision result according to the preset video processing strategy includes: At least two video segments are obtained according to a preset division rule, and a second video decision result is determined according to the playback volume of the at least two video segments.
4. The video processing method according to claim 3, wherein: The determining of the second video decision result according to the playback amounts of the at least two video clips includes: Determining a difference in playback volume between any two adjacent video segments of the at least two video segments; The second video decision result is determined based on the correlation between the playback volume difference and the difference threshold.
5. The video processing method according to claim 4, characterized in that: The determining of the second video decision result according to 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, determining the second video decision result as video transcoding; or When the playback amount difference is less than the difference threshold, the second video decision result is determined to be that the video is not transcoded.
6. The video processing method according to claim 3, wherein: The determining of the second video decision result according to the playback amounts of the at least two video clips includes: Determining a playback volume of each of the at least two video segments; Determining a popularity threshold of the at least two video clips according to the playback volume of each video clip; A second video decision result is determined based on the playback volume of each video segment in the at least two video segments and the heat threshold.
7. The video processing method according to claim 6, characterized in that: The determining the second video decision result according to the playback volume of each video segment in the at least two video segments and the heat threshold includes: Obtaining a preset number of consecutive video segments from the at least two video segments; Determining the playback amount of each video segment in the continuous video segments; The second video decision result is determined based on the playback volume of each video segment in the continuous video segments and the correlation relationship between the heat threshold.
8. The video processing method according to claim 7, wherein: The determining of the second video decision result according to the playback volume of each video segment in the continuous video segments and the correlation between the heat thresholds includes: When the playback amount of each video segment in the continuous video segments is greater than or equal to the heat threshold, determining the second video decision result as video transcoding; or When the playback amount of any one of the continuous video segments is less than the heat threshold, the second video decision result is determined to be that the video is not transcoded.
9. The video processing method according to claim 5 or 8, characterized in that: The step of performing video processing on the target video when the second video decision result satisfies the decision condition includes: In a case where the second video decision result is video transcoding, it is determined that the second video decision result meets the decision condition, and transcoding processing is performed on the target video.
10. The video processing method according to claim 1, wherein: The training steps of the object feature decision model are as follows: Obtain sample videos, determine the sample object corresponding to each sample video, and the video playback volume; determining a training sample according to object attribute information of the sample object; Determining a 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.
11. The video processing method according to claim 10, wherein: The determining of the training sample according to the object attribute information of the sample object includes: performing data processing on the object attribute information of the sample object to obtain the object features of the sample object; The object features of the sample objects are determined as training samples.
12. The video processing method according to claim 11, wherein: After determining the sample label corresponding to the training sample according to the video playback volume, the method further includes: Determining a positive sample video in the sample video according to the sample label; Determining a positive sample object corresponding to the positive sample video, and determining target features based on historical video data of the positive sample object; A corresponding feature threshold is determined according to the target feature.
13. The video processing method according to claim 12, wherein: Before inputting the object feature of the target object into the object feature decision model to obtain the first video decision result, the method further includes: Determining a target feature of a target object corresponding to the target video and a feature value of the target feature; Obtaining a fourth video decision result according to the characteristic value of the target characteristic and the correlation relationship with the characteristic threshold; In a case where the fourth video decision result meets a decision condition, video processing is performed on the target video according to the fourth video decision result.
14. The video processing method according to claim 1, wherein: The step of inputting the object features of the target object corresponding to the target video into the object feature decision model to obtain the first video decision result includes: Obtaining object attribute information of a target object corresponding to the target video; Performing data processing on the object attribute information to obtain object features of the target object; The object features of the target object are input into an object feature decision model to obtain a first video decision result.
15. The video processing method according to claim 1, wherein: The training steps of the playback feature decision model are as follows: Obtain sample videos and determine video playback attribute information corresponding to each sample video; Determining a training sample based on video playback attribute information corresponding to the sample video; Determining a 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.
16. The video processing method according to claim 15, characterized in that: The determining of the training sample according to the video playback attribute information corresponding to the sample video includes: Performing 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 features of the sample video are determined as training samples.
17. A video processing device, characterized in that: include: A first result obtaining module is configured to input the object features of the target object corresponding to the target video into the object feature decision model to obtain a first video decision result when the target video is not played; a video playing module, configured to play the target video if the decision result of the first video does not meet the decision condition; A second result obtaining module is configured to determine a second video decision result according to a preset video processing strategy within a target playback time period; a video processing module, configured to perform video processing on the target video if the second video decision result meets the decision condition; The video processing device further includes a playback feature decision module, which is used to: When the target playback time period ends and the second video decision result does not meet the decision condition, obtaining the video playback characteristics of the target video in the preset playback time period; Inputting the video playback feature into a playback feature decision model to obtain a third video decision result; In a case where the third video decision result meets the decision condition, video processing is performed on the target video.
18. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein: When the processor executes the instructions, the steps of the video processing method according to any one of claims 1 to 16 are implemented.
19. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by the processor, the steps of the video processing method according to any one of claims 1 to 16 are implemented.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the video processing method according to any one of claims 1 to 16 are implemented.
Citation Information
Patent Citations
Video processing method and device, computer equipment and storage medium
CN111565316A
Method and device for recommending short video information
CN112214678A
Video processing method and device, electronic equipment and storage medium
CN113962417A
Video transcoding method and device, equipment and storage medium
CN117156147A