Bullet screen-based video cover generation method and device, equipment and medium

By analyzing the barrage data of the video file, calculating the barrage density and selecting keyframe images as the video cover, the problem that the video cover cannot accurately reflect user interests and improves the click rate and viewing rate of the video.

CN119743654APending Publication Date: 2025-04-01BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411769399.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

In the prior art, the video cover cannot accurately reflect the user's interests, resulting in the impact of the number of clicks of the video.

Method used

By obtaining the barrage data of the video file, the barrage density distribution array for each time period is calculated, the target time period is determined and the keyframe images within that time period are obtained, and the target image is selected from these images as the video cover using an aesthetic scoring algorithm.

Benefits of technology

By analyzing the user's interaction behavior (barrage density) of the video, the video frame image with the highest user discussion is accurately selected as the video cover, which improves the click rate and viewing rate of the video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743654A_ABST
    Figure CN119743654A_ABST
Patent Text Reader

Abstract

The invention relates to a bullet screen-based video cover generation method, apparatus and device, and a medium, and the method comprises the steps: obtaining bullet screen data of a video file, the bullet screen data comprising bullet screen release time of each bullet screen; calculating a bullet screen density distribution array in each time period according to the bullet screen release time; determining a target time period according to the bullet screen density distribution array, and obtaining a plurality of key frame images in the target time period, the bullet screen density in the target time period being greater than a density threshold; and selecting a target image from the plurality of key frame images through an aesthetic scoring algorithm, and taking the target image as a video cover of the video file. The video frame image with the highest discussion degree of the user is selected as the video cover by analyzing the bullet screen density sent by the user for the video, and the problem that the video cover cannot accurately reflect the interest point of the user is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video processing technology, and in particular to a method, device, equipment and medium for generating a video cover based on bullet screen. Background Art

[0002] With the popularization of computers and the rapid development of the Internet, more and more videos are being circulated on the Internet. In the face of the massive amount of videos on major video platforms, by setting a suitable video cover for the video, the user can click on the video cover on the display interface to play the video, so the user's interest in the video cover determines whether the user will click on the video.

[0003] At present, in the process of determining the video cover, a manual designation method is usually adopted, for example, the first video frame in the video is used as the video cover of the video, or a video frame is designated from the video by the R&D personnel as the video cover. However, this video cover may not be the video frame that the user is really interested in. If the video cover cannot accurately reflect the user's interest point, it may affect the number of clicks on the video.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The present application provides a method, device, equipment and medium for generating a video cover based on barrage to solve the above-mentioned technical problem that "the video cover cannot accurately reflect the user's interests".

[0006] According to one aspect of an embodiment of the present application, the present application provides a method for generating a video cover based on barrage, including: obtaining barrage data of a video file, wherein the barrage data includes the barrage release time of each barrage; calculating the barrage density distribution array in each time period according to the barrage release time; determining a target time period according to the barrage density distribution array, and obtaining multiple key frame images within the target time period, wherein the barrage density within the target time period is greater than a density threshold; selecting a target image from multiple key frame images through an aesthetic scoring algorithm, and using the target image as the video cover of the video file.

[0007] Optionally, a barrage density distribution array in each time period is calculated according to the barrage release time, including: obtaining the video length of the video file; dividing the video length into multiple time periods, wherein the length of each time period is the same; counting the number of barrages sent in each time period according to the barrage release time; using the number of barrages sent as the barrage density, and integrating the barrage densities of each time period to obtain a barrage density distribution array, wherein each barrage density in the barrage density distribution array is arranged in chronological order of the barrage release time.

[0008] Optionally, determining the target time period according to the barrage density distribution array includes: selecting at least one local maximum value from the barrage density distribution array, wherein the barrage density of the local maximum value is greater than the adjacent barrage density; arranging the local maxima in descending order to obtain a barrage density arrangement table; extracting the barrage density that is ranked before the target sequence number in the barrage density arrangement table; and determining the time period corresponding to the barrage density that is ranked before the target sequence number as the target time period.

[0009] Optionally, selecting at least one local maximum value from the barrage density distribution array includes: comparing each barrage density in the barrage density distribution array with an adjacent barrage density, wherein the adjacent barrage density includes a barrage density that is before the barrage density and a barrage density that is after the barrage density; when the barrage density is greater than the previous barrage density and greater than the subsequent barrage density, determining that the barrage density is greater than the adjacent barrage density; and determining the barrage density that is greater than the adjacent barrage density as the local maximum.

[0010] Optionally, a target image is selected from a plurality of key frame images by using an aesthetic scoring algorithm, including: obtaining an aesthetic score of each key frame image by using an aesthetic scoring algorithm; determining a key frame image having an aesthetic score greater than a scoring threshold as a candidate frame image; and performing image optimization processing on the candidate frame images to obtain a target image.

[0011] Optionally, obtaining the barrage data of a video file includes: obtaining initial barrage data of the video file, wherein the initial barrage data includes barrage content and barrage release time, and the barrage content includes the content of all barrages issued by the user for the video file; extracting candidate barrage data whose barrage release time is after a target time from the initial barrage data; identifying and eliminating invalid barrage data in the candidate barrages through the barrage content to obtain target barrage data; and determining the barrage release time of the target barrage data as the barrage data.

[0012] Optionally, after using the target image as the video cover of the video file, the method further includes: if the number of video covers is greater than 1, switching the video cover being displayed every preset time period; upon receiving a cover setting instruction, determining a target cover corresponding to the cover setting instruction, and continuously displaying the target cover.

[0013] According to another aspect of an embodiment of the present application, the present application provides a video cover generation device based on barrage, including: an acquisition module, used to acquire barrage data of a video file, wherein the barrage data includes the barrage release time of each barrage; a calculation module, used to calculate the barrage density distribution array in each time period according to the barrage release time; a determination module, used to determine the target time period according to the barrage density distribution array, and acquire multiple key frame images within the target time period, wherein the barrage density within the target time period is greater than the density threshold; a selection module, used to select a target image from multiple key frame images through an aesthetic scoring algorithm, and use the target image as the video cover of the video file.

[0014] According to another aspect of an embodiment of the present application, the present application provides an electronic device, including a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, the memory and the processor communicate through the communication bus and the communication interface, and the steps of the above method are implemented when the processor executes the computer program.

[0015] According to another aspect of an embodiment of the present application, the present application also provides a computer-readable medium having a non-volatile program code executable by a processor, and the program code enables the processor to execute the above method.

[0016] The above technical solution provided by the embodiment of the present application has the following advantages compared with the related art:

[0017] The present application provides a method for generating a video cover based on barrage, including: obtaining barrage data of a video file, wherein the barrage data includes the time when each barrage is released; calculating the barrage density distribution array in each time period according to the time when the barrage is released; determining the target time period according to the barrage density distribution array, and obtaining multiple key frame images in the target time period, wherein the barrage density in the target time period is greater than the density threshold; selecting a target image from multiple key frame images through an aesthetic scoring algorithm, and using the target image as the video cover of the video file. By analyzing the density of barrages issued by users for a video, the video frame image with the highest user discussion degree is selected as the video cover, which solves the problem that the video cover cannot accurately reflect the user's interest points. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 A flowchart of an optional method for generating a video cover based on bullet screen provided according to an embodiment of the present application;

[0021] Figure 2 A flowchart of another optional method for generating a video cover based on bullet screen provided according to an embodiment of the present application;

[0022] Figure 3 A block diagram of an optional video cover generation device based on bullet screen provided according to an embodiment of the present application;

[0023] Figure 4 A schematic diagram of an optional electronic device structure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0025] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.

[0026] With the popularization of computers and the rapid development of the Internet, more and more videos are being circulated on the Internet. In the face of the massive amount of videos on major video platforms, by setting a suitable video cover for the video, the user can click on the video cover on the display interface to play the video, so the user's interest in the video cover determines whether the user will click on the video.

[0027] At present, in the process of determining the video cover, a manual designation method is usually adopted, for example, the first video frame in the video is used as the video cover of the video, or a video frame is designated from the video by the R&D personnel as the video cover. However, this video cover may not be the video frame that the user is really interested in. If the video cover cannot accurately reflect the user's interest point, it may affect the number of clicks on the video.

[0028] In order to solve the problems mentioned in the background technology, according to one aspect of the embodiment of the present application, a method for generating a video cover based on bullet screen is provided, such as Figure 1 As shown, including:

[0029] Step 101, obtaining bullet screen data of a video file, wherein the bullet screen data includes the bullet screen release time of each bullet screen;

[0030] Step 103, calculating the density distribution array of the bullet comments in each time period according to the bullet comment release time;

[0031] Step 105, determining a target time period according to the bullet chat density distribution array, and acquiring a plurality of key frame images within the target time period, wherein the bullet chat density within the target time period is greater than a density threshold;

[0032] Step 107 , selecting a target image from the multiple key frame images through an aesthetic scoring algorithm, and using the target image as the video cover of the video file.

[0033] Usually, the purpose of publishing a video is to maximize the attractiveness of the video, so a video cover needs to be displayed to attract the user's attention. In the existing video viewing mode, when a user sees an exciting video clip, he can post real-time bullet comments to discuss the current plot. The more bullet comments a clip has, the more discussion it has. Then the clip is most likely to be a topic clip that the user is interested in. Therefore, this application generates a video cover based on the analysis of the bullet comments, aiming to generate a video cover that can reflect the user's interests.

[0034] First, obtain the video file for which a video cover needs to be generated, then obtain the barrage data of the video file, divide the length of the video file into different time periods, and then determine the barrage density distribution in each time period according to the barrage release time of the barrage data, select the video clips in the time period with high barrage density, and finally select representative images from these video clips for beautification and use as video covers.

[0035] The method for generating a video cover provided in this application introduces barrage data and selects wonderful clips based on the user's interactive behavior (i.e., barrage density), so as to more accurately generate a cover image that suits the user's interests and improve the click-through rate and viewing rate of the video.

[0036] As an optional embodiment, a barrage density distribution array in each time period is calculated according to the barrage release time, including: obtaining the video length of the video file; dividing the video length into multiple time periods, wherein the length of each time period is the same; counting the number of barrages sent in each time period according to the barrage release time; using the number of barrages sent as the barrage density, and integrating the barrage densities of each time period to obtain a barrage density distribution array, wherein each barrage density in the barrage density distribution array is arranged in the order of the barrage release time.

[0037] You can use a video processing library (such as FFmpeg, moviepy, etc.) or an application programming interface of a video platform to obtain the video duration (in seconds or milliseconds) of a video file.

[0038] The video duration is divided into multiple equal time periods. For example, if the video duration is 600 seconds (10 minutes) and it is desired to be divided into 10 time periods, the duration of each time period is 60 seconds. The duration of each time period can be set according to actual conditions, and this application does not limit this.

[0039] Traverse the time when the barrage is released, and determine which time period each barrage release time belongs to; for each time period, count the number of barrages that fall within the time period; regard the number of barrages in each time period as the barrage density of the time period; integrate the barrage densities of all time periods into an array in the order of the time periods, namely the barrage density distribution array, where each element in the array represents the barrage density of a time period.

[0040] Since the local maximum value of the barrage density distribution array will be selected later, the barrage densities in the barrage density distribution array generated in this application are arranged in the order of the barrage release time.

[0041] As an optional embodiment, determining the target time period according to the barrage density distribution array includes: selecting at least one local maximum value from the barrage density distribution array, wherein the barrage density of the local maximum value is greater than the adjacent barrage density; arranging the local maxima in descending order to obtain a barrage density arrangement table; extracting the barrage density that is ranked before the target sequence number in the barrage density arrangement table; and determining the time period corresponding to the barrage density that is ranked before the target sequence number as the target time period.

[0042] At least one local maximum is selected from the bullet screen density distribution array, where the local maximum is defined as: its bullet screen density is greater than the adjacent bullet screen density (ie, the previous bullet screen density and the next bullet screen density that are arranged before the current bullet screen density).

[0043] All selected local maxima are sorted from high to low according to the density of bullet comments, and a bullet comment density arrangement table is obtained; all bullet comment densities before the target sequence number are extracted from the sorted list. The target sequence number can be set according to needs or specific conditions.

[0044] Because each barrage density is calculated based on the number of barrages released within a time period, each barrage density corresponds to a time period, and the time period corresponding to the barrage density before the target sequence number is determined as the target time period.

[0045] The barrage density of the target number is the density threshold, so the barrage density of the selected target time period is greater than the density threshold. If the barrage density of the target number is the same as the previous barrage density of the target number, then it is also possible that the barrage density of the target time period is equal to the density threshold.

[0046] By selecting local maxima and sorting them, the target time period with a higher density of barrage can be accurately identified, and the video content in the target time period can be regarded as video content with higher user activity or interest.

[0047] As an optional embodiment, selecting at least one local maximum value from the barrage density distribution array includes: comparing each barrage density in the barrage density distribution array with the adjacent barrage density, wherein the adjacent barrage density includes the barrage density before the barrage density and the barrage density after the barrage density; when the barrage density is greater than the previous barrage density and greater than the subsequent barrage density, determining that the barrage density is greater than the adjacent barrage density; and determining the barrage density greater than the adjacent barrage density as the local maximum.

[0048] Each element in the barrage density distribution array represents the barrage density in a time period.

[0049] Starting from the first element of the bullet discussion density distribution array, traverse one by one to the last element. For the current bullet discussion density currently traversed, it is necessary to compare it with the previous density (if it exists) and the next density (if it exists). If the current density is greater than the previous density (if it exists) and greater than the next density (if it exists), the current density is a local maximum. If the current density is less than or equal to the previous density (if it exists) or less than or equal to the next density (if it exists), the current density is not a local maximum. All bullet discussion densities that meet the local maximum conditions are recorded.

[0050] For example, if there are n elements in the bullet screen density distribution array, then the bullet screen density distribution array is represented as D = [D1, D2, D3, ..., D n ], where D iis the density of bullet comments in the i-th time period, if D i is a local maximum, then D i Need to meet: D i >D i-1 , and D i >D i+1 .

[0051] It should be noted that when traversing to the first element of the array, there is no previous barrage density to compare with, so it can be skipped or regarded as not meeting the local maximum condition; similarly, when traversing to the last element of the array, there is no subsequent barrage density to compare with, and it should also be skipped or regarded as not meeting the condition.

[0052] Peak detection of the bullet-chat density distribution array can be achieved by finding the local maximum, which can effectively identify the moments with high bullet-chat density in the video, which usually correspond to the segments that users are most interested in.

[0053] The local maximum can capture multiple important moments in the video, avoiding the moment concentration and insufficient representativeness problems that may be caused by focusing only on the global maximum, thereby selecting more attractive and diverse cover images and improving video click-through rate and user experience.

[0054] As an optional embodiment, a target image is selected from multiple key frame images through an aesthetic scoring algorithm, including: obtaining an aesthetic score of each key frame image through the aesthetic scoring algorithm; determining a key frame image whose aesthetic score is greater than a scoring threshold as a candidate frame image; and performing image optimization processing on the candidate frame images to obtain a target image.

[0055] Specifically, the aesthetic score of each key frame image is obtained through the aesthetic scoring algorithm, including: inputting each key frame image into the aesthetic scoring algorithm; the algorithm calculates and outputs an aesthetic score for each key frame image according to preset standards and weights.

[0056] The aesthetic scoring algorithm contains a series of criteria and corresponding weights for evaluating the aesthetic quality of images. These criteria may include image composition, color matching, contrast, clarity, subject prominence, etc.; the weight reflects the importance of each criterion in the overall score.

[0057] The ratings will typically have a preset range, e.g., 0 to 100, where higher ratings indicate an aesthetically superior image.

[0058] Optionally, some image preprocessing, such as image scaling, denoising, color correction, etc., can be performed before inputting the image into the algorithm to improve the accuracy and robustness of the algorithm.

[0059] Specifically, key frame images with aesthetic scores greater than a scoring threshold are determined as candidate frame images, including: setting a scoring threshold; traversing the aesthetic scores of all key frame images; and screening out images with scores greater than the scoring threshold as candidate frame images.

[0060] For example, assuming that there are M candidate images, the aesthetic scoring algorithm S is applied to calculate the score of each frame of the image. Let each frame of the image be Fi, then the score of each frame of the image can be expressed as:

[0061] S i =S(F i ), where i = 1, 2, 3, ..., M,

[0062] Rating S i Sort and obtain the image frames with the highest scores as candidate image frames.

[0063] The scoring threshold can be set according to the actual situation, including the overall quality and aesthetic standards of the image. A too low threshold may result in too many images being screened out, while a too high threshold may result in missing some potentially high-quality images.

[0064] Specifically, the candidate frame images are subjected to image optimization processing to obtain the target image. The purpose of image optimization processing is to improve the aesthetic quality and visual effect of the image.

[0065] The content of image optimization processing includes but is not limited to image processing technologies such as color correction, contrast adjustment, clarity enhancement and denoising. The composition of the image can also be adjusted, such as cropping, rotating, etc.

[0066] An image that meets aesthetic standards can be selected from multiple key frame images as a target image, providing high-quality material for the subsequent display of the video cover.

[0067] As an optional embodiment, obtaining barrage data of a video file includes: obtaining initial barrage data of the video file, wherein the initial barrage data includes barrage content and barrage release time, and the barrage content includes the content of all barrages issued by the user for the video file; extracting candidate barrage data whose barrage release time is after the target time from the initial barrage data; identifying and eliminating invalid barrage data in the candidate barrages through the barrage content to obtain target barrage data; and determining the barrage release time of the target barrage data as the barrage data.

[0068] Specifically, the initial barrage data of the video file is obtained, wherein the initial barrage data includes the barrage content and the time when the barrage is released, and the barrage content includes the content of all barrages issued by the user for the video file.

[0069] The barrage data includes the account that posted the barrage, the time of posting, and the content of the barrage.

[0070] The initial bullet comment data posted by users on the video sharing platform can be obtained through an API (Application Programming Interface).

[0071] If the video files and barrage data are already stored locally in a certain format (such as JSON, XML, etc.), then these files can be read directly.

[0072] Specifically, candidate barrage data whose barrage release time is after the target time is extracted from the initial barrage data, including: setting the target time to determine which barrages are recently released; traversing the initial barrage data, comparing the barrage release time of each barrage with the target time, and retaining the barrage data whose release time is after the target time as candidate barrage data.

[0073] When a barrage is published, it may be successfully published after being reviewed by the system. However, in order to ensure the validity of the barrage data, in an embodiment of the present application, the barrage content may be subjected to a secondary inspection to identify and eliminate invalid barrage data in the candidate barrages.

[0074] Specifically, the target barrage data is obtained by identifying the barrage content and eliminating invalid barrage data in the candidate barrages, including: using text analysis, natural language processing and other technologies to parse and evaluate the barrage content; according to the set invalid barrage identification standards, screening and eliminating barrages that do not meet the requirements.

[0075] The identification criteria for invalid barrage data may include but are not limited to: the barrage content is empty or only contains special characters; the barrage content is irrelevant to the video content, such as advertisements, spam, etc.

[0076] Since the subsequent barrage analysis is mainly the analysis of the number of barrages, this application directly determines the barrage release time of the target barrage data as the barrage data.

[0077] By acquiring and processing the barrage data of the video file from the initial barrage data, a data basis is provided for subsequent data analysis.

[0078] Figure 2 Another method for generating a video cover based on barrage provided for this application, as shown in the figure, includes in sequence: video acquisition (acquiring video and barrage data); calculating barrage density; peak detection; sorting and selection; extracting key frames; cover image selection (according to aesthetic algorithm); image optimization; selecting the final cover image.

[0079] As an optional embodiment, after using the target image as the video cover of the video file, the method also includes: if the number of video covers is greater than 1, switching the video cover being displayed every preset time period; when receiving a cover setting instruction, determining the target cover corresponding to the cover setting instruction, and continuously displaying the target cover.

[0080] Through the above-mentioned method for generating a video cover, at least one image can be obtained as a video cover. If there is only one video cover, then the video cover can be continuously displayed.

[0081] When the number of video covers is greater than 1, the automatic switching function can be enabled, such as setting a duration (for example, 5 seconds or 10 seconds, etc.) to determine the frequency of cover switching, and then switching the displayed video cover before the set time.

[0082] You can enable the cover rotation function before the video starts playing, when the playback is paused, or within a specific time period, and then use the API interface of the video playback software or platform to achieve automatic switching of the cover, switching to the next video cover every preset time.

[0083] When the number of video covers is greater than 1, the user can still trigger the cover setting function through interface operations or specific cover setting instructions. According to the target cover selected by the user in each video cover, it is set as the default cover of the video and is continuously displayed in scenes such as video playback and list display.

[0084] If the user changes the cover settings again through the cover setting instruction, just update the target cover and reapply it.

[0085] By changing the displayed video cover at preset time intervals and displaying the target cover selected by the user under user settings, users can be provided with a richer and more personalized video cover experience while meeting different usage scenarios and needs.

[0086] As an important form of user interaction, barrage often focuses on the key and exciting parts of the video. By analyzing the density of barrage, we can directly reflect the intensity of users' interest in each segment of the video.

[0087] The present application provides a method for generating a video cover based on barrage, including: obtaining barrage data of a video file, wherein the barrage data includes the time when each barrage is released; calculating the barrage density distribution array in each time period according to the time when the barrage is released; determining the target time period according to the barrage density distribution array, and obtaining multiple key frame images in the target time period, wherein the barrage density in the target time period is greater than the density threshold; selecting a target image from multiple key frame images through an aesthetic scoring algorithm, and using the target image as the video cover of the video file. By analyzing the density of barrages issued by users for a video, the video frame image with the highest user discussion degree is selected as the video cover, which solves the problem that the video cover cannot accurately reflect the user's interest points.

[0088] According to another aspect of the embodiment of the present application, the present application provides a video cover generation device based on bullet screen, such as Figure 3 As shown, including:

[0089] The acquisition module 302 is used to acquire the bullet screen data of the video file, wherein the bullet screen data includes the bullet screen release time of each bullet screen;

[0090] The calculation module 304 is used to calculate the density distribution array of the bullet comments in each time period according to the bullet comment release time;

[0091] A determination module 306 is used to determine a target time period according to the bullet chat density distribution array, and obtain a plurality of key frame images within the target time period, wherein the bullet chat density within the target time period is greater than a density threshold;

[0092] The selection module 308 is used to select a target image from a plurality of key frame images by using an aesthetic scoring algorithm, and use the target image as a video cover of the video file.

[0093] It should be noted that the acquisition module 302 in this embodiment can be used to execute step 101 in the embodiment of the present application, the calculation module 304 in this embodiment can be used to execute step 103 in the embodiment of the present application, the determination module 306 in this embodiment can be used to execute step 105 in the embodiment of the present application, and the determination module 306 in this embodiment can be used to execute step 107 in the embodiment of the present application.

[0094] Optionally, the calculation module 304 is also used to obtain the video length of the video file; divide the video length into multiple time periods, wherein the length of each time period is the same; count the number of barrages sent in each time period according to the time when the barrage is released; use the number of barrages sent as the barrage density, and integrate the barrage densities of each time period to obtain a barrage density distribution array, wherein each barrage density in the barrage density distribution array is arranged in the order of the barrage release time.

[0095] Optionally, the determination module 306 includes:

[0096] A selection submodule, used to select at least one local maximum value from the bullet screen density distribution array, wherein the bullet screen density of the local maximum value is greater than the density of adjacent bullet screens;

[0097] The arrangement submodule is used to arrange each local maximum value in descending order to obtain a bullet comment density arrangement table;

[0098] An extraction submodule, used to extract the density of the bullet comments that is arranged before the target sequence number in the bullet comment density arrangement table;

[0099] The determination submodule is used to determine the time period corresponding to the density of the bullet comments before the target sequence number as the target time period.

[0100] Optionally, the selection submodule is also used to compare each barrage density in the barrage density distribution array with the adjacent barrage density, wherein the adjacent barrage density includes the barrage density before the barrage density and the barrage density after the barrage density; when the barrage density is greater than the previous barrage density and greater than the subsequent barrage density, it is determined that the barrage density is greater than the adjacent barrage density; and the barrage density greater than the adjacent barrage density is determined as the local maximum.

[0101] Optionally, the selection module 308 is further configured to obtain an aesthetic score of each key frame image through an aesthetic scoring algorithm; determine a key frame image having an aesthetic score greater than a scoring threshold as a candidate frame image; and perform image optimization processing on the candidate frame image to obtain a target image.

[0102] Optionally, the acquisition module 302 is also used to obtain initial barrage data of the video file, wherein the initial barrage data includes barrage content and barrage release time, and the barrage content includes the content of all barrages issued by the user for the video file; extracting candidate barrage data whose barrage release time is after the target time from the initial barrage data; identifying and eliminating invalid barrage data in the candidate barrages through the barrage content to obtain the target barrage data; and determining the barrage release time of the target barrage data as the barrage data.

[0103] Optionally, the device also includes a display module, which is used to switch the video cover being displayed every preset time period after the target image is used as the video cover of the video file if the number of video covers is greater than 1; when a cover setting instruction is received, determine the target cover corresponding to the cover setting instruction, and continuously display the target cover.

[0104] It should be noted here that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.

[0105] According to another aspect of the embodiments of the present application, the present application provides an electronic device, such as Figure 4 As shown, it includes a memory 401, a processor 403, a communication interface 405 and a communication bus 407. The memory 401 stores a computer program that can be run on the processor 403. The memory 401 and the processor 403 communicate through the communication interface 405 and the communication bus 407. When the processor 403 executes the computer program, the steps of the above method are implemented.

[0106] The memory and processor in the above electronic device communicate via a communication bus and a communication interface. The communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc.

[0107] 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.

[0108] 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.

[0109] According to another aspect of the embodiments of the present application, a computer-readable medium having a non-volatile program code executable by a processor is provided.

[0110] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0111] When the embodiments of the present application are specifically implemented, reference may be made to the above-mentioned embodiments, which have corresponding technical effects.

[0112] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.

[0113] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0114] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0116] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0117] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0118] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0119] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.

[0120] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A video cover generation method based on bullet screen, characterized in that: include: Obtaining bullet screen data of a video file, wherein the bullet screen data includes the bullet screen release time of each bullet screen; Calculate the density distribution array of the bullet comments in each time period according to the bullet comment release time; Determine a target time period according to the bullet chat density distribution array, and obtain a plurality of key frame images within the target time period, wherein the bullet chat density within the target time period is greater than a density threshold; A target image is selected from the plurality of key frame images by using an aesthetic scoring algorithm, and the target image is used as the video cover of the video file.

2. The method according to claim 1, characterized in that The calculation of the barrage density distribution array in each time period according to the barrage release time includes: Obtain the video duration of the video file; Divide the duration of the video into a plurality of time periods, wherein the duration of each time period is the same; According to the bullet comment release time, the number of bullet comments sent in each time period is counted; The number of barrages sent is used as the barrage density, and the barrage densities in each of the time periods are integrated to obtain the barrage density distribution array, wherein the barrage densities in the barrage density distribution array are arranged in the order of the barrage release time.

3. The method according to claim 1, characterized in that The determining the target time period according to the bullet screen density distribution array includes: Selecting at least one local maximum value from the bullet screen density distribution array, wherein the bullet screen density of the local maximum value is greater than the density of an adjacent bullet screen; Arrange the local maximum values ​​in descending order to obtain a bullet screen density arrangement table; Extract the barrage density that is ranked before the target sequence number in the barrage density arrangement table; The time period corresponding to the barrage density before the target sequence number is determined as the target time period.

4. The method according to claim 3, characterized in that The selecting at least one local maximum value from the bullet screen density distribution array comprises: Compare each of the barrage density in the barrage density distribution array with the adjacent barrage density, wherein the adjacent barrage density includes a barrage density that is before the barrage density and a barrage density that is after the barrage density; When the barrage density is greater than the previous barrage density and greater than the next barrage density, determining that the barrage density is greater than the adjacent barrage density; The barrage density greater than the adjacent barrage density is determined as the local maximum.

5. The method according to claim 1, characterized in that The step of selecting a target image from the plurality of key frame images by using an aesthetic scoring algorithm comprises: Obtaining an aesthetic score for each of the key frame images by using the aesthetic scoring algorithm; Determine the key frame image whose aesthetic score is greater than a score threshold as a candidate frame image; Perform image optimization processing on the candidate frame image to obtain the target image.

6. The method according to claim 1, characterized in that The step of obtaining the bullet screen data of the video file includes: Acquire initial barrage data of the video file, wherein the initial barrage data includes barrage content and the time when the barrage is released, and the barrage content includes the content of all barrages issued by the user for the video file; Extracting candidate barrage data whose barrage release time is after the target time from the initial barrage data; Identify the target barrage data by identifying the barrage content and eliminating invalid barrage data in the candidate barrages; The barrage release time of the target barrage data is determined as the barrage data.

7. The method according to claim 1, characterized in that After using the target image as the video cover of the video file, the method further includes: If the number of the video covers is greater than 1, the video covers being displayed are switched every preset time interval; When a cover setting instruction is received, a target cover corresponding to the cover setting instruction is determined, and the target cover is continuously displayed.

8. A video cover generation device based on bullet screen, characterized in that: include: An acquisition module, used to acquire the bullet screen data of the video file, wherein the bullet screen data includes the bullet screen release time of each bullet screen; A calculation module, used for calculating the density distribution array of the barrage in each time period according to the barrage release time; A determination module, configured to determine a target time period according to the bullet chat density distribution array, and obtain a plurality of key frame images within the target time period, wherein the bullet chat density within the target time period is greater than a density threshold; The selection module is used to select a target image from the multiple key frame images through an aesthetic scoring algorithm, and use the target image as the video cover of the video file.

9. An electronic device, comprising a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, and the memory and the processor communicate through the communication bus and the communication interface, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the method according to any one of claims 1 to 7.