Bullet screen style enhancement method and device
By obtaining user characteristics and barrage feature data, and using style enhancement models to generate personalized barrage styles, the problem of monotonous visual effects of the existing barrage system is solved and the user's viewing experience is improved.
Patent Information
- Application Number
- CN202510054420.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-30
AI Technical Summary
The visual effects of the existing barrage display system are monotonous, making it difficult to attract users' attention and reduce the user's viewing experience.
By detecting the situation where the target user generates a barrage, obtain user feature data and barrage feature data, extract user portraits and initial style features, use the trained style enhancement model to generate style enhancement parameters that match the user portrait, and render the visual style of the target barrage.
Generate personalized barrage styles that meet users' preferences to improve the overall viewing experience and interactive effects of users.
Smart Images

Figure CN120075497A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video technology, and in particular, to a method and device for enhancing the style of bullet screens. Background Art
[0002] With the popularization of video playback platforms, bullet screens, as a form of instant interaction, have become a key means to enhance the sense of participation and interactivity of viewers. In the traditional viewing mode, viewers often can only passively receive content and lack the opportunity to communicate in real time with content creators or other viewers. However, with the development of technology and the change of user needs, the bullet screen system has emerged. It allows viewers to send comments or feelings while watching videos, and these comments appear on the video screen in the form of scrolling subtitles, thus breaking the boundaries of traditional viewing and providing viewers with a more diverse and rich interactive experience.
[0003] However, currently, the mainstream bullet screen display systems usually present in a single static style, with a monotonous visual effect. This uniform design is difficult to attract users' attention and reduces the user's viewing experience. Summary of the Invention
[0004] To solve the above technical problems or at least partially solve the above technical problems, this application provides a method and device for enhancing the style of bullet screens.
[0005] In a first aspect, this application provides a method for enhancing the style of bullet screens, the method including:
[0006] When detecting that a target user generates a target bullet screen, obtaining the user feature data of the target user and the bullet screen feature data of the target bullet screen;
[0007] Extracting a user portrait from the user feature data and extracting the initial style features of the target bullet screen from the bullet screen feature data, where the user portrait is used to indicate the preferences of the target user for bullet screens, the attribute features of the user himself, and the viewing habits;
[0008] Analyzing the user portrait and the initial style features through a trained style enhancement model, and generating style enhancement parameters that conform to the user portrait based on the initial style features;
[0009] Sending the style enhancement parameters to the terminal so that the terminal renders the visual style of the target bullet screen based on the style enhancement parameters.
[0010] Optionally, before analyzing the user portrait and the initial style features through a trained style enhancement model, the method further includes:
[0011] Extract the barrage weight of the target barrage from the barrage feature data, where the barrage weight is used to indicate the importance of the target barrage;
[0012] Analyze the barrage weight through the trained style enhancement model;
[0013] If the barrage weight exceeds the set weight threshold, determine to perform style enhancement on the target barrage.
[0014] Optionally, extracting the barrage weight of the target barrage from the barrage feature data includes:
[0015] Determine the barrage basic weight according to the interaction behavior data of the target barrage;
[0016] Determine the time decay factor according to the published duration of the target barrage and the preset time decay rate;
[0017] Perform weighted summation according to the barrage basic weight and the time decay factor to determine the barrage weight of the target barrage.
[0018] Optionally, determining the barrage basic weight according to the interaction behavior data of the target barrage includes:
[0019] Determine the number of likes and replies of the target barrage;
[0020] Determine the quality score of the target barrage by performing text analysis on the target barrage;
[0021] Perform weighted summation on the number of likes, the number of replies and the quality score to determine the barrage basic weight of the target barrage.
[0022] Optionally, determining the time decay factor according to the published duration of the target barrage and the preset time decay rate includes:
[0023] Determine the preset time decay rate, the fixed coefficient and the published duration of the target barrage;
[0024] Calculate the product value of the time decay rate and the published duration;
[0025] Determine the time decay factor according to the difference between the fixed coefficient and the product value.
[0026] Optionally, after analyzing the barrage weight through the style enhancement model, the method further includes:
[0027] If the barrage weight does not exceed the set weight threshold, retain and output the initial style features of the target barrage.
[0028] Optionally, before analyzing the user profile and the initial style features through the trained style enhancement model, the method further includes:
[0029] Obtain sample data, where the sample data includes a plurality of user-danmaku interaction data pairs and labeled style enhancement parameters;
[0030] Train an initial style enhancement model using the sample data until the parameter results output by the initial style enhancement model are the same as the labeled style enhancement parameters, to obtain a trained style enhancement model.
[0031] In a second aspect, the present application provides a danmaku style enhancement device, the device includes:
[0032] An acquisition module, configured to obtain the user feature data of the target user and the danmaku feature data of the target danmaku when detecting that the target user generates a target danmaku;
[0033] An extraction module, configured to extract a user profile from the user feature data and extract the initial style features of the target danmaku from the danmaku feature data, where the user profile is used to indicate the target user's preference for danmaku, the user's own attribute features, and viewing habits;
[0034] A generation module, configured to analyze the user profile and the initial style features through a trained style enhancement model, and generate style enhancement parameters that conform to the user profile based on the initial style features;
[0035] A rendering module, configured to send the style enhancement parameters to the terminal, so that the terminal renders the visual style of the target danmaku based on the style enhancement parameters.
[0036] In a third aspect, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
[0037] The memory is used to store a computer program;
[0038] The processor, when executing the program stored in the memory, implements the steps of any of the danmaku style enhancement methods.
[0039] In a fourth aspect, a computer-readable storage medium is provided, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the danmaku style enhancement methods are implemented.
[0040] The above technical solutions provided by the embodiments of the present application have the following advantages compared with the prior art:
[0041] The method provided by the embodiment of the present application obtains user feature data and bullet screen feature data by detecting the situation of a target user generating a target bullet screen, extracts a user portrait and an initial style feature, and generates style enhancement parameters that conform to the user portrait through a trained style enhancement model. Thus, the target bullet screen is rendered according to the style enhancement parameters. The bullet screen obtained in this way not only retains the original style feature, but also conforms to the preferences of the target user for the bullet screen, the user's own attribute features, and the viewing habits, generating a personalized bullet screen style that conforms to the user portrait and improving the overall viewing experience of the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present invention and used together with the specification to explain the principles of the present invention.
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0044] Figure 1 Schematic diagram of the hardware environment of a bullet screen style enhancement method provided by an embodiment of the present application;
[0045] Figure 2 Flowchart of a bullet screen style enhancement method provided by an embodiment of the present application;
[0046] Figure 3 Overall flowchart of a bullet screen style enhancement provided by an embodiment of the present application;
[0047] Figure 4 Schematic diagram of the structure of a bullet screen style enhancement device provided by an embodiment of the present application;
[0048] Figure 5 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0050] In the following description, suffixes such as "module", "component", or "unit" used to represent components are only for the convenience of explaining the present application, and they have no specific meaning by themselves. Therefore, "module" and "component" can be used interchangeably.
[0051] To solve the problems mentioned in the background art, according to one aspect of the embodiments of the present application, an embodiment of a bullet screen style enhancement method is provided.
[0052] Optionally, in the embodiments of the present application, the above bullet screen style enhancement method can be applied to a Figure 1 hardware environment composed of a terminal 101 and a server 103 as shown. As Figure 1 shown, the server 103 is connected to the terminal 101 through a network. Users watch videos on the terminal and comment to generate bullet screens. The server generates style enhancement parameters according to the user portrait and the initial style of the bullet screen, and sends the style enhancement parameters to the terminal. The terminal displays the bullet screens with enhanced styles. A database 105 can be set up on the server or independently of the server to provide data storage services for the server 103. The above network includes, but is not limited to: wide area network, metropolitan area network or local area network. The terminal 101 includes, but is not limited to: PC, mobile phone, tablet computer, etc.
[0053] The embodiments of the present application provide a bullet screen style enhancement method, which can be applied to a server for zz.
[0054] Next, in combination with specific implementation manners, a bullet screen style enhancement method provided by the embodiments of the present application will be described in detail. As Figure 2 shown, the specific steps are as follows:
[0055] Step 201: When it is detected that a target user generates a target bullet screen, obtain the user feature data of the target user and the bullet screen feature data of the target bullet screen;
[0056] Step 202: Extract the user portrait from the user feature data, and extract the initial style feature of the target bullet screen from the bullet screen feature data, where the user portrait is used to indicate the target user's preference for bullet screens, the user's own attribute features, and viewing habits;
[0057] Step 203: Analyze the user portrait and the initial style feature through a trained style enhancement model, and generate style enhancement parameters that conform to the user portrait based on the initial style feature;
[0058] Step 204: Send the style enhancement parameters to the terminal so that the terminal renders the visual style of the target bullet screen based on the style enhancement parameters.
[0059] This application provides a method for enhancing the bullet screen style, aiming to generate style enhancement parameters that conform to the user profile by analyzing the user characteristic data of the target user and the bullet screen characteristic data of the target bullet screen. This method not only improves the personalization and interestingness of the bullet screen, but also enhances the user experience and interaction effect.
[0060] When the system detects that the target user sends a new bullet screen, the style enhancement process is triggered. The system obtains the user characteristic data of the target user and the bullet screen characteristic data of the target bullet screen from the real-time data stream. The user characteristic data includes but is not limited to the user's age, gender, viewing habits, bullet screen preferences, etc. The bullet screen characteristic data includes but is not limited to the color, font, size and position, animation and special effects of the bullet screen.
[0061] The system extracts the user profile from the user characteristic data and extracts the initial style characteristics of the target bullet screen from the bullet screen characteristic data.
[0062] The user profile is a virtual user model constructed by comprehensively analyzing various characteristics of the user. The user profile includes the user's viewing habits (such as viewing duration, interaction frequency), attribute information (such as age, gender), preferences (such as favorite bullet screen styles). An example of the user profile is as follows.
[0063] {"user_id":123,"watch_time":3600,"likes":50,"age":24,"danmu_style":
[0064] {
[0065] "color":"#FFD700",
[0066] "font_size":16,
[0067] "animation":"fade",
[0068] "effect":"3D"
[0069] }
[0070] }
[0071] In the application of barrage style enhancement, the user portrait not only reflects the user's own preferences (such as favorite colors, fonts, special effects, etc.), but also integrates the user's viewing habits (watching time, interaction frequency) and attribute characteristics (such as age, gender, etc., region). Viewing habits can reflect the user's favorite barrage interaction method. For example, for users who like to watch movies for a long time, artistic fonts and elegant animation effects can be provided to enhance the overall viewing experience; users who often like humorous barrages may prefer a relaxed and interesting interaction method. Attribute characteristics can make the generated barrage conform to the user's own characteristics. For example, young users can see cooler path animation barrages, while older users can get simple and elegant font style barrages. This comprehensive consideration enables the system to generate a comprehensive and personalized user model. This user portrait can help the system understand the needs of each user more accurately, so as to generate a barrage style that meets their preferences.
[0072] Example 1.
[0073] 1. User preferences:
[0074] Favorite colors: green, blue, purple.
[0075] Favorite fonts: pixel style, sci-fi style fonts.
[0076] Favorite special effects: explosion, light effects, flashing.
[0077] 2. User viewing habits:
[0078] Viewing time: about 30-60 minutes per viewing.
[0079] Interaction frequency: High, more than 2 bullet comments are sent per minute, and likes and comments are frequent.
[0080] 3. User attribute characteristics:
[0081] Age: 18-25 years old.
[0082] Gender: No limit.
[0083] Region: First-tier cities, such as Beijing and Shanghai.
[0084] 4. User portrait results:
[0085] Based on these features, the system infers that this user group prefers barrage styles with strong visual impact and rich dynamic effects.
[0086] Application example: When the user sends a bullet comment, the system may select a color gradient + 3D rotation effect for it, use a rounded handwriting font, and add a path animation to make the bullet comment present a cool visual effect on the screen.
[0087] Example 2
[0088] 1. User's own preferences:
[0089] Favorite colors: Soft and elegant colors, such as beige, light blue, and light gray.
[0090] Favorite fonts: Artistic handwritten fonts, calligraphy fonts.
[0091] Favorite special effects: Delicate and elegant special effects, such as gentle gradients, subtle light and shadow changes.
[0092] 2. User's movie-watching habits:
[0093] Viewing duration: Each viewing exceeds 90 minutes, with a preference for continuously watching multiple episodes of classic film and television works.
[0094] Interaction frequency: Low. Occasionally send bullet comments, but the content quality is high, usually in-depth comments.
[0095] 3. User attribute characteristics:
[0096] Age: Over 40 years old.
[0097] Gender: Not limited.
[0098] Region: Second-tier cities, such as Hangzhou and Chengdu.
[0099] 4. User portrait results:
[0100] The system infers from these characteristics that this user group prefers bullet comment styles with a sense of art and elegance to enhance the viewing experience.
[0101] Application example: When the user sends a bullet comment, the system may select light blue font + beige background for it, with the font being an elegant handwritten font and adding a gentle gradient effect, making the bullet comment on the screen show a highly artistic effect.
[0102] The initial style characteristics refer to the basic style attributes of the target bullet comment before any personalized or enhanced processing. These attributes are usually the default choices when the user sends a bullet comment or are automatically assigned by the system according to certain preset rules. The initial style characteristics include, but are not limited to, basic style information such as color, font, size, and position, and can also include some simple animations and special effects, but usually they are relatively limited and fixed. For example, the default scrolling animation or simple fade-in and fade-out effects. These special effects are often global and apply to all users, rather than personalized settings for specific users.
[0103] The initial style characteristics include the following:
[0104] 1. Color characteristics.
[0105] Primary Color: The main color of the bullet screen (represented by RGB or HSV).
[0106] Gradient Color: If a gradient effect is used, it includes the start and end colors of the gradient.
[0107] Opacity: The degree of opacity of the bullet screen color, in the range [0, 1].
[0108] 2. Font features.
[0109] Font Type: The type of font used for the bullet screen (such as Arial, Helvetica, Song typeface).
[0110] Font Size: The display size of the font (in px).
[0111] Font Weight: The degree of boldness of the font, such as Normal, Bold, Bolder.
[0112] Text Shadow: Includes the color, blur, offset, etc. of the shadow.
[0113] 3. Animation features.
[0114] Animation Type: The dynamic effect of the bullet screen (such as scrolling, bouncing, fading).
[0115] Animation Speed: The speed at which the animation runs (in px / s).
[0116] Path Style: The trajectory of the animation movement (such as straight line, curve, wave).
[0117] 4. Size and position features.
[0118] Width: The width of the bullet screen on the screen (in px).
[0119] Height: The height of the bullet screen on the screen (in px).
[0120] Start Position: The starting coordinates (x, y) of the bullet screen on the screen.
[0121] End Position: The ending coordinates (x, y) of the bullet screen movement.
[0122] 5. Special effect features.
[0123] Special effect type (EffectType): Whether to apply special effects (such as 3D, rotation, blinking).
[0124] Special effect intensity (EffectIntensity): The visual intensity of the special effect (such as blinking frequency, rotation speed).
[0125] The system inputs the user profile and initial style features into the trained style enhancement model, analyzes and generates style enhancement parameters that meet the user's preferences. Among them, the style enhancement model is built based on deep learning (such as the Transformer model) or a rule engine, and can capture the complex relationship between user behavior and style features, so as to generate optimized style enhancement parameters on the basis of the initial style features, and then send the style enhancement parameters to the terminal. The terminal parses the style enhancement parameters and renders the enhanced bullet screens. The embodiments of this application support multiple rendering modes (high performance, normal, energy saving) to adapt to different device performances.
[0126] The style enhancement parameters are additional style attributes generated after analyzing the user profile and initial style features. These parameters are used to further optimize and personalize the display effect of the bullet screens to make them more in line with the user's preferences. In addition to basic styles (such as color, font, size), they also include more complex and personalized animation, special effects, paths and other advanced style attributes. For example, color gradient + path animation, or dynamic font + 3D special effects.
[0127] In this application, by detecting the situation of the target user generating the target bullet screen, obtaining user feature data and bullet screen feature data, extracting the user profile and initial style features, and generating style enhancement parameters that meet the user profile through the trained style enhancement model, so as to render the target bullet screen according to the style enhancement parameters. The bullet screens obtained in this way not only retain the original style features, but also meet the preferences of the target user for the bullet screens, the user's own attribute characteristics and viewing habits, generating personalized bullet screen styles that meet the user profile and improving the overall user viewing experience.
[0128] As an alternative implementation, before analyzing the user profile and initial style features through the trained style enhancement model, the method further includes the following steps:
[0129] Step S11: Extract the bullet screen weight of the target bullet screen from the bullet screen feature data, where the bullet screen weight is used to indicate the importance of the target bullet screen;
[0130] Step S12: Analyze the bullet screen weight through the trained style enhancement model;
[0131] Step S13: If the barrage weight exceeds the set weight threshold, determine to enhance the style of the target barrage.
[0132] The system extracts the barrage weight of each target barrage from the collected barrage feature data. These weight values are calculated based on a series of algorithms and are used to indicate the importance of a specific barrage. The calculation of the barrage weight takes into account multiple factors, including but not limited to user interaction behaviors (such as likes, comments), the quality score of the barrage content, and the time decay factor, etc. In this way, the impact of each barrage on the audience and its relative importance in the current video scenario can be quantified.
[0133] Next, use the pre-trained style enhancement model to deeply analyze the extracted barrage weights. This model can identify and understand the meanings behind different weight values, that is, which barrages are more likely to resonate or be discussed by users, so as to determine whether it is necessary to perform visual enhancement processing on them. Not all barrages will be selected for style enhancement; only those barrages with higher weight requirements will enter the next processing flow. This selective enhancement strategy aims to ensure the effective use of resources and avoid unnecessary computational overhead and increased system load.
[0134] When the weight of a barrage exceeds the set threshold, the system will automatically determine that this barrage is a high-weight barrage and trigger the style enhancement mechanism. This means that only those target barrages considered to have higher value or influence will receive further personalized design and service optimization, such as advanced style adjustments like color gradient, dynamic font, 3D special effects, etc. Such an approach not only improves the quality of the user experience but also ensures that the platform operation efficiency is not affected.
[0135] For barrages that do not reach the threshold, these barrages are considered relatively less important or have less influence. The system does not need to consume additional resources for complex style processing, so their initial style features are retained without additional style enhancement.
[0136] Exemplarily, in a popular variety show, the audience sent a large number of barrages. Among them, some barrages were determined to be high-weight barrages because they received a large number of likes and comments and were subjected to style enhancement; while most ordinary barrages did not exceed the weight threshold, and the system retained and output their initial style features. High-weight barrage: "This episode of the program is so wonderful!" After style enhancement, this barrage appears on the screen with a gradient color + 3D rotation effect, attracting more attention from the audience. Ordinary barrage: "Hahaha, it made me laugh to death." This barrage maintains the default color, font, and scrolling animation and is displayed in a consistent manner with other ordinary barrages without causing a visually obtrusive feeling.
[0137] On the one hand, this application enhances the display style of high-weight bullet comments, which can make important viewpoints or comments more prominently presented to the audience, significantly improving the transmission effect of key information and making the entire viewing experience more diverse. On the other hand, it retains the initial style characteristics of low-weight bullet comments, ensuring that most bullet comments are displayed in a consistent manner, avoiding visual chaos caused by excessive complex style changes and enhancing the user's viewing comfort. In addition, only enhancing the styles of some selected high-weight bullet comments instead of applying them to all bullet comments indiscriminately helps reduce unnecessary consumption of computing resources and maintain the efficient operation of the system.
[0138] As an alternative implementation method, in step S11, extracting the bullet comment weight of the target bullet comment from the bullet comment feature data includes:
[0139] Step S21: Determine the basic bullet comment weight according to the interaction behavior data of the target bullet comment;
[0140] Step S22: Determine the time decay factor according to the published duration of the target bullet comment and the preset time decay rate;
[0141] Step S23: Perform weighted summation according to the basic bullet comment weight and the time decay factor to determine the bullet comment weight of the target bullet comment.
[0142] The system extracts relevant information from the interaction behavior data of the target bullet comment, including but not limited to the number of likes L, the number of comments, the number of forwards, the number of replies Rb, etc. These data reflect the degree of recognition and participation of the audience in this bullet comment. The system performs text analysis on the content of the target bullet comment, including but not limited to sentiment analysis, keyword extraction, content length, etc., to determine its quality score Tq. Among them, sentiment analysis can judge the sentiment tendency of the bullet comment content. Bullet comments with positive sentiment may be more attractive and transmissible; keyword extraction can identify important keywords in the bullet comment, and these keywords often reflect the core viewpoints or themes of the bullet comment; an appropriate content length helps the effective transmission of information, and being too short or too long may affect the quality of the bullet comment.
[0143] The system uses the preset weight coefficients γ1, γ2, γ3 to perform weighted summation on the number of likes L, the number of replies Rb, and the quality score Tq, and finally determines the basic bullet comment weight Fb of the target bullet comment. The calculation formula for the basic bullet comment weight is: Fb = γ1 * L + γ2 * Rb + γ3 * Tq.
[0144] The system records the release time of the target bullet screen, calculates its released duration t based on the current time, and then applies the preset time decay rate λ and the fixed coefficient e to calculate the time decay factor Td. The calculation formula of Td is: Td = e^(-λt). As time goes by, the immediate influence of the bullet screen will gradually weaken. Therefore, the time decay factor is introduced to balance this change. By introducing the time decay factor, the system can maintain a reasonable evaluation of the bullet screen weight for a long time and avoid unfair comparison between new and old bullet screens.
[0145] The system combines the bullet screen basic weight Fb and the time decay factor Td, and uses the preset weight coefficients α1 and α2 to calculate the final bullet screen weight W through weighted summation.
[0146] W = α1 * Fb + α2 * Td.
[0147] By combining the basic weight and the time decay factor, the system can comprehensively evaluate the importance and timeliness of each bullet screen, ensure the rationality of the final weight, and at the same time update the weight in real time with the change of bullet screen interaction behavior to ensure the timeliness and accuracy of the evaluation result.
[0148] As an optional implementation manner, before analyzing the user portrait and the initial style features through the trained style enhancement model, the method further includes: obtaining sample data, where the sample data includes multiple user-bullet screen interaction data pairs and labeled style enhancement parameters; training the initial style enhancement model with the sample data until the parameter results output by the initial style enhancement model are the same as the labeled style enhancement parameters, and obtaining the trained style enhancement model.
[0149] The system obtains a large number of user-bullet screen interaction data pairs from the historical records. Each data pair includes the user's characteristic information (such as age, gender, viewing preference, etc.) and the corresponding bullet screen content and its initial style features. At the same time, these sample data also include the style enhancement parameters pre-labeled by the system, and these parameters reflect the most suitable bullet screen style adjustment scheme in a specific scenario.
[0150] The system uses the above-mentioned collected sample data to train the initial style enhancement model. During the training process, the model will gradually learn how to generate the optimal style enhancement parameters according to the user portrait and the bullet screen features. The training goal is to make the parameter results output by the model as close as possible to the labeled style enhancement parameters in the sample data. In addition, mechanisms such as time decay, noisy bullet screens, and user group stratification can be introduced during the training process to improve the generalization ability of the model.
[0151] The embodiment of the present application also provides a schematic diagram of a bullet screen style enhancement process, asFigure 3 As shown in Figure 3 , it includes the following steps.
[0152] 1. Data collection and processing.
[0153] The system collects user feature data and constructs a user portrait based on the user's viewing habits (such as viewing duration, interaction frequency), attribute information (such as age, gender), and preferences (such as favorite danmaku styles).
[0154] The system collects danmaku feature data and extracts the initial style features of the danmaku.
[0155] 2. Danmaku weight calculation.
[0156] The system extracts interaction behavior data from the danmaku feature data, calculates the basic danmaku weight Fb according to the number of likes L, the number of replies Rb, and the quality score Tq in the interaction behavior data, then calculates the time decay factor Td according to the formula Td = e-λt, and finally calculates the danmaku weight according to the formula W = α1*Fb + α2*Td.
[0157] 3. Style enhancement model processing.
[0158] 3.1 The system inputs the user portrait, the initial style features, and the danmaku weight into the style enhancement model. The input data is organized into a unified feature vector and merged into a multi-modal embedding.
[0159] 3.2 Model structure.
[0160] 1) Input embedding layer.
[0161] User data, danmaku interaction data, and danmaku style features are respectively encoded into vectors through the embedding layer:
[0162] user_embedding = Embedding(user_data)
[0163] danmaku_interaction_embedding = Embedding(interaction_data)
[0164] danmaku_style_embedding = Embedding(style_data).
[0165] 2) Multi-head attention mechanism.
[0166] The above features are input into the multi-head attention layer to model the interaction relationship between them:
[0167] attention_output = MultiHeadAttention(query, key, value)
[0168] 3) Feed-Forward Network (FFN).
[0169] Extract higher-level semantic features and learn complex non-linear relationships:
[0170] ffn_output = FeedForwardNetwork(attention_output)
[0171] 4) Residual connection and normalization (LayerNorm).
[0172] Stabilize the training process and improve the model performance:
[0173] normalized_output = LayerNorm(input + ffn_output)
[0174] 5) Decoder.
[0175] Generate parameters for enhanced danmaku styles through the decoder:
[0176] style_parameters = Decoder(normalized_output)
[0177] 6) Output layer.
[0178] Output style enhancement parameters, including but not limited to: color gradient, dynamic font, 3D special effects, path animation, etc. Among them, the output style enhancement parameters are selected from a pre-constructed style feature library.
[0179] 4. Output the result to the terminal.
[0180] The system further adjusts the generated result based on the system load, device performance, and user preferences, then binds the generated style enhancement parameters to the danmaku, generates a unified style description file, and transmits it to the client for rendering.
[0181] The file data structure is as follows: {
[0182] "video_id": "678900",
[0183] "danmaku_id_list": [id1, id2],
[0184] "style": {
[0185] "color": "gradient",
[0186] "font": "dynamic",
[0187] "effectType":"3D",
[0188] “animation”:”fade”
[0189] }
[0190] }
[0191] 5. Client rendering and display.
[0192] The system can optimize the distribution efficiency through the style cache mechanism. The client parses the style parameters and renders the enhanced bullet screens, supporting multiple rendering modes (high performance, normal, energy saving) to adapt to different device performances.
[0193] The beneficial effects that this application can achieve include the following:
[0194] 1. Dynamic weight calculation mechanism.
[0195] Innovation point: Introduce user portraits and bullet screen interaction behavior data, and dynamically calculate the bullet screen weights in combination with the time decay mechanism to evaluate the importance of bullet screens.
[0196] Beneficial effect: Avoid uniformly enhancing the styles of all bullet screens, prioritize the processing of high-weight bullet screens, reduce calculation and resource waste, and improve system performance.
[0197] 2. Style enhancement model.
[0198] Innovation point: Based on user portraits, interaction data, and bullet screen style features, use deep learning models (such as Transformer) or rule engines to generate dynamic style enhancement solutions.
[0199] Beneficial effect: The bullet screen styles can be adjusted in real time according to user behavior and portraits, meeting the personalized needs of different user groups, enhancing the visual impact and user experience.
[0200] 3. Structured processing and caching mechanism for style parameters.
[0201] Innovation point: Structurally store the parameters after style enhancement, design a unified style description file, and introduce a style cache mechanism.
[0202] Beneficial effect: Reduce repeated calculations, reduce system latency, and improve the distribution and rendering efficiency of style parameters.
[0203] 4. Support for diverse dynamic styles.
[0204] Innovation point: Provide rich styles such as color gradients, dynamic fonts, 3D special effects, path animations, etc., and support the dynamic superposition and switching of multiple styles.
[0205] Beneficial effects: Enrich the display effect of bullet screens, enhance visual attraction, and increase users' viewing interest and interaction frequency.
[0206] 5. Hierarchical processing and resource optimization mechanism.
[0207] Innovation point: Based on the weight hierarchical and time decay mechanisms, preferentially allocate resources to high-weight bullet screens, while low-weight bullet screens adopt a simple display strategy.
[0208] Beneficial effects: Optimize the system resource allocation, avoid occupying computing resources and storage resources due to excessive style enhancement, and improve system stability and scalability.
[0209] Through the above content, this application realizes the optimization of the complete link from user data perception to style enhancement generation and then to efficient distribution, which not only improves the personalization and interestingness of bullet screens, but also ensures the efficiency and stability of the system, and ultimately brings a double improvement in user stickiness and interaction activity to the platform.
[0210] Based on the same technical concept, the embodiment of this application also provides a bullet screen style enhancement device, as Figure 4 shown, the device includes:
[0211] An acquisition module 401, configured to acquire the user feature data of the target user and the bullet screen feature data of the target bullet screen when detecting that the target user generates the target bullet screen;
[0212] An extraction module 402, configured to extract a user portrait from the user feature data and extract the initial style features of the target bullet screen from the bullet screen feature data, where the user portrait is used to indicate the target user's preference for bullet screens, the user's own attribute features, and viewing habits;
[0213] A generation module 403, configured to analyze the user portrait and the initial style features through a trained style enhancement model, and generate style enhancement parameters that conform to the user portrait based on the initial style features;
[0214] A sending module, configured to send the style enhancement parameters to the terminal so that the terminal renders the visual style of the target bullet screen based on the style enhancement parameters.
[0215] Optionally, the device is further configured to:
[0216] Extract the bullet screen weight of the target bullet screen from the bullet screen feature data, where the bullet screen weight is used to indicate the importance of the target bullet screen;
[0217] Analyze the bullet screen weight through a trained style enhancement model;
[0218] If the bullet screen weight exceeds the set weight threshold, it is determined to perform style enhancement on the target bullet screen.
[0219] Optionally, the device is further configured to:
[0220] Determine the basic weight of the bullet screen according to the interaction behavior data of the target bullet screen;
[0221] Determine the time decay factor according to the published duration of the target bullet screen and the preset time decay rate;
[0222] Perform weighted summation according to the basic weight of the bullet screen and the time decay factor to determine the bullet screen weight of the target bullet screen.
[0223] Optionally, the device is further configured to:
[0224] Determine the number of likes and the number of replies of the target bullet screen;
[0225] Determine the quality score of the target bullet screen by performing text analysis on the target bullet screen;
[0226] Perform weighted summation on the number of likes, the number of replies and the quality score to determine the basic weight of the bullet screen of the target bullet screen.
[0227] Optionally, the device is further configured to:
[0228] Determine the preset time decay rate, the fixed coefficient and the published duration of the target bullet screen;
[0229] Calculate the product value of the time decay rate and the published time length;
[0230] Determine the time decay factor according to the difference between the fixed coefficient and the product value.
[0231] Optionally, the device is further configured to:
[0232] If the bullet screen weight does not exceed the set weight threshold, retain and output the initial style features of the target bullet screen.
[0233] Optionally, the device is further configured to:
[0234] Obtain sample data, where the sample data includes multiple user-bullet screen interaction data pairs and labeled style enhancement parameters;
[0235] Train the initial style enhancement model with the sample data until the parameter results output by the initial style enhancement model are the same as the labeled style enhancement parameters, and obtain the trained style enhancement model.
[0236] Based on the same technical concept, an embodiment of the present invention further provides an electronic device, such as Figure 5As shown in the figure, it includes a processor 501, a communication interface 502, a memory 503, and a communication bus 504. Among them, the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0237] The memory 503 is used to store computer programs.
[0238] When the processor 501 is used to execute the program stored in the memory 503, the above steps are implemented.
[0239] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0240] The communication interface is used for communication between the above electronic device and other devices.
[0241] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0242] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processing (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.
[0243] In another embodiment provided by the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0244] In another embodiment provided by the present invention, there is also provided a computer program product containing instructions, which, when running on a computer, causes the computer to execute any one of the methods in the above embodiments.
[0245] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state disk (SSD)).
[0246] 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 any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device that includes the element.
[0247] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious 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 invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for enhancing the style of a bullet screen, characterized in that: The method comprises: When it is detected that a target user generates a target barrage, obtaining user feature data of the target user and barrage feature data of the target barrage; Extracting a user portrait from the user feature data, and extracting an initial style feature of the target barrage from the barrage feature data, wherein the user portrait is used to indicate the target user's preference for barrage, the user's own attribute features, and viewing habits; Analyzing the user portrait and the initial style features through a trained style enhancement model, and generating style enhancement parameters that conform to the user portrait based on the initial style features; The style enhancement parameters are sent to the terminal so that the terminal renders the visual style of the target bullet comment based on the style enhancement parameters.
2. The method according to claim 1, characterized in that: Before analyzing the user portrait and the initial style features by using the trained style enhancement model, the method further includes: Extracting a barrage weight of the target barrage from the barrage feature data, wherein the barrage weight is used to indicate the importance of the target barrage; Analyzing the barrage weights through a trained style enhancement model; If the barrage weight exceeds a set weight threshold, it is determined to perform style enhancement on the target barrage.
3. The method according to claim 2, characterized in that Extracting the target barrage weight from the barrage feature data includes: Determine the basic weight of the barrage according to the interactive behavior data of the target barrage; Determining a time decay factor according to the published duration of the target bullet comment and a preset time decay rate; The barrage weight of the target barrage is determined by performing weighted addition according to the barrage basic weight and the time attenuation factor.
4. The method according to claim 3, characterized in that Determining the basic weight of the barrage according to the interactive behavior data of the target barrage includes: Determine the number of likes and replies of the target comment; Determining a quality score of the target barrage by performing text analysis on the target barrage; A weighted sum is taken for the like amount, the reply amount and the quality score to determine a barrage basic weight of the target barrage.
5. The method according to claim 3, characterized in that: Determining the time decay factor according to the published duration of the target bullet comment and a preset time decay rate includes: Determine a preset time decay rate, a fixed coefficient, and a published duration of the target bullet comment; Calculate the product of the time decay rate and the length of the published time; The time decay factor is determined according to a difference between the fixed coefficient and the product value.
6. The method according to claim 2, characterized in that After analyzing the bullet comment weight by the style enhancement model, the method further includes: If the barrage weight does not exceed the set weight threshold, the initial style features of the target barrage are retained and output.
7. The method according to claim 2, characterized in that: Before analyzing the user portrait and the initial style features by using the trained style enhancement model, the method further includes: Acquire sample data, wherein the sample data includes a plurality of user-bullet comment interaction data pairs and annotated style enhancement parameters; The sample data is used to train the initial style enhancement model until the parameter results output by the initial style enhancement model are the same as the labeled style enhancement parameters, thereby obtaining a trained style enhancement model.
8. A bullet screen style enhancement device, characterized in that: The device comprises: An acquisition module, configured to acquire user feature data of the target user and feature data of the target barrage when detecting that the target user generates a target barrage; An extraction module, used to extract a user portrait from the user feature data, and to extract the initial style features of the target barrage from the barrage feature data, wherein the user portrait is used to indicate the target user's preference for barrage, the user's own attribute features, and viewing habits; A generation module, configured to analyze the user portrait and the initial style features through a trained style enhancement model, and generate style enhancement parameters that conform to the user portrait based on the initial style features; The sending module is used to send the style enhancement parameters to the terminal so that the terminal renders the visual style of the target bullet comment based on the style enhancement parameters.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.