Bullet screen data capacity prediction method and device, electronic equipment and storage medium
By predicting the number of barrages and data capacity of video files, the problem of predicting the data capacity of video barrage is solved, storage and transmission management are optimized, and management efficiency is improved.
Patent Information
- Application Number
- CN202411131106.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-13
AI Technical Summary
The prior art is difficult to accurately predict the video barrage data capacity, resulting in inefficiency of system administrators in storage and transmission management.
By obtaining the video feature information of the target video file, and using the pre-trained barrage number prediction model, combining user behavior characteristics and video characteristics, predicting the barrage number and data capacity, the predicted barrage data capacity of the video file is determined.
It realizes accurate prediction of the data capacity of video barrage, helps system administrators optimize storage and transmission, and improves data processing efficiency and management level.
Smart Images

Figure CN119135996A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of video bullet screen processing, and in particular to a bullet screen data capacity prediction method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of Internet technology, bullet comments have become increasingly popular on video sharing platforms and social media as a unique form of interaction. The prediction and management of bullet comment data capacity (memory capacity occupied by bullet comments) can help system administrators optimize bullet comment storage and transmission. Accurately predicting the bullet comment data capacity of newly launched videos is of great significance. Therefore, a technical solution is needed to accurately predict the bullet comment data capacity of videos. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for predicting the data capacity of a bullet screen, so as to accurately predict the data capacity of a bullet screen in the future and provide a reliable basis for decision-making for system administrators. The specific technical solution is as follows:
[0004] In a first aspect of the implementation of the present application, a method for predicting the data capacity of a bullet message is first provided, comprising:
[0005] Obtain target video feature information of a target video file;
[0006] The target video feature information is processed based on a pre-trained bullet-screen quantity prediction model to obtain predicted bullet-screen quantity information of the target video file, wherein the bullet-screen quantity prediction model is trained based on user behavior features and video features associated with bullet-screen during historical playback of the video file;
[0007] Based on the predicted bullet screen quantity information and the pre-acquired bullet screen text length, the predicted bullet screen data capacity of the target video file is determined.
[0008] In a second aspect of the implementation of the present application, a device for predicting the capacity of bullet screen data is provided, comprising:
[0009] A target video feature acquisition module is used to acquire target video feature information of a target video file;
[0010] A barrage quantity information acquisition module is used to process the target video feature information based on a pre-trained barrage quantity prediction model to obtain the predicted barrage quantity information of the target video file, wherein the barrage quantity prediction model is trained based on user behavior characteristics and video characteristics associated with barrages during historical playback of video files;
[0011] The barrage data capacity determination module is used to determine the predicted barrage data capacity of the target video file based on the predicted barrage quantity information and the pre-acquired barrage text length.
[0012] In another aspect of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0013] Memory, used to store computer programs;
[0014] The processor is used to implement any of the above-mentioned methods for predicting the capacity of barrage data when executing a program stored in the memory.
[0015] In another aspect of the implementation of the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes any of the above-mentioned methods for predicting the capacity of barrage data.
[0016] In another aspect of the implementation of the present application, there is also provided a computer program product comprising instructions, on which a computer program is stored. When the computer program is run on a computer, the computer executes any of the above-mentioned methods for predicting the capacity of barrage data.
[0017] The solution provided by the embodiment of the present application obtains the target video feature information of the target video file. The target video feature information is processed based on the pre-trained barrage number prediction model to obtain the predicted barrage number information of the target video file. The barrage number prediction model is trained based on the user behavior characteristics and video characteristics associated with the barrage during the historical playback of the video file. Based on the predicted barrage number information and the pre-acquired barrage text length, the predicted barrage data capacity of the target video file is determined. The embodiment of the present application obtains the barrage number prediction model by pre-training the user behavior characteristics and video characteristics associated with the barrage during the historical playback of the video file, so that the number of barrages generated by the target video file during the playback process can be accurately predicted, and then the barrage data capacity of the target video file can be accurately predicted in combination with the pre-acquired barrage text length, which can help system administrators optimize barrage storage and transmission, and improve the processing efficiency and management level of barrage data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0019] Figure 1 A flowchart of a method for predicting the data capacity of a bullet screen provided in an embodiment of the present application;
[0020] Figure 2 A flowchart of the steps of a bullet screen quantity prediction model training method provided in an embodiment of the present application;
[0021] Figure 3 A flowchart of a method for acquiring bullet commentary related features provided in an embodiment of the present application;
[0022] Figure 4 A flowchart of the steps of a method for constructing a model training sample provided in an embodiment of the present application;
[0023] Figure 5 A flowchart of a method for acquiring the data capacity of a bullet screen provided in an embodiment of the present application;
[0024] Figure 6 A flowchart of a method for reserving memory for bullet screen provided in an embodiment of the present application;
[0025] Figure 7 A flowchart of a method for reserving bandwidth for bullet screen provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of a bullet screen data capacity prediction process provided in an embodiment of the present application;
[0027] Fig. 9 A schematic diagram of the structure of a bullet screen data capacity prediction device provided in an embodiment of the present application;
[0028] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0030] Figure 1 A flowchart of a method for predicting the data capacity of a bullet screen provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the bullet screen data capacity prediction method may include: step 101, step 102 and step 103.
[0031] Step 101: Obtain target video feature information of a target video file.
[0032] The embodiments of the present application can be applied to a scenario in which a barrage quantity prediction model is obtained by combining user behavior characteristics and video characteristics associated with barrage during historical playback of video files to predict the barrage data capacity.
[0033] The barrage data capacity can be used to indicate the memory capacity occupied by the video barrage, that is, how much memory the video barrage occupies.
[0034] The target video file refers to the video file for which the bullet screen data capacity prediction is required. In this example, the target video file may be a newly launched video file, such as a newly launched movie or TV series. The target video file may also be a live video file, such as a live video of a sports event or a live video of a news program. The target video file may also be a video file that has been launched and is broadcasted for the first time on a video platform, such as a TV series or a variety show. The specific type of the target video file may be determined according to the actual situation, and this embodiment does not impose any restrictions on this.
[0035] In this example, the target video feature information may include: video type (such as horror, comedy, sports, variety shows, etc.), character attribute information (such as actor popularity, actor type), audience type (such as adults, the elderly, children, etc., or men, women, etc.) and other feature information.
[0036] When predicting the data capacity of the target video file, the target video feature information of the target video file can be obtained. For example, when a movie is released, the video platform will publish the type, actors and other information of the movie. At the same time, the actor type and actor popularity can be obtained by combining the actor's historical movie participation information and the actor's activity information in the current time period. At the same time, the audience group type can be obtained based on the viewing group of other movies of the same type as the movie, so that the obtained information can be used as video feature information.
[0037] After the target video feature information of the target video file is acquired, step 102 is executed.
[0038] Step 102: Process the target video feature information based on a pre-trained barrage quantity prediction model to predict the barrage quantity information of the target video file, wherein the barrage quantity prediction model is trained based on user behavior characteristics and video features associated with barrage during historical playback of the video file.
[0039] The barrage number prediction model refers to a model used to predict the number of video barrages posted by users during the playback of a video file, that is, to predict the number of video barrages generated during the playback of a video file. In this example, the barrage number prediction model can be trained based on user behavior characteristics associated with barrages during the historical playback of the video file (such as information about barrages posted by users watching the video file, and user preference information, etc.) and video characteristics (such as video character attributes, the number of users watching the video file, the number of barrages posted, and other characteristics). The training process of the barrage number prediction model will be combined with the following implementation process. Figure 2A detailed description is given below and this embodiment will not be described in detail here.
[0040] After obtaining the target video feature information of the target video file, the target video feature information can be input into a pre-trained barrage quantity prediction model, so that the barrage quantity prediction model processes the target video feature information, thereby predicting the barrage quantity information of the target video file, that is, the number of video barrages generated by the target video file during playback. The specific reasoning process can be: the barrage quantity prediction model can predict the audience type and the expected number of viewing users of the target video file based on the target video feature information, thereby predicting the number of barrages posted by users of the audience type in a video file of the same video type as the target video file, and finally predicting the total number of barrages of video barrages generated by the target video file during playback, that is, the predicted number of barrages of the target video file.
[0041] After the target video feature information is processed based on the pre-trained bullet-screen quantity prediction model to obtain the predicted bullet-screen quantity information of the target video file, step 103 is executed.
[0042] Step 103: Based on the predicted bullet screen quantity information and the pre-acquired bullet screen text length, determine the predicted bullet screen data capacity of the target video file.
[0043] The length of the barrage text can be the text length of each video barrage obtained based on historical experience. In this example, the length of the barrage text can be obtained by obtaining the text length of the video barrages published historically, and calculating the average text length of all video barrages as the length of the barrage text. Of course, the barrage text can also be based on the video type of the target video file, obtaining the video barrages generated during the historical playback of other video files of the same video type, and calculating the average text length of these video barrages as the length of the barrage text, etc. The specific method for obtaining the length of the barrage text can be determined according to business needs, and this embodiment does not limit this.
[0044] After obtaining the predicted bullet-screen quantity information of the target video file, the predicted bullet-screen data capacity of the target video file can be determined based on the predicted bullet-screen quantity information and the pre-acquired bullet-screen text length. Specifically, the product value of the number of bullet-screens indicated by the predicted bullet-screen quantity information and the bullet-screen text length can be calculated, and the product value is the total text length of all video bullet-screens of the target video file. According to the total text length, the predicted bullet-screen data capacity of the target video file can be determined.
[0045] In this embodiment, the predicted bullet-screen data capacity of the predicted target video file may be the bullet-screen data capacity of a complete episode. For example, for video files such as movies, TV series, and sports events, the total bullet-screen data capacity of the complete video file may be predicted. For example, if a TV series is divided into 30 episodes, the total bullet-screen data capacity of all 30 episodes of the video file may be predicted.
[0046] Of course, the predicted barrage data capacity of the predicted target video file can be the barrage data capacity of some episodes. For example, for a movie video file, the barrage data capacity of a certain period (such as 30 minutes, 40 minutes, etc.) can be predicted. For a TV series video file, the barrage data capacity of one or more episodes (such as 3 episodes, 10 episodes, etc.) can be predicted. For a sports event video file, such as a basketball event, the barrage data capacity of a certain section of the game can be predicted.
[0047] It can be understood that if it is necessary to predict the barrage data capacity of a video file of a specified length or a specified number of episodes, when training the barrage quantity prediction model, samples of the corresponding length or the corresponding number of episodes can be used for training, so that the barrage data capacity of different lengths or different numbers of episodes can be accurately predicted.
[0048] The embodiments of the present application can help system administrators optimize barrage storage and transmission by combining a pre-trained barrage quantity prediction model to predict the barrage data capacity of a target video file. For example, it can help system administrators pre-equip memory space for storing video barrages and pre-allocate corresponding network bandwidth for barrage transmission.
[0049] Next, combine Figure 2 The training process of the barrage quantity prediction model is described in detail.
[0050] Reference Figure 2 , shows a flowchart of the steps of a bullet screen quantity prediction model training method provided by an embodiment of the present application. Figure 2 As shown, the barrage quantity prediction model may include: step 201, step 202 and step 203.
[0051] Step 201: According to the historical playback record information of the video file, the video features associated with the bullet screen of the video file and the user behavior features of the user who watched the video file are obtained.
[0052] In this embodiment, when training the barrage quantity prediction model, the historical playback record information of the video file can be obtained, and the video features associated with the barrage of the video file and the user behavior characteristics of the user watching the video file can be obtained based on the historical playback record information of the video file.
[0053] In this example, the video features may include: video type information, video role attribute information, the number of users who watch the video file, and the amount of bullet comments posted.
[0054] User behavior characteristics may include: user preference information of users who watch video files and barrage information posted by users.
[0055] The implementation process of obtaining video features and user behavior features will be combined in the following embodiments. Figure 3 A detailed description is given below and this embodiment will not be described in detail here.
[0056] After obtaining the video features associated with the bullet screen of the video file and the user behavior features of the user who watched the video file according to the historical playback record information of the video file, step 202 is executed.
[0057] Step 202: construct a model training sample based on the video features and the user behavior features.
[0058] After obtaining the video features associated with the barrage and the user behavior features of the users who watched the video files based on the historical playback record information of the video files, a model training sample can be constructed based on the video features and the user behavior features. The model training sample can be used to train a barrage quantity prediction model.
[0059] It can be understood that for the prediction needs of the number of barrages of different lengths or different numbers of episodes, the corresponding video features and user behavior features can be obtained to construct model training samples. For example, for movie video files, if you need to predict the number of barrages in a 30-minute movie video file, you can obtain the video features of a certain 30 minutes in the movie video file (such as the number of users watching the video file and the barrage release information, etc.) and user behavior features (such as user preference information of users watching the video file and barrage information of users releasing barrages, etc.) to construct model training samples. For TV series video files, if you need to predict the number of barrages for 10 episodes, you can obtain the video features and user behavior features of a certain 10 episodes in the TV series video file to construct model training samples. For basketball game video files, if you need to predict the number of barrages in the first two quarters of the game, you can obtain the video features and user behavior features of the first two quarters of the video files in the basketball game video file.
[0060] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.
[0061] In this example, after obtaining the video features and user behavior features, the video features and user behavior features can be converted into numerical vectors, and then the numerical vectors are scaled and combined to obtain model training samples. The implementation process of constructing model training samples will be combined with the following embodiments. Figure 4 A detailed description is given below and this embodiment will not be described in detail here.
[0062] After the model training samples are constructed based on the video features and the user behavior features, step 203 is executed.
[0063] Step 203: training the barrage quantity prediction model to be trained based on the model training samples to obtain the barrage quantity prediction model.
[0064] After constructing the model training samples based on the video features and the user behavior features, the barrage number prediction model to be trained can be trained based on the model training samples to obtain a barrage number prediction model, which can be used to predict the number of video barrages generated during the playback of the video file.
[0065] In this example, the architecture of the barrage number prediction model to be trained can be but is not limited to a recurrent neural network RNN, a long short-term memory network LSTM, etc. This embodiment does not limit the architecture of the barrage number prediction model to be trained.
[0066] The training process for the model to be trained for predicting the number of bullet comments can be as follows: 1. The scaled video feature vector and the user behavior feature vector are directly concatenated into a longer vector as the data set for model training, and the number of real bullet comments that accurately corresponds to the model is used as the real label of the model sample. 2. Initialize the parameters of the model, including weights and biases. 3. Use the data set to train the model. Inside the model, the input feature vector will be processed by multiple layers, such as fully connected layers, convolutional layers, pooling layers, and recurrent layers. These network layers will further extract, transform, and combine features to generate higher-level feature representations. At the same time, the model will output a predicted number of bullet comments. 4. During the model training process, for each training sample, the loss value between its predicted value and the actual value will be calculated. This loss value is calculated by substituting the predicted value and the actual value into the loss function. 5. The loss values of all training samples for a single training are accumulated or averaged to obtain the total loss value of the entire training set. This total loss value is used to evaluate the performance of the model on the training set and is used as the target of model optimization. 6. Based on the total loss value, the gradient of each parameter in the model is calculated through the back propagation algorithm, and these parameters are updated to minimize the loss value. This process will be iterated continuously until the preset training round is reached or other stopping conditions are met (such as the loss value reaches the set range, etc.), thereby training a bullet screen quantity prediction model.
[0067] In the specific implementation, neural network deep learning has many adjustable parameters, and by adjusting these parameters, the performance of the model can be further improved. For example, the parameters learning rate, batch size, and activation function. The learning rate parameter determines the amplitude by which the model updates the weights in each iteration. If the learning rate is set too high, the training may be unstable; if it is set too low, the training may be too slow. The batch size parameter determines the number of samples used in each training iteration. Increasing the batch size can speed up training, but it may affect the generalization ability of the model. The activation function parameter determines the connection between neurons. Common activation functions include ReLU, sigmoid, etc. Choosing a suitable activation function can improve the performance of the model. During the tuning process, you can use techniques such as grid search and random search to find the best parameter combination.
[0068] During the model training process, the model training samples can be divided into a training sample set and a test sample set. The training sample set is used to train the barrage number prediction model, and the test sample set is used to evaluate the performance of the trained barrage number prediction model.
[0069] The embodiment of the present application trains a barrage quantity prediction model by combining video features associated with barrages and user behavior features of video files. The barrage quantity prediction model can accurately predict the number of video barrages generated during the playback of video files, thereby improving the accuracy of barrage data capacity prediction.
[0070] Next, combine Figure 3 The implementation process of obtaining video features and user behavior features is described in detail.
[0071] Reference Figure 3 , shows a flowchart of the steps of a method for obtaining bullet-chat related features provided by an embodiment of the present application. Figure 3 As shown, the method for acquiring barrage-related features may include: step 301, step 302, step 303 and step 304.
[0072] Step 301: According to the historical playback record information of the video file, the video type information, video role attribute information, the number of users who watched the video file and the bullet comment release amount information of the video file are obtained.
[0073] In this embodiment, the video type information, video character attribute information, number of users who have watched the video file, and bullet comment release amount information of the video file can be obtained based on the historical playback record information of the video file.
[0074] The video type information may be used to indicate the type of the video file, such as horror, comedy, variety show, sports event, etc.
[0075] The video role attribute information can be used to indicate the attribute information of the actors participating in the video file, such as the actor type, actor popularity and other attribute information.
[0076] The user quantity information refers to the number of viewers when the video file is played. In a specific implementation, the number of viewers at different stages during the video file playback may be different. Therefore, when obtaining the number of users who have watched the video file, the maximum number of viewers of the video file can be used as the number of users of the video file. The number of viewers when the video file is played at different times can also be counted, and the average value can be taken as the number of users who have watched the video file. The minimum number of viewers of the video file can also be taken as the number of users of the video file.
[0077] The barrage posting volume information refers to information such as the number of barrages and the length of the barrage text of all video barrages posted by users during the playback of a video file.
[0078] After obtaining the video type information, video role attribute information, number of users who have watched the video file, and bullet comment release amount information of the video file, step 302 is executed.
[0079] Step 302: The video type information, the video role attribute information, the user quantity information and the bullet comment release quantity information are used as video features of the video file associated with the bullet comment.
[0080] After obtaining the video type information, video role attribute information, number of users watching the video file and barrage publishing information of the video file, the video type information, video role attribute information, number of users watching the video file and barrage publishing information of the video file can be used together as video features of the video file associated with the barrage.
[0081] Step 303: According to the historical playback record information of the video file, the user preference information of the user who watched the video file and the barrage information posted by the user are obtained.
[0082] When acquiring user behavior features, user preference information of users who watch video files and barrage information posted by users can be acquired based on historical playback record information of video files.
[0083] In a specific implementation, during the playback of a video file, the user needs to log in to the video file playback platform to record the viewing history, as well as logs such as the information of the barrage posted while watching the video file, to count the user's preference information and the barrage information posted by the user.
[0084] In this example, the user preference information may include: video type preference (ie, the video type preferred by the user), actor type preference (ie, the type of actor that the user likes, such as comedians, etc.).
[0085] The barrage information posted by users may include: the number of barrages posted by users on different video categories, the number of barrages posted by users on videos of their favorite actors, the average barrage text length of posted video barrages, and other information.
[0086] Step 304: Use the user preference information and the barrage information as the user behavior features.
[0087] After obtaining the user preference information of the user watching the video file and the barrage information of the barrage posted by the user, the user preference information of the user and the barrage information of the barrage posted by the user can be used together as the user behavior feature.
[0088] The embodiment of the present application constructs model training samples by acquiring user behavior characteristics associated with barrages and video characteristics of video files, so that the trained barrage quantity prediction model can accurately predict the behavior characteristics associated with barrages of users watching video files, thereby accurately predicting the predicted barrage quantity of video files, thereby improving the accuracy of barrage quantity prediction.
[0089] Next, combine Figure 4 The construction process of the model training samples is described in detail.
[0090] Reference Figure 4 , shows a flow chart of the steps of a method for constructing a model training sample provided by an embodiment of the present application. Figure 4 As shown, the model training sample construction method may include: step 401, step 402 and step 403.
[0091] Step 401: convert the video features and the user behavior features respectively to obtain a video numerical vector and a behavior numerical vector.
[0092] In this embodiment, after obtaining the video features and user behavior features associated with the bullet comment of the video file, the video features and the user behavior features can be converted to obtain a video numerical vector corresponding to the video features and a behavior numerical vector corresponding to the user behavior features. The numerical vector refers to a numerical feature vector represented by a machine language. In this example, the numerical vector can be a value between 0 and 1.
[0093] It can be understood that the process of converting features into numerical vectors can be to directly obtain numerical features through feature descriptors (such as SIFT, SURF, etc.) or deep learning models (such as CNN convolutional layer output, etc.). It can also be to use one-hot encoding or multi-hot encoding to convert features into numerical vectors. Of course, it is not limited to this. In practical applications, other methods can also be used to convert features into numerical vectors, and this embodiment does not limit this.
[0094] After the video features and the user behavior features are converted to obtain a video numerical vector corresponding to the video features and a behavior numerical vector corresponding to the user behavior features, step 402 is executed.
[0095] Step 402: Scaling the video numerical vector and the behavior numerical vector respectively to obtain a video feature vector and a user behavior feature vector.
[0096] After obtaining the video numerical vector corresponding to the video feature and the behavior numerical vector corresponding to the user behavior feature, the video numerical vector and the behavior numerical vector can be scaled to obtain a video feature vector and a user behavior feature vector.
[0097] In a specific implementation, the first mean and the first standard deviation corresponding to the video numerical vector and the second mean and the second standard deviation corresponding to the behavior numerical vector can be obtained. Then, the video numerical vector can be scaled based on the first mean and the first standard deviation to obtain a video feature vector. The user behavior feature numerical feature vector can be scaled based on the second mean and the second standard deviation to obtain a user behavior feature vector, so that the numerical feature vector is scaled to an interval with a mean of 0 and a standard deviation of 1.
[0098] The embodiment of the present application performs scaling processing on the video numerical vector and the behavior numerical vector, thereby eliminating the magnitude differences between different features and improving the accuracy and stability of the model.
[0099] After the video feature vector and the user behavior feature vector are obtained, step 403 is executed.
[0100] Step 403: Combine the video feature vector and the user behavior feature vector to obtain the model training sample.
[0101] After obtaining the video feature vector and the user behavior feature vector, the video feature vector and the user behavior feature vector can be combined to obtain a model training sample. Specifically, the converted and scaled features can be combined to form a continuous feature vector. For example, for a sample, its feature vector is [user's posting volume in each drama type, user drama type preference, user's favorite actor type, user's posting volume on videos containing favorite actor types, drama type, actor popularity, starring type, audience type], where each feature is a standardized value, etc.
[0102] The embodiments of the present application can convert and scale video features and user behavior features to convert features associated with barrage into numerical features that can be recognized by a machine. At the same time, the magnitude differences between different features can be eliminated, thereby improving the accuracy and stability of the model.
[0103] After the bullet-screen quantity prediction model predicts the target video file's bullet-screen quantity information, the bullet-screen data capacity of the target video file can be calculated by combining the pre-acquired bullet-screen text length and bullet-screen quantity information. Figure 5 This is described in detail as follows.
[0104] Reference Figure 5 , shows a flowchart of the steps of a method for obtaining the data capacity of a bullet screen provided in an embodiment of the present application. Figure 5 As shown, the method for obtaining the barrage data capacity may include: step 501 and step 502.
[0105] Step 501: Determine the length of the barrage text according to the previously counted historical barrage text length of the historical barrage information.
[0106] In this embodiment, the historical bullet screen information may be the bullet screen information of all video bullet screens in the video platform. It may also be the bullet screen information of video bullet screens of video files of the same type as the target video file in the video platform, etc. The specific content of the historical bullet screen information may be predefined, and this embodiment does not limit this.
[0107] After obtaining the historical barrage information, the historical barrage text length of the historical barrage information can be obtained. Furthermore, the barrage text length required for calculating the barrage data capacity can be determined in combination with the historical barrage text length. Specifically, the average value of all historical barrage text lengths can be calculated as the barrage text length required for calculating the barrage data capacity.
[0108] Step 502: Calculate the product value corresponding to the length of the barrage text and the predicted barrage quantity information to obtain the barrage data capacity of the target video file.
[0109] After obtaining the bullet text information, the product value of the bullet text length and the predicted bullet number information of the target video file can be calculated to obtain the predicted bullet data capacity of the target video file, that is, the predicted bullet data capacity = predicted bullet number × bullet text length.
[0110] The embodiment of the present application predicts the barrage data capacity of the target video file by using the barrage text length acquired in advance and the barrage quantity prediction model to predict the barrage quantity information of the target video file, thereby providing a reliable decision-making basis for system administrators, optimizing storage and transmission, and improving data processing efficiency and management level.
[0111] In a specific implementation, after obtaining the predicted bullet screen data capacity of the target video file, the memory for storing the video bullet screen of the target video file can be reserved according to the predicted bullet screen data capacity. Figure 6 This is described in detail as follows.
[0112] Reference Figure 6 , shows a flowchart of the steps of a bullet screen memory reservation method provided by an embodiment of the present application. Figure 6 As shown, the bullet screen memory reservation method may include: step 601 and step 602.
[0113] Step 601: Determine the bullet screen storage memory corresponding to the target video file according to the predicted bullet screen data capacity.
[0114] In this embodiment, the bullet comment storage memory refers to the memory that needs to be reserved for storing the video bullet comments of the target video file.
[0115] After obtaining the predicted bullet-screen data capacity of the target video file, the bullet-screen storage memory corresponding to the target video file can be determined according to the predicted bullet-screen data capacity.
[0116] In this example, the size of the bullet screen storage memory may be the same as the memory size indicated by the predicted bullet screen data capacity. For example, when the predicted bullet screen data capacity is 20G, the bullet screen storage memory corresponding to the target video file may be set to 20G.
[0117] The size of the bullet screen storage memory may be slightly larger than the memory size indicated by the predicted bullet screen data capacity. For example, when the predicted bullet screen data capacity is 1024 megabytes, the bullet screen storage memory corresponding to the target video file may be set to 1100 megabytes, 1050 megabytes, etc.
[0118] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation to the embodiments.
[0119] After determining the bullet-screen storage memory corresponding to the target video file according to the predicted bullet-screen data capacity of the target video file, execute step 602.
[0120] Step 602: reserve memory space of the same size as the bullet comment storage memory in the designated storage space to store the video bullet comments generated when playing the target video file.
[0121] After determining the barrage storage memory corresponding to the target video file based on the predicted barrage data capacity of the target video file, memory space of the barrage storage memory size can be reserved in a designated storage space (such as a disk, etc.) to store the video barrage generated when playing the target video file.
[0122] The embodiment of the present application reserves space for storing video barrages generated by the target video file during playback by combining the predicted barrage data capacity of the target video file. This can effectively manage the video barrages expected to be generated by the target video file, and at the same time avoid the problem of low memory space utilization due to excessive reserved memory.
[0123] In a specific implementation, after obtaining the predicted bullet screen data capacity of the target video file, the network bandwidth for transmitting the video bullet screen of the target video file can be reserved according to the predicted bullet screen data capacity. Figure 7 This is described in detail as follows.
[0124] Reference Figure 7 , shows a flow chart of the steps of a method for reserving bandwidth for bullet screen provided in an embodiment of the present application. Figure 7 As shown, the barrage bandwidth reservation method may include: step 701 and step 702.
[0125] Step 701: Determine the predicted network bandwidth required for transmitting the video bullet screen of the target video file according to the predicted bullet screen data capacity.
[0126] In this embodiment, the predicted network bandwidth refers to the network bandwidth that needs to be reserved for transmitting the video barrage of the target video file.
[0127] After obtaining the predicted bullet screen data capacity of the target video file, the predicted network bandwidth required for transmitting the video bullet screen of the target video file can be determined based on the predicted bullet screen data capacity. Specifically, the capacity of the video bullet screen that needs to be transmitted in a unit time can be predicted based on the predicted bullet screen data capacity and the total playback time of the target video file, and then the predicted network bandwidth required for transmitting the video bullet screen of the target video file can be determined based on the capacity of the video bullet screen that needs to be transmitted in the unit time.
[0128] After determining the predicted network bandwidth required for transmitting the video bullet screen of the target video file according to the predicted bullet screen data capacity of the target video file, execute step 702.
[0129] Step 702: reserve the predicted network bandwidth for transmitting the video bullet screen of the target video file when playing the target video file.
[0130] After determining the predicted network bandwidth required for transmitting the video barrage of the target video file based on the predicted barrage data capacity of the target video file, the predicted network bandwidth for transmitting the video barrage of the target video file when playing the target video file can be reserved when preparing to play the target video file.
[0131] The embodiment of the present application can optimize the transmission of video barrages by reserving a predicted network bandwidth for transmitting the video barrage of a target video file when playing the target video file based on the predicted barrage data capacity of the target video file, and can ensure that all video barrages are stored to avoid the situation where video barrages are missed and not stored due to the transmission of video barrages.
[0132] Next, combine Figure 8 The training and iterative optimization process of the barrage quantity prediction model is described in detail as follows.
[0133] like Figure 8 As shown, first, data collection can be performed, that is, user behavior characteristics and video characteristics can be collected based on the user's posting barrage behavior log and video feature data. Then, the user behavior characteristics are statistically calculated to obtain the user's posting volume of each series type, user series type preference, user's favorite actor type, user's posting volume on videos containing favorite actor types, average barrage text length, etc. And filter out information such as series type, actor popularity, starring type, and audience group type from video features.
[0134] Then, a feature vector can be constructed. Specifically, the extracted features can be converted into numerical representations suitable for machine learning and the features can be scaled to eliminate the magnitude differences between different features to improve the accuracy and stability of the model. Furthermore, the converted and scaled features can be combined to form a continuous feature vector.
[0135] Finally, the constructed feature vector can be used as a model training sample (including a sample training set and a sample test set) to train a prediction model based on neural network deep learning using the sample training set. The performance of the model can be evaluated using the sample test set. Specifically, the model performance evaluation feedback can be provided based on the number of bullet screens in the video file predicted by the model and the actual number of bullet screens in the video file to iteratively optimize the bullet screen number prediction model. Specifically, the user behavior features associated with the bullet screen and the video features of the video file can be used as input together to optimize the model.
[0136] The method for predicting the capacity of barrage data provided in the embodiment of the present application obtains the target video feature information of the target video file. The target video feature information is processed based on the pre-trained barrage number prediction model to obtain the predicted barrage number information of the target video file. The barrage number prediction model is trained based on the user behavior characteristics and video characteristics associated with the barrage during the historical playback of the video file. Based on the predicted barrage number information and the pre-acquired barrage text length, the predicted barrage data capacity of the target video file is determined. The embodiment of the present application obtains the barrage number prediction model by pre-training the user behavior characteristics and video characteristics associated with the barrage during the historical playback of the video file, so that the number of barrages generated by the target video file during the playback process can be accurately predicted, and then the barrage data capacity of the target video file can be accurately predicted in combination with the pre-acquired barrage text length, which can help system administrators optimize barrage storage and transmission, and improve the processing efficiency and management level of barrage data.
[0137] Reference Fig. 9 , shows a schematic diagram of the structure of a bullet screen data capacity prediction device provided by an embodiment of the present application, such as Fig. 9 As shown, the bullet screen data capacity prediction device 900 may include the following modules:
[0138] The target video feature acquisition module 910 is used to acquire target video feature information of a target video file;
[0139] A barrage quantity information acquisition module 920 is used to process the target video feature information based on a pre-trained barrage quantity prediction model to obtain the predicted barrage quantity information of the target video file, wherein the barrage quantity prediction model is trained based on user behavior characteristics and video characteristics associated with barrages during historical playback of video files;
[0140] The barrage data capacity determination module 930 is used to determine the predicted barrage data capacity of the target video file based on the predicted barrage quantity information and the pre-acquired barrage text length.
[0141] Optionally, the device further comprises:
[0142] A bullet-screen-related feature acquisition module, used to acquire video features associated with the bullet-screen of the video file and user behavior features of users who watch the video file according to historical playback record information of the video file;
[0143] A model sample construction module, used to construct a model training sample based on the video features and the user behavior features;
[0144] The barrage prediction model acquisition module is used to train the barrage quantity prediction model to be trained based on the model training samples to obtain the barrage quantity prediction model.
[0145] Optionally, the bullet comment related feature acquisition module includes:
[0146] A video information acquisition unit, used to acquire video type information, video role attribute information, number of users who watched the video file, and bullet comment release amount information of the video file according to the historical playback record information of the video file;
[0147] A video feature acquisition unit, configured to use the video type information, the video role attribute information, the user quantity information, and the bullet comment release quantity information as video features associated with the bullet comment of the video file;
[0148] A user information acquisition unit, used to acquire user preference information of users who watch the video file and barrage information posted by the users according to historical playback record information of the video file;
[0149] A user behavior feature acquisition unit is used to use the user preference information and the barrage information as the user behavior feature.
[0150] Optionally, the model sample construction module includes:
[0151] A numerical vector acquisition unit, used to convert the video features and the user behavior features respectively to obtain a video numerical vector and a behavior numerical vector;
[0152] A numerical vector scaling unit, used to scale the video numerical vector and the behavior numerical vector respectively to obtain a video feature vector and a user behavior feature vector;
[0153] The model sample acquisition unit is used to combine the video feature vector and the user behavior feature vector to obtain the model training sample.
[0154] Optionally, the numerical vector scaling unit includes:
[0155] A numerical feature acquisition subunit, used to acquire a first mean and a first standard deviation corresponding to the video numerical vector, and a second mean and a second standard deviation corresponding to the behavior numerical vector;
[0156] a video feature vector acquisition subunit, configured to perform scaling processing on the video numerical vector based on the first mean value and the first standard deviation to obtain the video feature vector;
[0157] The behavior feature vector acquisition subunit is used to scale the user behavior feature numerical feature vector based on the second mean and the second standard deviation to obtain a user behavior feature vector.
[0158] Optionally, the bullet screen data capacity determination module includes:
[0159] A text length determination unit, used to determine the length of the barrage text according to the historical barrage text length of the historical barrage information previously counted;
[0160] The barrage data capacity acquisition subunit is used to calculate the product value corresponding to the barrage text length and the predicted barrage quantity information to obtain the predicted barrage data capacity of the target video file.
[0161] Optionally, the device further comprises:
[0162] A bullet screen memory determination module, used to determine the bullet screen storage memory corresponding to the target video file according to the predicted bullet screen data capacity;
[0163] The target memory reservation module is used to reserve a memory space of the size of the bullet comment storage memory in a specified storage space to store the video bullet comment generated when playing the target video file.
[0164] Optionally, the device further comprises:
[0165] A predicted network bandwidth determination module, used to determine the predicted network bandwidth required for transmitting the video bullet screen of the target video file according to the predicted bullet screen data capacity;
[0166] The target bandwidth reservation module is used to reserve the predicted network bandwidth for transmitting the video bullet screen of the target video file when playing the target video file.
[0167] The barrage data capacity prediction device provided in the embodiment of the present application obtains the target video feature information of the target video file. The target video feature information is processed based on the pre-trained barrage quantity prediction model to obtain the predicted barrage quantity information of the target video file. The barrage quantity prediction model is trained based on the user behavior characteristics and video characteristics associated with the barrage during the historical playback of the video file. Based on the predicted barrage quantity information and the pre-acquired barrage text length, the predicted barrage data capacity of the target video file is determined. The embodiment of the present application obtains the barrage quantity prediction model by pre-training the user behavior characteristics and video characteristics associated with the barrage during the historical playback of the video file, so that the number of barrages generated by the target video file during the playback process can be accurately predicted, and then the barrage data capacity of the target video file can be accurately predicted in combination with the pre-acquired barrage text length, which can help system administrators optimize barrage storage and transmission, and improve the processing efficiency and management level of barrage data.
[0168] The present application also provides an electronic device, such as Fig.10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.
[0169] Memory 1003, used for storing computer programs;
[0170] The processor 1001 is used to execute the program stored in the memory 1003, and implements the following steps:
[0171] Obtain target video feature information of a target video file;
[0172] The target video feature information is processed based on a pre-trained bullet-screen quantity prediction model to obtain predicted bullet-screen quantity information of the target video file, wherein the bullet-screen quantity prediction model is trained based on user behavior features and video features associated with bullet-screen during historical playback of the video file;
[0173] Based on the predicted bullet screen quantity information and the pre-acquired bullet screen text length, the predicted bullet screen data capacity of the target video file is determined.
[0174] Optionally, before the pre-trained bullet-chat quantity prediction model processes the target video feature information to obtain the predicted bullet-chat quantity information of the target video file, the method further includes:
[0175] According to the historical playback record information of the video file, video features associated with the barrage of comments and user behavior features of the user who watched the video file are obtained;
[0176] Constructing a model training sample based on the video features and the user behavior features;
[0177] The barrage quantity prediction model to be trained is trained based on the model training samples to obtain the barrage quantity prediction model.
[0178] Optionally, acquiring video features of the video file associated with the bullet screen and user behavior features of a user watching the video file according to historical playback record information of the video file includes:
[0179] According to the historical playback record information of the video file, the video type information, the video character attribute information, the number of users who watched the video file and the bullet comment release amount information of the video file are obtained;
[0180] The video type information, the video role attribute information, the user quantity information and the bullet comment release quantity information are used as video features of the video file associated with the bullet comment;
[0181] According to the historical playback record information of the video file, the user preference information of the user who watched the video file and the barrage information of the barrage posted by the user are obtained;
[0182] The user preference information and the barrage information are used as the user behavior features.
[0183] Optionally, constructing a model training sample based on the video features and the user behavior features includes:
[0184] The video features and the user behavior features are converted respectively to obtain a video numerical vector and a behavior numerical vector;
[0185] Scaling the video numerical vector and the behavior numerical vector respectively to obtain a video feature vector and a user behavior feature vector;
[0186] The video feature vector and the user behavior feature vector are combined to obtain the model training sample.
[0187] Optionally, the scaling process is performed on the video numerical vector and the behavior numerical vector respectively to obtain a video feature vector and a user behavior feature vector, including:
[0188] Obtaining a first mean and a first standard deviation corresponding to the video numerical vector, and a second mean and a second standard deviation corresponding to the behavior numerical vector;
[0189] Scaling the video numerical vector based on the first mean and the first standard deviation to obtain the video feature vector;
[0190] The user behavior feature numerical feature vector is scaled based on the second mean and the second standard deviation to obtain a user behavior feature vector.
[0191] Optionally, the determining the predicted bullet-screen data capacity of the target video file based on the predicted bullet-screen quantity information and the pre-acquired bullet-screen text length includes:
[0192] Determine the length of the barrage text according to the historical barrage text length of the historical barrage information previously counted;
[0193] The product value corresponding to the barrage text length and the predicted barrage quantity information is calculated to obtain the predicted barrage data capacity of the target video file.
[0194] Optionally, after determining the predicted bullet-screen data capacity of the target video file based on the predicted bullet-screen quantity information and the pre-acquired bullet-screen text length, the method further includes:
[0195] Determining the bullet screen storage memory corresponding to the target video file according to the predicted bullet screen data capacity;
[0196] A memory space of the same size as the bullet comment storage memory is reserved in the designated storage space to store the video bullet comments generated when playing the target video file.
[0197] Optionally, after determining the predicted bullet-screen data capacity of the target video file based on the predicted bullet-screen quantity information and the pre-acquired bullet-screen text length, the method further includes:
[0198] Determining the predicted network bandwidth required for transmitting the video bullet screen of the target video file according to the predicted bullet screen data capacity;
[0199] The predicted network bandwidth is reserved for transmitting the video bullet screen of the target video file when playing the target video file.
[0200] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0201] The communication interface is used for communication between the above terminal and other devices.
[0202] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0203] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0204] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the barrage data capacity prediction method described in any of the above embodiments.
[0205] In another embodiment provided by the present application, a computer program product comprising instructions is also provided, on which a computer program is stored. When the computer program is run on a computer, the computer executes any of the above-mentioned methods for predicting the capacity of barrage data.
[0206] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0207] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0208] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0209] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A method for predicting the capacity of bullet screen data, characterized in that: include: Obtain target video feature information of a target video file; The target video feature information is processed based on a pre-trained bullet-screen quantity prediction model to obtain predicted bullet-screen quantity information of the target video file, wherein the bullet-screen quantity prediction model is trained based on user behavior features and video features associated with bullet-screen during historical playback of the video file; Based on the predicted bullet screen quantity information and the pre-acquired bullet screen text length, the predicted bullet screen data capacity of the target video file is determined.
2. The method according to claim 1, characterized in that Before the target video feature information is processed based on the pre-trained bullet screen quantity prediction model to obtain the predicted bullet screen quantity information of the target video file, the method further includes: According to the historical playback record information of the video file, video features associated with the barrage of comments and user behavior features of the user who watched the video file are obtained; Constructing a model training sample based on the video features and the user behavior features; The barrage quantity prediction model to be trained is trained based on the model training samples to obtain the barrage quantity prediction model.
3. The method according to claim 2, characterized in that The step of obtaining, based on the historical playback record information of the video file, the video features associated with the bullet screen of the video file and the user behavior features of the user who watched the video file includes: According to the historical playback record information of the video file, the video type information, the video character attribute information, the number of users who watched the video file and the bullet comment release amount information of the video file are obtained; The video type information, the video role attribute information, the user quantity information and the bullet comment release quantity information are used as video features of the video file associated with the bullet comment; According to the historical playback record information of the video file, the user preference information of the user who watched the video file and the barrage information of the barrage posted by the user are obtained; The user preference information and the barrage information are used as the user behavior features.
4. The method according to claim 2, characterized in that: The constructing a model training sample based on the video features and the user behavior features includes: The video features and the user behavior features are converted respectively to obtain a video numerical vector and a behavior numerical vector; Scaling the video numerical vector and the behavior numerical vector respectively to obtain a video feature vector and a user behavior feature vector; The video feature vector and the user behavior feature vector are combined to obtain the model training sample.
5. The method according to claim 4, characterized in that The step of scaling the video numerical vector and the behavior numerical vector to obtain a video feature vector and a user behavior feature vector comprises: Obtaining a first mean and a first standard deviation corresponding to the video numerical vector, and a second mean and a second standard deviation corresponding to the behavior numerical vector; Scaling the video numerical vector based on the first mean and the first standard deviation to obtain the video feature vector; The user behavior feature numerical feature vector is scaled based on the second mean and the second standard deviation to obtain a user behavior feature vector.
6. The method according to claim 1, characterized in that The step of determining the predicted bullet screen data capacity of the target video file based on the predicted bullet screen quantity information and the pre-acquired bullet screen text length includes: Determine the length of the barrage text according to the historical barrage text length of the historical barrage information previously counted; The product value corresponding to the barrage text length and the predicted barrage quantity information is calculated to obtain the predicted barrage data capacity of the target video file.
7. The method according to claim 1, characterized in that After determining the predicted bullet-screen data capacity of the target video file based on the predicted bullet-screen quantity information and the pre-acquired bullet-screen text length, the method further includes: Determining the bullet screen storage memory corresponding to the target video file according to the predicted bullet screen data capacity; A memory space of the same size as the bullet comment storage memory is reserved in the designated storage space to store the video bullet comments generated when playing the target video file.
8. The method according to claim 1, characterized in that After determining the predicted bullet-screen data capacity of the target video file based on the predicted bullet-screen quantity information and the pre-acquired bullet-screen text length, the method further includes: Determining the predicted network bandwidth required for transmitting the video bullet screen of the target video file according to the predicted bullet screen data capacity; The predicted network bandwidth is reserved for transmitting the video bullet screen of the target video file when playing the target video file.
9. A device for predicting the capacity of bullet screen data, characterized in that: include: A target video feature acquisition module is used to acquire target video feature information of a target video file; A barrage quantity information acquisition module is used to process the target video feature information based on a pre-trained barrage quantity prediction model to obtain the predicted barrage quantity information of the target video file, wherein the barrage quantity prediction model is trained based on user behavior characteristics and video characteristics associated with barrages during historical playback of video files; The barrage data capacity determination module is used to determine the predicted barrage data capacity of the target video file based on the predicted barrage quantity information and the pre-acquired barrage text length.
10. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 8 when executing a program stored in a memory.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product comprising instructions, on which a computer program is stored, characterized in that When the computer program runs on a computer, the computer executes the bullet screen data capacity prediction method as described in any one of claims 1 to 8.
