Picture generation method and device, equipment, storage medium and computer program product
By identifying video frame elements and barrage content, combined with picture-based text technology, it solves the problem of low utilization of barrage content, generates high-quality pictures related to videos, enhances user interactivity and enhances the value of the platform.
Patent Information
- Application Number
- CN202410870833.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-09-06
AI Technical Summary
In the existing technology, the utilization rate of barrage content is low, it cannot effectively reflect the current screen content, and it is difficult to generate high-quality pictures by combining multiple people's barrage.
By identifying the target elements in the target video frame, inferring the prompt words from the picture and text, generating pictures based on the barrage content, filtering and combining the barrage filtering parameters and user emotional attitudes to generate pictures related to the video content.
It improves the utilization rate of barrage content, and the generated pictures are related to the video content, which enhances user interactivity and can be used as a unique digital collection to enhance the value of the platform.
Smart Images

Figure CN118612499A
Abstract
Description
Technical Field
[0001] The present application relates to the field of picture generation technology, and in particular to a picture generation method, device, equipment, storage medium and computer program product. Background Art
[0002] With the development of technology, current live broadcast platforms all provide the function of sending barrage, but the existing technology only directly displays the barrage content, resulting in low utilization rate of the barrage content. Summary of the invention
[0003] The purpose of this application is to provide a picture generation method, device, equipment, storage medium and computer program product to solve the problem of low utilization rate of barrage content in the prior art.
[0004] In order to solve the above technical problems, the present application provides a method for generating an image, including:
[0005] identifying a target element in at least one video frame of a target video;
[0006] Performing a reverse operation of image-to-text prompt words on the at least one video frame to obtain generated prompt words corresponding to the at least one video frame;
[0007] Obtain target barrage content according to the target element, the generated prompt word, and the barrage content for the target video;
[0008] Generate a picture according to the target barrage content.
[0009] Optionally, obtaining target barrage content according to the target element, the generated prompt word, and the barrage content for the target video includes:
[0010] Obtaining bullet screen filtering parameters according to the target element and the generated prompt word;
[0011] From the bullet-screen content for the target video, the bullet-screen content that matches at least one parameter in the bullet-screen filtering parameters is obtained as the target bullet-screen content.
[0012] Optionally, the bullet screen filtering parameters include: first category prompt words and second category prompt words;
[0013] The first category of prompt words includes: generated prompt words that match at least one of the target elements; the second category of prompt words includes: generated prompt words that do not match the target element.
[0014] Optionally, generating a picture according to the target barrage content includes:
[0015] Determining the user's emotional attitude corresponding to the target barrage content;
[0016] According to the emotional attitude, the users are screened and grouped to obtain a first grouping result;
[0017] According to the first grouping result, the target bullet chat content is divided to obtain at least one bullet chat group;
[0018] Combining the bullet screen contents according to the at least one bullet screen group to obtain a prompt word combination;
[0019] Generate a picture according to the prompt word combination.
[0020] Optionally, combining the bullet-screen content according to the at least one bullet-screen group to obtain a prompt word combination includes:
[0021] Obtaining a first content that does not match the barrage filtering parameter among the barrage contents included in the barrage group;
[0022] When the first content is acquired, the barrage group is divided according to all the first contents corresponding to the user to obtain a barrage sub-group corresponding to the barrage group; and each barrage content included in the barrage sub-group is combined to obtain a prompt word combination;
[0023] In the case where the first content is not obtained, the barrage contents included in the barrage group are combined to obtain a prompt word combination.
[0024] Optionally, dividing the barrage group according to all the first contents corresponding to the user to obtain barrage sub-groups corresponding to the barrage group includes:
[0025] Obtaining a total semantic vector of all the first contents corresponding to the user;
[0026] Performing clustering processing on the total semantic vector to obtain a second grouping result of the user;
[0027] According to the second grouping result, the barrage group is divided to obtain at least one barrage sub-group.
[0028] Optionally, combining the contents of the bullet comments contained in the bullet comment subgroup to obtain a prompt word combination includes:
[0029] According to the bullet-screen content contained in the bullet-screen subgroup, the user is graded to obtain grade information of the user;
[0030] According to the level information and the first rule, the contents of the bullet comments contained in the bullet comment subgroup are combined to obtain a prompt word combination;
[0031] Among them, the first rule includes: combining the barrage contents corresponding to at least two users whose level difference is greater than a threshold, and the combined content includes all the contents of the first category of prompt words in the barrage filtering parameters; the first category of prompt words includes: generated prompt words that match at least one of the target elements.
[0032] Optionally, also include:
[0033] According to the mapping relationship between the target element corresponding to the bullet-screen filtering parameter and the generated prompt word, at least one bullet-screen word in the prompt word combination is converted into a prompt word to obtain a final prompt word combination.
[0034] The embodiment of the present application also provides a picture generating device, including:
[0035] A first processing module, configured to identify a target element in at least one video frame of a target video;
[0036] The second processing module is used to perform a reverse operation of the prompt word of the image-to-text on the at least one video frame to obtain the generated prompt words corresponding to the at least one video frame;
[0037] A third processing module is used to obtain target barrage content according to the target element, the generated prompt word and the barrage content for the target video;
[0038] The fourth processing module is used to generate a picture according to the target barrage content.
[0039] Optionally, obtaining target barrage content according to the target element, the generated prompt word, and the barrage content for the target video includes:
[0040] Obtaining bullet screen filtering parameters according to the target element and the generated prompt word;
[0041] From the bullet-screen content for the target video, the bullet-screen content that matches at least one parameter in the bullet-screen filtering parameters is obtained as the target bullet-screen content.
[0042] Optionally, the bullet screen filtering parameters include: first category prompt words and second category prompt words;
[0043] The first category of prompt words includes: generated prompt words that match at least one of the target elements; the second category of prompt words includes: generated prompt words that do not match the target element.
[0044] Optionally, generating a picture according to the target barrage content includes:
[0045] Determining the user's emotional attitude corresponding to the target barrage content;
[0046] According to the emotional attitude, the users are screened and grouped to obtain a first grouping result;
[0047] According to the first grouping result, the target bullet chat content is divided to obtain at least one bullet chat group;
[0048] Combining the bullet screen contents according to the at least one bullet screen group to obtain a prompt word combination;
[0049] Generate a picture according to the prompt word combination.
[0050] Optionally, combining the bullet-screen content according to the at least one bullet-screen group to obtain a prompt word combination includes:
[0051] Obtaining a first content that does not match the barrage filtering parameter among the barrage contents included in the barrage group;
[0052] When the first content is acquired, the barrage group is divided according to all the first contents corresponding to the user to obtain a barrage sub-group corresponding to the barrage group; and each barrage content included in the barrage sub-group is combined to obtain a prompt word combination;
[0053] In the case where the first content is not obtained, the barrage contents included in the barrage group are combined to obtain a prompt word combination.
[0054] Optionally, dividing the barrage group according to all the first contents corresponding to the user to obtain barrage sub-groups corresponding to the barrage group includes:
[0055] Obtaining a total semantic vector of all the first contents corresponding to the user;
[0056] Performing clustering processing on the total semantic vector to obtain a second grouping result of the user;
[0057] According to the second grouping result, the barrage group is divided to obtain at least one barrage sub-group.
[0058] Optionally, combining the contents of the bullet comments contained in the bullet comment subgroup to obtain a prompt word combination includes:
[0059] According to the bullet-screen content contained in the bullet-screen subgroup, the user is graded to obtain grade information of the user;
[0060] According to the level information and the first rule, the contents of the bullet comments contained in the bullet comment subgroup are combined to obtain a prompt word combination;
[0061] Among them, the first rule includes: combining the barrage contents corresponding to at least two users whose level difference is greater than a threshold, and the combined content includes all the contents of the first category of prompt words in the barrage filtering parameters; the first category of prompt words includes: generated prompt words that match at least one of the target elements.
[0062] Optionally, also include:
[0063] The fifth processing module is used to convert at least one bullet-screen word in the prompt word combination into a prompt word according to the mapping relationship between the target element corresponding to the bullet-screen filtering parameter and the generated prompt word, so as to obtain a final prompt word combination.
[0064] An embodiment of the present application also provides an image generating device, including a memory, a processor, and a program stored in the memory and executable on the processor; when the processor executes the program, the above-mentioned image generating method is implemented.
[0065] The embodiment of the present application also provides a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, the steps in the above-mentioned image generation method are implemented.
[0066] The embodiment of the present application also provides a computer program product, including computer instructions, which implement the steps of the above-mentioned image generation method when executed by a processor.
[0067] The beneficial effects of the above technical solution of the present application are as follows:
[0068] In the above scheme, the image generation method identifies the target element in at least one video frame of the target video; performs a reverse operation of the prompt word of the image-to-text for the at least one video frame to obtain the generated prompt word corresponding to the at least one video frame; obtains the target barrage content according to the target element, the generated prompt word and the barrage content for the target video; generates an image according to the target barrage content; and can support the generation of an image reflecting the current screen content according to the barrage content, thereby improving the utilization rate of the barrage content. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 This is a schematic diagram of the picture generation method flow in an embodiment of the present application;
[0070] Figure 2 The specific implementation process of the image generation method of the embodiment of the present application is shown as follows: Figure 1 ;
[0071] Figure 3 The specific implementation process of the image generation method of the embodiment of the present application is shown as follows: Figure 2 ;
[0072] Figure 4 The video frame of the embodiment of the present application is shown as follows: Figure 1 ;
[0073] Figure 5 The video frame of the embodiment of the present application is shown as follows: Figure 2 ;
[0074] Figure 6 The video frame of the embodiment of the present application is shown as follows: Figure 3 ;
[0075] Figure 7 This is a picture showing an embodiment of the present application. Figure 1 ;
[0076] Figure 8 This is a picture showing an embodiment of the present application. Figure 2 ;
[0077] Fig. 9 This is a schematic diagram of the structure of a picture generating device according to an embodiment of the present application. DETAILED DESCRIPTION
[0078] In order to make the technical problems, technical solutions and advantages to be solved by the present application clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0079] First, the relevant contents of the embodiments of the present application are introduced.
[0080] AIGC (Artificial Intelligence Generated Content) refers to the use of artificial intelligence technology to generate various forms of content. These contents can include text, images, audio, video, etc., and are widely used in various application fields. The implementation of AIGC usually relies on trained neural network models, which understand and imitate the process of human content creation by learning a large amount of data. In the field of image generation, the model can learn to understand the content and features of the image from the description or context, and generate images that meet the description. Currently, the commonly used text-generated image technologies are all based on diffusion models, including general generation frameworks such as midjourney, Dall3 / Dall4, and the open source stablediffusion model. They all support users to generate the images they need by inputting text prompts; as long as the prompts are accurate and the descriptions are clear, high-quality images can be generated.
[0081] In the live broadcast scenario of sports events, users usually interact while watching the game by sending barrages, and express their views and opinions on the game content through barrage texts; if pictures can be generated from the real-time barrages sent by users, and the content of the pictures is related to the game content, then it will not only enhance the user's sense of interaction and participation in watching the game, but also the barrages sent by each user are different, so the generated pictures can be used as unique posters or NFT (Non-FungibleToken, non-fungible token) digital collectibles, which may stimulate users' interest in collecting and trading these unique digital assets, thereby bringing additional value and revenue to the platform.
[0082] Specifically, the major live broadcast platforms currently provide the function of sending bullet comments when watching games, but none of them provide the ability to generate pictures based on bullet comments and the generated pictures are related to the current screen and content of the video. Specifically, there are the following two problems:
[0083] 1) How to filter the bullet comments so that the bullet comments used as the prompt words for generating pictures can reflect the content, theme and emotion of the current picture; only the content that matches the current picture can form a good interaction with the user, otherwise the picture with extremely irrelevant content will be generated, affecting the user's viewing experience;
[0084] 2) How to combine the barrages sent by multiple people to form a reasonable prompt word combination. Many users will send barrages for the same climax picture. How to reasonably combine these barrages to outline a higher-quality picture needs to be solved.
[0085] Based on the above, this application provides a method for generating pictures to solve the problem of low utilization rate of bullet screen content in the existing technology, such as Figure 1 As shown, including:
[0086] Step 11: identifying a target element in at least one video frame of the target video;
[0087] Step 12: performing a reverse operation of the prompt word of the image-to-text for the at least one video frame to obtain the generated prompt words corresponding to the at least one video frame;
[0088] Step 13: Obtain target bullet screen content according to the target element, the generated prompt word, and the bullet screen content for the target video;
[0089] Step 14: Generate a picture according to the target barrage content.
[0090] in, Figure 1The scheme shown can be executed on at least one of the client (such as a terminal) and the server; "target element in at least one video frame of the target video" can be understood as the core element of the climax video frame (such as players, teams, etc. in live event scenarios), or elements with attention higher than a certain threshold, or predefined elements, etc.; but it is not limited to this.
[0091] The image generation method provided in the embodiment of the present application identifies the target element in at least one video frame of the target video; performs a reverse operation of the prompt word of the image-to-text for the at least one video frame to obtain the generated prompt word corresponding to the at least one video frame; obtains the target barrage content according to the target element, the generated prompt word and the barrage content for the target video; generates an image according to the target barrage content; can support the generation of an image reflecting the current screen content according to the barrage content, improve the utilization rate of the barrage content, and can form a good interaction with the user to further enhance the user experience.
[0092] The step of obtaining target bullet content according to the target element, the generated prompt word, and the bullet content for the target video includes: obtaining bullet filter parameters according to the target element and the generated prompt word; and obtaining bullet content matching at least one parameter in the bullet filter parameters from the bullet content for the target video as the target bullet content. In this way, the target bullet content can be accurately obtained.
[0093] In the embodiment of the present application, the bullet chat filtering parameters include: a first category of prompt words and a second category of prompt words; wherein the first category of prompt words includes: (at least one) generated prompt word that matches at least one of the target elements; the second category of prompt words includes: (at least one) generated prompt word that does not match the target element. This ensures the diversity of bullet chat filtering parameters.
[0094] The step of generating a picture according to the target barrage content includes: determining the emotional attitude of the user corresponding to the target barrage content; filtering and grouping the user according to the emotional attitude to obtain a first grouping result; dividing the target barrage content according to the first grouping result to obtain at least one barrage group; combining the barrage content according to the at least one barrage group to obtain a prompt word combination; and generating a picture according to the prompt word combination. This supports preliminary prediction of the picture in the user's mind, accurately filters and combines the target barrage content, and accurately generates a picture.
[0095] Among them, the combining of the barrage contents according to the at least one barrage group to obtain the prompt word combination includes: obtaining the first content that does not match the barrage filter parameter from the barrage contents contained in the barrage group; when the first content is obtained, dividing the barrage group according to all the first contents corresponding to the user to obtain the barrage sub-group corresponding to the barrage group; combining the barrage contents contained in the barrage sub-group to obtain the prompt word combination; when the first content is not obtained, combining the barrage contents contained in the barrage group to obtain the prompt word combination. This can support further prediction and classification of the user's imagined pictures so as to obtain the corresponding prompt word combination. Among them, a barrage sub-group can be used as a barrage set, but is not limited to this.
[0096] In an embodiment of the present application, the barrage group is divided according to all the first contents corresponding to the user to obtain the barrage sub-group corresponding to the barrage group, including: obtaining the total semantic vector of all the first contents corresponding to the user; clustering the total semantic vector to obtain the second grouping result of the user; according to the second grouping result, the barrage group is divided to obtain at least one barrage sub-group. In this way, the barrage sub-group can be accurately obtained according to the first content. Among them, "obtaining the total semantic vector of all the first contents corresponding to the user" may include: obtaining the semantic vectors corresponding to all the first contents corresponding to the user, respectively, and adding the obtained semantic vectors to obtain the total semantic vector, but is not limited to this.
[0097] The method of combining the contents of the bullet-screen subgroups to obtain a prompt word combination includes: grading the users according to the contents of the bullet-screen subgroups to obtain the level information of the users; combining the contents of the bullet-screen subgroups according to the level information and a first rule to obtain a prompt word combination; wherein the first rule includes: combining the contents of the bullet-screen corresponding to at least two users whose level difference is greater than a threshold, and the combined contents include all the contents of the first category of prompt words in the bullet-screen filtering parameters; the first category of prompt words includes: generated prompt words that match at least one of the target elements. In this way, a prompt word combination can be obtained more specifically and accurately. Among them, "grading the users according to the barrage content contained in the barrage sub-group to obtain the grade information of the users" may include: dividing the number of prompt words contained in the barrage content corresponding to the users (i.e., the number of barrage words (or barrage texts) in the barrage content corresponding to the users that match the barrage filtering parameters) by the total number of parameters of the barrage filtering parameters to obtain the grade weight of each user; and using the grade weight as the grade information of the users, but not limited to this.
[0098] Furthermore, the image generation method also includes: according to the mapping relationship between the target element corresponding to the barrage filtering parameter and the generated prompt word, at least one barrage word in the prompt word combination is converted into a prompt word to obtain a final prompt word combination. In this way, a more accurate prompt word combination can be obtained. In addition, the above "according to the level information and the first rule, the barrage contents contained in the barrage subgroup are combined to obtain a prompt word combination" can also be expressed as: according to the level information and the first rule, the barrage contents contained in the barrage subgroup are combined to obtain a prompt word combination; correspondingly, according to the level information and the first rule, the barrage contents contained in the barrage subgroup are combined to obtain a prompt word combination, which may include: according to the level information and the first rule, the barrage contents contained in the barrage subgroup are combined to obtain a candidate combination; according to the mapping relationship between the target element corresponding to the barrage filtering parameter and the generated prompt word, at least one barrage word in the candidate combination is converted into a prompt word to obtain a prompt word combination; it is not limited here.
[0099] In an embodiment of the present application, the image generation method further includes: displaying the image according to the user identifier; wherein the target bullet screen content corresponding to the user identifier is displayed on the image, so as to support personalized display.
[0100] The step of obtaining, from the bullet-screen content for the target video, bullet-screen content that matches at least one parameter in the bullet-screen filtering parameters as the target bullet-screen content includes: filtering the bullet-screen content for the target video to obtain filtered bullet-screen content; and obtaining, from the filtered bullet-screen content, bullet-screen content that matches at least one parameter in the bullet-screen filtering parameters as the target bullet-screen content. This can support subsequent improvement of processing speed and accuracy.
[0101] Furthermore, before identifying the target element in at least one video frame of the target video, it also includes: when the number of bullet-screen contents for the candidate video meets the increase condition, the bullet-screen contents for the candidate video are used as the bullet-screen contents for the target video. This supports triggering the execution of the embodiment of the present application only under specific circumstances. Among them, the increase condition may include: a sharp increase in quantity; such as the increase in the number of bullet-screen contents within a certain period of time exceeds the first threshold, or the increase rate exceeds the second threshold, etc.
[0102] The following is an example of the image generation method provided in the embodiment of the present application, taking the target video in the event live broadcast scenario as an example.
[0103] In response to the above technical problems, an embodiment of the present application provides a method for generating an image, which can be specifically implemented as a method for generating an image based on multi-person barrage in a live broadcast scenario, mainly involving: 1) a screening and combination mechanism for multi-person barrages, which can reasonably combine barrages sent by multiple people to form a good combination of generated prompt words, and support the combination of user barrages to generate high-quality images related to the live video content; 2) an image element matching (filtering) mechanism based on image-generated text, which can identify and filter the barrages sent by users so that the barrage content can fit the current picture as much as possible; it can also be understood as being able to screen the barrages sent by users to ensure that the pictures synthesized by the barrages are similar to the current live broadcast picture; 3) a user feedback mechanism in a live broadcast environment, which can allow users to intuitively feel the generated results and the user's contribution after sending the barrage to generate pictures, thereby further guiding the user; it can also be understood as a way of displaying generated pictures, giving users feedback, and guiding users to send high-quality barrages to generate pictures.
[0104] Specifically, the embodiments of the present application can be as follows Figure 2 As shown, the following steps are included:
[0105] Step 21, identifying the climax scene according to the number of bullet comments;
[0106] Specifically, for example, during a live broadcast of an event, the number of barrages is detected in real time. When the number of barrages increases sharply in a certain time period (for example, the number of barrages exceeds a threshold within a period of time), the video content in this time period can be considered to be climax content (corresponding to the above-mentioned situation where the number of barrage contents for the candidate video meets the increase condition, the barrage content for the candidate video is used as the barrage content for the target video), thereby triggering the mechanism of generating barrage pictures; this is because climax pictures are attractive to users, and the more barrages there are, the more information is obtained; this step outputs the barrage content sent by each user in the time window (i.e., time period), for example:
[0107] {User 1, barrage 1, barrage 2,…, barrage n1}.
[0108] Step 22, preliminarily filtering the bullet comments within the time window (for example, removing the bullet comments with modal particles through the text semantic model), and outputting the filtered bullet comments; corresponding to the above, filtering the bullet comment content for the target video to obtain the filtered bullet comment content;
[0109] Step 23, processing the bullet screen to generate a prompt word combination;
[0110] Specifically, for example, in this step, the picture element matching mechanism based on image-generated text and the screening and combination mechanism for multi-person barrages of the embodiment of the present application can be used to process the barrages (the specific contents of these two mechanisms are described below), and a reasonable barrage combination is output as a generated prompt word combination of the picture (corresponding to the above prompt word combination); finally, output is performed, for example:
[0111] {combination ID, barrage 1, barrage 2, ..., barrage n2};
[0112] The combination ID is generated by the system, and the barrages in the combination can come from barrages sent by different users; the generated prompt word combinations corresponding to different combination IDs may contain the same or different barrages; there is no limitation here.
[0113] Step 24, generating a picture according to the prompt word combination;
[0114] Specifically, for example, after obtaining the prompt word combination, the stable diffusion model of the stable diffusion server can be used to operate the text image; the generated image can be output in the form of a binary stream;
[0115] Step 25, processing the generated image and displaying it to the user;
[0116] The generated image is processed according to the feedback mechanism and displayed in the live broadcast screen to inform the user (i.e., prompt the user) that the barrage he / she sent has contributed to the generation of this image.
[0117] The following is a detailed introduction to the image element matching mechanism based on image-generated text in the above step 23 and the screening and combination mechanism for multi-person bullet comments.
[0118] Part 1, regarding the image element matching mechanism based on image-generated text (also referred to as the image element matching method based on image-generated text), it is possible to further filter the user bullet comments, and the input is the bullet comment data such as {user 1, bullet comment 1, bullet comment 2, ..., bullet comment n}; based on this, Figure 3 As shown, the mechanism may specifically include the following steps:
[0119] Step 31, identifying the core elements of the video frame group;
[0120] For example: obtaining a time window of a climax video clip, extracting video frames within the time window to form a video frame group; using a video understanding model, an action recognition model, or other models to (recognize) extract the core elements in the video frame by frame (corresponding to the target elements in at least one video frame of the above-mentioned recognition target video); the core elements can be predefined, but are not limited to this; for example Figure 4As shown, for a live event scenario, the core elements may include: players, teams, actions, game conditions, etc.
[0121] In the embodiment of the present application, the results of video recognition can be integrated according to their respective categories to form a multi-category set, as follows:
[0122] {Players: PlayerA1, PlayerA2, PlayerA3, PlayerA4};
[0123] {Team: Team B1, Team B2};
[0124] {Action: jump, block, raise arm, shoot, hook, ...};
[0125] {Game situation: heading, defending, positioning, ...}.
[0126] Step 32, reverse inference of the prompt words of the image-generated text;
[0127] Specifically, for example, the stable diffusion model is used to reverse the prompt word of the image-generated text for each frame in the above video frame group to generate the generated prompt word for each frame (corresponding to the above reverse operation of the prompt word of the image-generated text for the at least one video frame to obtain the generated prompt word corresponding to the at least one video frame). Figure 5 and Figure 6 After inferring the prompt words of the image-generated text, the same prompt words can be merged to form the following prompt word set:
[0128] {character, player, team B1, team B2, football, jump, lift leg, shoot, fade away shot, hook shot, defend, fierce, bend over, lower head, run, ...};
[0129] Step 33, generating a bullet screen filter reference set (corresponding to the above bullet screen filter parameters);
[0130] Specifically, for example: first use a fine-tuned BERT (Bidirectional Encoder Representations from Transformers) model to perform text semantic classification of the prompt word set, wherein the model is trained according to the classification in step 31 of this section, so that the prompt words can be divided into categories such as players, teams, actions, and game conditions; then map the prompt words to the video recognition results through the mapping relationship defined in the embodiment of the present application. This step can support the establishment of a connection between the bullet screen sent by the user and the text image prompt words (the video recognition result and the bullet screen use a similar expression method). For example, the prompt word "character" can be mapped to specific characters such as "Player A1" and "Player A2", and the prompt word "backward shot" can be mapped to recognized actions such as "shooting" and "back hook";
[0131] Among them, the above mapping is established, on the one hand, because there is a difference between the bullet comments sent by users and the prompt words of the text image. The bullet comments tend to be more intuitive descriptions of the pictures by users, while the prompt words focus on the components of the pictures. The connection is established through the mapping method to determine whether the user's bullet comments have the elements of the text image; on the other hand, the user's bullet comments can also be converted into generated prompt words when generating pictures, providing a basis for subsequent processing.
[0132] Finally, according to the mapping result (of the mapping of prompt words to video recognition results), a bullet screen filter reference set is generated (corresponding to the bullet screen filter parameters obtained according to the target element and the generated prompt words), which includes the mapped prompt words (converted into the expression form of bullet screen, that is, the prompt words matching the core element are converted into the expression form of bullet screen) and the unmapped prompt words (corresponding to the bullet screen filter parameters including: the first category of prompt words and the second category of prompt words; wherein the first category of prompt words includes: the generated prompt words matching at least one of the target elements; the second category of prompt words includes: the generated prompt words not matching the target element), and the following set may be generated:
[0133] {Player A1, player A2, player A3, player A4, player, team B1, team B2, football, jumping, leg raising, shooting, backward shot, hook, shooting, defending, competing for header, defending, fierce positioning, bending over, lowering head, running, ...}; the mapped barrage text (that is, the barrage text converted from the mapped prompt word) can be marked, for example, in bold, for example, "Player A1, player A2, player A3, player A4, jumping, hook, shooting, competing for header, defending, fierce positioning" is bolded.
[0134] Among them, the BERT model is fine-tuned in the live broadcast scenario for text semantic classification, and the prompt word set in the field of sports events is classified. The process mainly includes: first, collect and mark the text data in the field of sports events (such as players, teams, actions, game conditions, etc.), and then pre-process the data, including word segmentation and adding special tags (for example, for the processing of a paragraph, word segmentation and tagging are performed to obtain the form shown in step 31 of this section). After that, use the pre-trained BERT model (such as BERT Base (Basic BERT)) as the basic model, and learn the specific field features in the sports event data by fine-tuning the model; select the appropriate training strategy (such as learning rate, batch size, optimizer, etc.), regularly evaluate the model performance on the validation set, and adjust the strategy. After evaluating the classification performance of the model on the test set, the fine-tuned model can be used for actual text semantic classification tasks.
[0135] Step 34, filtering users according to the bullet screen filtering reference set;
[0136] Specifically, for example: the barrage of all users in the time window is filtered according to the barrage filtering reference set, and the filtering rule is: if the user's barrage contains elements in the reference set, the user's barrage will be retained as a participant in generating the picture (from the barrage content of the target video, the barrage content that matches at least one parameter in the barrage filtering parameters is obtained as the target barrage content); otherwise the user's barrage will be removed and will not participate in the generation.
[0137] The above filtering is used to identify and filter the barrages sent by users, so that the barrage content can fit the current screen as much as possible. Then, a screening and combination mechanism for multi-person barrages can be executed to form a prompt word combination, as shown in the following part 2.
[0138] Part 2, the screening and combination mechanism for multi-person bullet comments (also known as the screening and combination method for multi-person bullet comments), such as Figure 3 As shown, the mechanism may specifically include the following steps:
[0139] Step 35, judging the user's attitude towards the comments;
[0140] Specifically, for example: according to the bullet comments sent by each user, the emotional attitude of each user towards the current screen can be identified, which can be divided into three types: positive, negative and neutral (corresponding to the above-mentioned determination of the emotional attitude of the user corresponding to the target bullet comment content; according to the emotional attitude, the users are screened and grouped to obtain a first grouping result; according to the first grouping result, the target bullet comment content is divided to obtain at least one bullet comment group); More specifically, a text emotion classification model can be used to identify the emotions expressed by the bullet comment text to divide the users into three major groups; for example Figure 6The main character in the video is player A1, and the user comments can be divided into:
[0141] {(positive) support player A1, (negative) hate player A1, (neutral) just watch the game}.
[0142] Step 36, removing the bullet comments related to the prompt word element; corresponding to the above-mentioned obtaining the first content that does not match the bullet comment filtering parameter among the bullet comment contents included in the bullet comment group;
[0143] Specifically, in the embodiment of the present application, the picture in the user's mind can be predicted through the barrage, because the picture that the user wants to generate is based on the current live screen, so the barrage sent by each user and the current screen prompt word matching the barrage should be common information, and the mapping set in the filtering method (the set obtained in step 33 of the above part 1) can be used to remove this part of the barrage, and the remaining barrage can reflect the user's personality characteristics; output the user's remaining barrage group (the original barrage group remains unchanged, that is, the barrage group before removal can be retained separately), for example:
[0144] {User 1, Player A1, Team B1 will win, hook, take off, dominate the crowd, ...} becomes {User 1, take off, dominate the crowd, ...};
[0145] The above-mentioned elimination process is performed on each category of the bullet comments in step 35 of this section.
[0146] Step 37, performing semantic clustering according to the remaining bullet comments; corresponding to the above-mentioned all the first contents corresponding to the user, dividing the bullet comment group to obtain the bullet comment sub-group corresponding to the bullet comment group;
[0147] Specifically, because the remaining barrage can represent the user's other feelings besides the live broadcast screen, the users can be further grouped according to the semantic information of these barrages, with the goal of grouping users with the same additional feelings together; more specifically, the user's other barrage (i.e., the remaining barrage) can be converted into semantic vectors through the stable diffusion embedding model, and then the semantic vectors of all other barrages corresponding to a user are added to obtain the total semantic vector (corresponding to the above-mentioned acquisition of the total semantic vector of all the first content corresponding to the user), and the barrage semantic vectors of different users are clustered using a clustering algorithm, and finally the users under the current type set are further divided into several small sets (corresponding to the above-mentioned clustering processing of the total semantic vector to obtain the second grouping result of the users; according to the second grouping result, the barrage group is divided to obtain at least one barrage sub-group); this step is actually the prediction and classification of the user's imagined pictures, and users with similar imagined pictures are grouped together.
[0148] Step 38, user classification processing: corresponding to the above, the user is classified according to the barrage content contained in the barrage subgroup to obtain the user's grade information;
[0149] Specifically, this step performs classification processing on users in several small sets; the number of prompt word elements contained in each user's bullet screen can be divided by the total number of elements in the bullet screen filtering reference set to obtain the classification weight of each user; according to the weight, users can be divided into several levels (which can be set to 10 levels), so that each user will have a level value, as shown below:
[0150] {User 1, 1}, {User 2, 3}, ...
[0151] Among them, 1 and 3 are level values. The larger the value, the higher the level, which means that the barrage sent by the user has more elements for generating pictures; the above-mentioned grading processing is performed on the users corresponding to the several small sets obtained in step 37 of this part.
[0152] Step 39, combining the bullet comments according to the user rating; corresponding to the above, combining the bullet comment contents contained in the bullet comment subgroup according to the rating information and the first rule to obtain a prompt word combination;
[0153] Specifically, the final combination of user barrages (i.e., the original barrage group mentioned above) can be performed within a small set according to the level values of the above-mentioned users; for example: the barrages of users with small level values and users with large level values are combined, such as the barrages of users with level 1 are combined with the barrages of users with level 10, so as to maximize the complementarity of the prompt word elements; in addition, in an embodiment of the present application, it can be set that: the final combined barrage set needs to cover all elements mapped in the barrage filter reference set (bold font part); if the barrages of two users are not enough, the barrages of multiple users can be pulled; if the barrages of users of one level are not enough, the barrages of users of adjacent levels can be pulled for combination, for example, the barrages of users at level 9 are not enough (covering all elements mapped in the barrage filter reference set), the barrages of users at level 10 or level 8 can be pulled (wherein: the barrage of one user can participate in the generation of at least one picture); finally, a barrage set of multiple users is obtained. The above settings may correspond to the above first rule including: combining the barrage contents corresponding to at least two users whose level difference is greater than a threshold, and the combined contents include all the contents of the first category of prompt words in the barrage filtering parameters; the first category of prompt words includes: generated prompt words that match at least one of the target elements.
[0154] The embodiment of the present application may optionally include another step: according to the mapping relationship in the bullet screen filter reference set (i.e., the relationship between the matched bullet screen and the prompt word), the associated bullet screen is converted into a generated prompt word (unmatched ones can be directly used as prompt words), and finally a generated prompt word combination is obtained. This step may correspond to the above-mentioned mapping relationship between the target element corresponding to the bullet screen filter parameter and the generated prompt word, converting at least one bullet screen word in the prompt word combination into a prompt word, and obtaining a final prompt word combination.
[0155] In addition, the embodiment of the present application also provides a display mechanism for generating pictures, through which a feedback mechanism can be provided to users to guide them to send high-quality bullet comments. Figure 7 and Figure 8 As shown, in the embodiment of the present application, after the bullet screen is completed and the picture is generated in the background, the generated pictures are sequentially displayed to the user as the video is played, and the user bullet screens participating in the generation of the picture are marked in the picture (see Figure 7 and Figure 8 Each user will only see the bullet comments he or she has contributed (corresponding to the above-mentioned display of the picture according to the user ID; wherein the picture displays the target bullet comment content corresponding to the user ID), thereby reminding the user how to send high-quality bullet comments. The picture containing the bullet comment is only for display, and the subsequent user may actually obtain a picture without the bullet comment text, but this is not limited to this. In addition, the picture generated in the embodiment of the present application may only contain Figure 7 and / or Figure 8 The part within the dashed box shown may also include other parts, such as Figure 7 and / or Figure 8 The portion outside the dashed frame is not limited here.
[0156] From the above, the embodiments of the present application involve the field of live interaction. For live videos, methods such as bullet screen detection, text semantic model recognition, and Wensheng graph are used to achieve image generation. It can also support solving the problems of the lack of image generation based on bullet screen in existing live broadcasts, and the low relevance of the generated images to the current screen and content of the video. Among them, the embodiments of the present application introduce the ability of AIGC Wensheng graph during the live broadcast of the event, allowing users to generate unique and collectible pictures through bullet screen.
[0157] In summary, the embodiments of the present application support the ability to screen and combine barrages to form high-quality prompt word combinations in an environment where multiple barrages are sent, thereby generating high-quality pictures. The embodiments of the present application are applicable to but not limited to live broadcast scenarios of sports events, such as film and television drama broadcasts, game live broadcasts, and other scenarios. The embodiments of the present application can first identify the climax screen of the live content in the live broadcast scenario to trigger the mechanism for barrage to generate pictures, then process the barrage related to the climax screen to obtain a reasonable prompt word combination, then generate pictures according to the prompt word combination, and finally feedback the results to the user.
[0158] Specifically, compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0159] 1) During live video broadcast, users are provided with a mechanism to generate high-quality pictures related to the video content through bullet screen, which enhances the interactivity of users when watching live broadcasts;
[0160] 2) A specific mechanism for generating high-quality images through video bullet comments is proposed, which solves the problem of bullet comment filtering and bullet comment combination and ensures the quality of generated images;
[0161] 3) The pictures generated in real time by the barrage not only retain the main information of the event content but also reflect the unique ideas of the users. They can be used as a digital asset of NFT to enhance their collection value, thus bringing additional benefits to the platform;
[0162] 4) A feedback mechanism is provided after the image is generated, which can guide users to send high-quality barrages, thereby generating more valuable images.
[0163] The present application embodiment also provides a picture generating device 90, such as Fig. 9 As shown, including:
[0164] A first processing module 91, configured to identify a target element in at least one video frame of a target video;
[0165] The second processing module 92 is used to perform a reverse operation of the prompt word of the image-to-text on the at least one video frame to obtain the generated prompt words corresponding to the at least one video frame;
[0166] A third processing module 93 is used to obtain target bullet screen content according to the target element, the generated prompt word and the bullet screen content for the target video;
[0167] The fourth processing module 94 is used to generate a picture according to the target barrage content.
[0168] The image generation device provided in the embodiment of the present application identifies the target element in at least one video frame of the target video; performs a reverse operation of the prompt word of the image-to-text for the at least one video frame to obtain the generated prompt word corresponding to the at least one video frame; obtains the target barrage content according to the target element, the generated prompt word and the barrage content for the target video; generates an image according to the target barrage content; can support the generation of an image reflecting the current screen content according to the barrage content, improve the utilization rate of the barrage content, and can form a good interaction with the user to further enhance the user experience.
[0169] Among them, the target barrage content is obtained according to the target element, the generated prompt word and the barrage content for the target video, including: obtaining barrage filtering parameters according to the target element and the generated prompt word; and obtaining barrage content that matches at least one parameter in the barrage filtering parameters from the barrage content for the target video as the target barrage content.
[0170] In an embodiment of the present application, the barrage filtering parameters include: a first category of prompt words and a second category of prompt words; wherein, the first category of prompt words includes: generated prompt words that match at least one of the target elements; the second category of prompt words includes: generated prompt words that do not match the target element.
[0171] Among them, generating a picture according to the target barrage content includes: determining the emotional attitude of the user corresponding to the target barrage content; filtering and grouping the users according to the emotional attitude to obtain a first grouping result; dividing the target barrage content according to the first grouping result to obtain at least one barrage group; combining the barrage content according to the at least one barrage group to obtain a prompt word combination; generating a picture according to the prompt word combination.
[0172] Among them, the combining of barrage contents according to the at least one barrage group to obtain a prompt word combination includes: obtaining the first content that does not match the barrage filtering parameter from the barrage contents contained in the barrage group; when the first content is obtained, dividing the barrage group according to all the first contents corresponding to the user to obtain a barrage sub-group corresponding to the barrage group; combining the barrage contents contained in the barrage sub-group to obtain a prompt word combination; when the first content is not obtained, combining the barrage contents contained in the barrage group to obtain a prompt word combination.
[0173] In an embodiment of the present application, the barrage group is divided according to all the first contents corresponding to the user to obtain barrage sub-groups corresponding to the barrage group, including: obtaining the total semantic vector of all the first contents corresponding to the user; clustering the total semantic vector to obtain a second grouping result of the user; and dividing the barrage group according to the second grouping result to obtain at least one barrage sub-group.
[0174] Among them, the combining of the barrage contents contained in the barrage sub-group to obtain a prompt word combination includes: grading the users according to the barrage contents contained in the barrage sub-group to obtain the level information of the users; combining the barrage contents contained in the barrage sub-group according to the level information and the first rule to obtain a prompt word combination; wherein the first rule includes: combining the barrage contents corresponding to at least two users whose level difference is greater than a threshold, and the combined contents include all the contents of the first category of prompt words in the barrage filtering parameters; the first category of prompt words includes: generated prompt words that match at least one of the target elements.
[0175] Furthermore, the image generating device also includes: a fifth processing module, which is used to convert at least one barrage word in the prompt word combination into a prompt word according to the mapping relationship between the target element corresponding to the barrage filtering parameter and the generated prompt word, so as to obtain a final prompt word combination.
[0176] Among them, the implementation embodiments of the above-mentioned image generation method are all applicable to the embodiments of the image generation device and can achieve the same technical effects.
[0177] An embodiment of the present application also provides an image generating device, including a memory, a processor, and a program stored in the memory and executable on the processor; when the processor executes the program, the above-mentioned image generating method is implemented.
[0178] Among them, the implementation embodiments of the above-mentioned image generation method are all applicable to the embodiments of the image generation device and can achieve the same technical effects.
[0179] The embodiment of the present application also provides a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, the steps in the above-mentioned image generation method are implemented.
[0180] Among them, the implementation embodiments of the above-mentioned image generation method are all applicable to the embodiments of the computer-readable storage medium and can achieve the same technical effects.
[0181] The embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of the method embodiment of the above-mentioned image generation method are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0182] It should be noted that many functional components described in this specification are referred to as modules in order to more particularly emphasize the independence of their implementation methods.
[0183] In the embodiment of the present application, module can be implemented with software so that it can be executed by various types of processors. For example, an executable code module of an identification can include one or more physical or logical blocks of computer instructions, for example, it can be constructed as an object, process or function. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different positions, and when these instructions are logically combined together, it constitutes a module and realizes the specified purpose of the module.
[0184] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed among different programs, and distributed across a plurality of memory devices. Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form. The operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.
[0185] When a module can be implemented by software, considering the level of existing hardware technology, a person skilled in the art can build a corresponding hardware circuit to implement the corresponding function of the module that can be implemented by software without considering the cost. The hardware circuit includes a conventional very large scale integration (VLSI) circuit or gate array and existing semiconductors such as logic chips, transistors, or other discrete components. The module can also be implemented by a programmable hardware device, such as a field programmable gate array, a programmable array logic, a programmable logic device, etc.
[0186] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), including a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0187] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary personnel in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for generating an image, characterized in that: include: identifying a target element in at least one video frame of a target video; Performing a reverse operation of image-to-text prompt words on the at least one video frame to obtain generated prompt words corresponding to the at least one video frame; Obtain target barrage content according to the target element, the generated prompt word, and the barrage content for the target video; Generate a picture according to the target barrage content.
2. The image generation method according to claim 1, characterized in that: The step of obtaining target bullet screen content according to the target element, the generated prompt word, and the bullet screen content for the target video includes: Obtaining bullet screen filtering parameters according to the target element and the generated prompt word; From the bullet-screen content for the target video, the bullet-screen content that matches at least one parameter in the bullet-screen filtering parameters is obtained as the target bullet-screen content.
3. The image generation method according to claim 2, characterized in that: The step of generating a picture according to the target bullet screen content includes: Determining the user's emotional attitude corresponding to the target barrage content; According to the emotional attitude, the users are screened and grouped to obtain a first grouping result; According to the first grouping result, the target bullet chat content is divided to obtain at least one bullet chat group; Combining the bullet screen contents according to the at least one bullet screen group to obtain a prompt word combination; Generate a picture according to the prompt word combination.
4. The image generation method according to claim 3, characterized in that: The step of combining the bullet screen contents according to the at least one bullet screen group to obtain a prompt word combination includes: Obtaining a first content that does not match the barrage filtering parameter among the barrage contents included in the barrage group; When the first content is acquired, the barrage group is divided according to all the first contents corresponding to the user to obtain a barrage sub-group corresponding to the barrage group; and each barrage content included in the barrage sub-group is combined to obtain a prompt word combination; In the case where the first content is not obtained, the barrage contents included in the barrage group are combined to obtain a prompt word combination.
5. The image generation method according to claim 4, characterized in that: The dividing the barrage group according to all the first contents corresponding to the user to obtain barrage sub-groups corresponding to the barrage group includes: Obtaining a total semantic vector of all the first contents corresponding to the user; Performing clustering processing on the total semantic vector to obtain a second grouping result of the user; According to the second grouping result, the barrage group is divided to obtain at least one barrage sub-group.
6. The image generation method according to claim 4, characterized in that: The step of combining the contents of each bullet screen contained in the bullet screen subgroup to obtain a prompt word combination includes: According to the bullet-screen content contained in the bullet-screen subgroup, the user is graded to obtain grade information of the user; According to the level information and the first rule, the contents of the bullet comments contained in the bullet comment subgroup are combined to obtain a prompt word combination; Among them, the first rule includes: combining the barrage contents corresponding to at least two users whose level difference is greater than a threshold, and the combined content includes all the contents of the first category of prompt words in the barrage filtering parameters; the first category of prompt words includes: generated prompt words that match at least one of the target elements.
7. A picture generating device, characterized in that: include: A first processing module, configured to identify a target element in at least one video frame of a target video; The second processing module is used to perform a reverse operation of the prompt word of the image-to-text on the at least one video frame to obtain the generated prompt words corresponding to the at least one video frame; A third processing module is used to obtain target barrage content according to the target element, the generated prompt word and the barrage content for the target video; The fourth processing module is used to generate a picture according to the target barrage content.
8. A picture generating device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; characterized in that: When the processor executes the program, the image generation method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the image generation method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the picture generation method according to any one of claims 1 to 6.
Citation Information
Cited By
AIGC-based live broadcast room interaction method and related device
CN121462804A
