Barrage display method and device, computer device and storage medium

By converting native bullet screen data into bitmap data and generating special effects bullet screen layers, the problem of inconsistent display of special effects bullet screens on different devices is solved, and a consistent display is achieved in the target video playback interface.

CN119232999BActive Publication Date: 2026-04-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2023-06-30
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

When displaying special effects bullet comments on different devices, the use of native views or asynchronous drawing methods can lead to inconsistent display.

Method used

The original bullet screen data is converted into bitmap data to generate special effects bullet screen layers, and special effects animation is rendered in a preset container to ensure consistent display in the target video playback interface.

Benefits of technology

It improves the display consistency of special effects bullet comments across different devices, avoiding inconsistencies caused by using native views or asynchronous drawing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232999B_ABST
    Figure CN119232999B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer device, storage medium, and computer program product for displaying bullet comments. The method includes: when a target video is playing and has bullet comments to be displayed, acquiring target bullet comment configuration information and native bullet comment data corresponding to the target video; converting each native bullet comment in the native bullet comment data into bitmap data to obtain individual bitmap data, and generating bullet comment layers corresponding to each bitmap data according to the target bullet comment configuration information; applying the bullet comment layers corresponding to each bitmap data to a preset bullet comment container to obtain a bullet comment container to be rendered, and performing special effects animation rendering based on the bullet comment container to obtain the target bullet comments corresponding to each native bullet comment; and displaying the target bullet comments corresponding to each native bullet comment in the playback interface of the target video. This method can improve the consistency of bullet comment display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for displaying bullet comments. Background Technology

[0002] With the development of internet technology, danmaku (bullet screen) technology has emerged. Danmaku refers to the commentary subtitles that pop up when watching videos online. Currently, danmaku can be displayed as regular danmaku or animated danmaku, i.e., special effects danmaku. For example, danmaku that zooms in or out can be displayed. Since videos can be played on multiple devices, such as mobile phones, computers, and TVs, animated danmaku also needs to be displayed on different devices. However, when displaying special effects danmaku on different devices, rendering them using native views or asynchronous drawing methods can easily lead to inconsistencies in the displayed special effects danmaku. Summary of the Invention

[0003] Therefore, it is necessary to provide a bullet screen display method, device, computer equipment, computer-readable storage medium, and computer program product that can improve the consistency of bullet screen display in response to the above-mentioned technical problems.

[0004] Firstly, this application provides a method for displaying bullet comments. The method includes:

[0005] When the target video is playing and has special effects bullet comments to be displayed, obtain the target special effects bullet comment configuration information corresponding to the target video and the original bullet comment data when the target video has special effects bullet comments to be displayed;

[0006] The original bullet comments in the original bullet comment data are converted into bitmap data to obtain each bitmap data, and the special effect bullet comment layers corresponding to each bitmap data are generated according to the target special effect bullet comment configuration information.

[0007] Apply the special effects barrage layer corresponding to each bitmap data to the preset special effects barrage container to obtain the special effects barrage container to be rendered, and perform special effects animation rendering based on the special effects barrage container to obtain the target special effects barrage corresponding to each original barrage.

[0008] The target video's playback interface displays the target special effects bullet comments corresponding to each original bullet comment.

[0009] Secondly, this application also provides a bullet screen display device. The device includes:

[0010] The data acquisition module is used to acquire the target special effects barrage configuration information and the original barrage data of the target video when the target video is playing and has special effects barrage to be displayed.

[0011] The layer generation module is used to convert each original barrage in the original barrage data into bitmap data to obtain each bitmap data, and generate the corresponding special effect barrage layer according to the target special effect barrage configuration information.

[0012] The rendering module is used to apply the special effects barrage layers corresponding to each bitmap data to the preset special effects barrage container to obtain the special effects barrage container to be rendered, and to perform special effects animation rendering based on the special effects barrage container to obtain the target special effects barrage corresponding to each original barrage.

[0013] The display module is used to show the target special effects bullet comments corresponding to each original bullet comment in the playback interface of the target video.

[0014] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0015] When the target video is playing and has special effects bullet comments to be displayed, obtain the target special effects bullet comment configuration information corresponding to the target video and the original bullet comment data when the target video has special effects bullet comments to be displayed;

[0016] The original bullet comments in the original bullet comment data are converted into bitmap data to obtain each bitmap data, and the special effect bullet comment layers corresponding to each bitmap data are generated according to the target special effect bullet comment configuration information.

[0017] Apply the special effects barrage layer corresponding to each bitmap data to the preset special effects barrage container to obtain the special effects barrage container to be rendered, and perform special effects animation rendering based on the special effects barrage container to obtain the target special effects barrage corresponding to each original barrage.

[0018] The target video's playback interface displays the target special effects bullet comments corresponding to each original bullet comment.

[0019] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0020] When the target video is playing and has special effects bullet comments to be displayed, obtain the target special effects bullet comment configuration information corresponding to the target video and the original bullet comment data when the target video has special effects bullet comments to be displayed;

[0021] The original bullet comments in the original bullet comment data are converted into bitmap data to obtain each bitmap data, and the special effect bullet comment layers corresponding to each bitmap data are generated according to the target special effect bullet comment configuration information.

[0022] Apply the special effects barrage layer corresponding to each bitmap data to the preset special effects barrage container to obtain the special effects barrage container to be rendered, and perform special effects animation rendering based on the special effects barrage container to obtain the target special effects barrage corresponding to each original barrage.

[0023] The target video's playback interface displays the target special effects bullet comments corresponding to each original bullet comment.

[0024] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0025] When the target video is playing and has special effects bullet comments to be displayed, obtain the target special effects bullet comment configuration information corresponding to the target video and the original bullet comment data when the target video has special effects bullet comments to be displayed;

[0026] The original bullet comments in the original bullet comment data are converted into bitmap data to obtain each bitmap data, and the special effect bullet comment layers corresponding to each bitmap data are generated according to the target special effect bullet comment configuration information.

[0027] Apply the special effects barrage layer corresponding to each bitmap data to the preset special effects barrage container to obtain the special effects barrage container to be rendered, and perform special effects animation rendering based on the special effects barrage container to obtain the target special effects barrage corresponding to each original barrage.

[0028] The target video's playback interface displays the target special effects bullet comments corresponding to each original bullet comment.

[0029] The aforementioned bullet screen display method, apparatus, computer equipment, storage medium, and computer program product, when the target video being played is in the state of displaying bullet screen effects, acquires the target special effects bullet screen configuration information corresponding to the target video and the original bullet screen data of the target video in the state of displaying bullet screen effects; converts each original bullet screen in the original bullet screen data into bitmap data to obtain each bitmap data, and generates special effects bullet screen layers corresponding to each bitmap data according to the target special effects bullet screen configuration information; applies the special effects bullet screen layers corresponding to each bitmap data to a preset special effects bullet screen container to obtain a special effects bullet screen container to be rendered, and performs special effects animation rendering based on the special effects bullet screen container to obtain the target special effects bullet screen corresponding to each original bullet screen; and displays the target special effects bullet screen corresponding to each original bullet screen in the playback interface of the target video. The method involves applying the corresponding effect barrage layers of each native barrage to a preset effect barrage container to obtain the effect barrage container to be rendered. Then, the effect barrage container to be rendered is rendered and the target effect barrage is displayed. This avoids the problem of inconsistent display of effect barrage caused by using native view or asynchronous drawing methods, thereby improving the consistency of the target effect barrage display. Attached Figure Description

[0030] Figure 1 This is an application environment diagram of the bullet screen display method in one embodiment;

[0031] Figure 2 This is a flowchart illustrating a bullet screen display method in one embodiment;

[0032] Figure 3 This is a rendering diagram of a bullet screen container for rendering special effects in a specific embodiment;

[0033] Figure 4 This is a schematic diagram of the target rendering tree generated in a specific embodiment;

[0034] Figure 5 This is a schematic diagram of the process for obtaining native bullet screen data in one embodiment;

[0035] Figure 6 This is a schematic diagram illustrating the process of enabling special effects bullet comments in a specific embodiment;

[0036] Figure 7 This is a flowchart illustrating the process of obtaining the special effects barrage layer in one embodiment;

[0037] Figure 8 This is a schematic diagram of a native bullet screen conversion effect bullet screen layer in a specific embodiment;

[0038] Figure 9 This is a flowchart illustrating the current special effects barrage in one embodiment;

[0039] Figure 10 This is a flowchart illustrating the process of displaying target special effects bullet comments in one embodiment;

[0040] Figure 11 This is a schematic diagram of the page for creating special effects bullet screen configuration information in a specific embodiment.

[0041] Figure 12 This is a schematic diagram of a video association page in a specific embodiment;

[0042] Figure 13 This is a schematic diagram illustrating component refresh when the bullet screen rendering is normal in a specific embodiment;

[0043] Figure 14 This is a schematic diagram illustrating component refresh when a bullet screen rendering error occurs in a specific embodiment.

[0044] Figure 15 This is a flowchart illustrating a specific embodiment of a bullet screen display method;

[0045] Figure 16 This is a schematic diagram of the rendering process for special effects bullet screens in a specific embodiment;

[0046] Figure 17 This is a schematic diagram of various displacement effect bullet screens in a specific embodiment;

[0047] Figure 18 This is a schematic diagram of various blurred special effects bullet comments in a specific embodiment;

[0048] Figure 19 This is a structural block diagram of a special effects bullet screen display device in one embodiment;

[0049] Figure 20 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0051] The bullet screen display method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or located in the cloud or on another server; server 104 can be the server of a video playback platform. Terminal 102 can retrieve various videos from the data storage system of server 104. Then, terminal 102 responds to playback operations for the target video among the various videos and plays the target video. Terminal 102 detects that the target video being played is in a state where special effects bullet comments are to be displayed. It then obtains the target special effects bullet comment configuration information corresponding to the target video and the original bullet comment data when the target video is in a state where special effects bullet comments are to be displayed. Terminal 102 performs bitmap data conversion on each original bullet comment in the original bullet comment data to obtain individual bitmap data, and generates special effects bullet comment layers corresponding to each bitmap data according to the target special effects bullet comment configuration information. Terminal 102 applies the special effects bullet comment layers corresponding to each bitmap data to a preset special effects bullet comment container to obtain a special effects bullet comment container to be rendered, and performs special effects animation rendering based on the special effects bullet comment container to obtain the target special effects bullet comments corresponding to each original bullet comment. Terminal 102 displays the target special effects bullet comments corresponding to each original bullet comment in the playback interface of the target video. Terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server, a server cluster consisting of multiple servers, or a cloud server.

[0052] In one embodiment, such as Figure 2 As shown, a method for displaying bullet comments is provided, which can be applied to... Figure 1 Taking a terminal as an example, it can be understood that this method can also be applied to a server, and to a system that includes both a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0053] S202, when the target video is playing and has special effects bullet comments to be displayed, obtain the target special effects bullet comment configuration information corresponding to the target video and the original bullet comment data when the target video has special effects bullet comments to be displayed.

[0054] The target video refers to the video that needs to display special effects bullet comments. Special effects bullet comments are bullet comments with animated effects. These animation effects can be basic, such as zooming in and out, or more advanced, such as deformation, vibration, blurring, and embossing effects. "Target video in a state awaiting special effects bullet comments" means that the currently playing target video is in a state where special effects bullet comments need to be displayed. For example, if the currently playing target video meets the pre-set conditions for displaying special effects bullet comments, then the target video is in a state awaiting special effects bullet comments. These pre-set conditions can be pre-set playback time, playback content, and keywords appearing in the bullet comments, etc.

[0055] The target effect bullet screen configuration information refers to the configuration information of the bullet screen to be converted. This target effect bullet screen configuration information can include the parameters necessary for generating animated bullet screen effects. For example, the target effect bullet screen configuration information can be a PAG effect file obtained from PAG (Complete Animation Workflow Solution), from which the parameters necessary for generating animated bullet screen effects can be extracted.

[0056] Native bullet comment data refers to the original bullet comment data, which can be ordinary bullet comment data without animation effects. This native bullet comment data can also be obtained through native bullet comment components, which are components developed using native programming languages ​​to display bullet comments.

[0057] Specifically, the terminal responds to a playback operation for the target video and plays the target video. This playback operation refers to the triggering operation for playing the target video, which includes, but is not limited to, touch operations, cursor operations, button operations, voice operations, and motion operations. For example, touch operations can be touch pressing, touch clicking, or touch swiping. Cursor operations can be controlling the cursor to click, press, or swipe. Button operations can be virtual or physical buttons. Voice operations refer to operations controlled via voice. Motion operations refer to operations controlled via viewer actions, such as hand or head movements.

[0058] When a terminal plays a target video, it detects that the video is in a state where special effects bullet comments are to be displayed. Specifically, the terminal determines whether the target video is in this state if it meets pre-set conditions for displaying special effects bullet comments. For example, the terminal determines that the target video is in this state if the playback time reaches the time point for displaying special effects bullet comments. The terminal can also determine this state if the bullet comments displayed in the target video contain pre-set keywords. Alternatively, the terminal can determine this state if the target video reaches a pre-set keyframe. Then, the terminal retrieves the target special effects bullet comment configuration information and the native bullet comment data indicating that the target video is in this state from the server providing the target video. Alternatively, the terminal can pre-obtain the target special effects bullet comment configuration information and store it in memory, then retrieve it from memory when needed.

[0059] S204 converts each original bullet comment in the original bullet comment data into bitmap data to obtain each bitmap data, and generates the corresponding special effect bullet comment layer according to the target special effect bullet comment configuration information.

[0060] Native bullet comments refer to ordinary bullet comments that have not undergone special effects conversion; they are the original bullet comments. These native bullet comments can be in text format, image format, or a combination of text and images. Text-based bullet comments can be in different languages, such as Chinese, English, Japanese, Russian, etc. Bitmap data refers to bullet comments in bitmap format, that is, native bullet comments converted into bitmaps. Each native bullet comment is converted into a bitmap.

[0061] The special effects barrage layer refers to the layer corresponding to special effects barrages. A layer is like a film containing elements such as text or graphics; these layers are stacked together in sequence to form the final effect of the page. Layers can precisely position elements on the page. Text, images, tables, and plugins can be added to layers, and layers can also be nested within them.

[0062] Specifically, the terminal converts each native bullet comment in the native bullet comment data into bitmap data, obtaining bitmap data corresponding to each native bullet comment. This involves converting the native bullet comment data format into a bitmap format, using bitmaps to store the native bullet comments, thus obtaining bitmap data. Then, the terminal generates special effects bullet comment layers corresponding to each bitmap data according to the target special effects bullet comment configuration information. The terminal can use the parameters of the special effects bullet comment configured in the target special effects bullet comment configuration information to transform each bitmap data, obtaining the transformed special effects bullet comment layers. In other words, using bitmap data to generate special effects bullet comment layers improves generation efficiency.

[0063] S206, apply the special effects barrage layers corresponding to each bitmap data to the preset special effects barrage container to obtain the special effects barrage container to be rendered, and perform special effects animation rendering based on the special effects barrage container to obtain the target special effects barrage corresponding to each original barrage.

[0064] Among them, the preset special effects bullet screen container refers to the pre-set view container used to hold the special effects bullet screen layer. The special effects bullet screen container to be rendered refers to the special effects bullet screen container that needs to be rendered on the front end. The target special effects bullet screen refers to the rendered special effects bullet screen, which is a bullet screen with animation effects.

[0065] Specifically, the terminal loads the special effects barrage layer corresponding to each bitmap data into a pre-set special effects barrage container, thus obtaining the special effects barrage container to be rendered. That is, all special effects barrage layers are merged into one layer to obtain the special effects barrage container. Then, shaders are generated according to the front-end rendering process, and special effects animations are rendered on the special effects barrage container to be rendered through the shaders. When the rendering is completed, the target special effects barrage corresponding to each native barrage is obtained.

[0066] S208 displays the target special effects bullet comments corresponding to each original bullet comment in the target video playback interface.

[0067] Specifically, the terminal displays the target special effects bullet comments corresponding to each original bullet comment in the playback interface of the target video, according to the bullet comment style and animation effect of the target special effects bullet comments.

[0068] The aforementioned bullet screen display method, apparatus, computer equipment, storage medium, and computer program product, when the target video being played is in the state of displaying bullet screen effects, acquires the target special effects bullet screen configuration information corresponding to the target video and the original bullet screen data of the target video in the state of displaying bullet screen effects; converts each original bullet screen in the original bullet screen data into bitmap data to obtain each bitmap data, and generates special effects bullet screen layers corresponding to each bitmap data according to the target special effects bullet screen configuration information; applies the special effects bullet screen layers corresponding to each bitmap data to a preset special effects bullet screen container to obtain a special effects bullet screen container to be rendered, and performs special effects animation rendering based on the special effects bullet screen container to obtain the target special effects bullet screen corresponding to each original bullet screen; and displays the target special effects bullet screen corresponding to each original bullet screen in the playback interface of the target video. The method involves applying the corresponding effect barrage layers of each native barrage to a preset effect barrage container to obtain the effect barrage container to be rendered. Then, the effect barrage container to be rendered is rendered and the target effect barrage is displayed. This avoids the problem of inconsistent display of effect barrage caused by using native view or asynchronous drawing methods, thereby improving the consistency of the target effect barrage display.

[0069] In one embodiment, S206, the special effects barrage layers corresponding to each bitmap data are applied to a preset special effects barrage container to obtain a special effects barrage container to be rendered, including:

[0070] Obtain the preset effect barrage layer from the target effect barrage configuration information, and add the effect barrage layers corresponding to each bitmap data to the preset effect barrage layer to obtain the initial effect barrage layer. Apply the initial effect barrage layer to the root composition layer of the preset view container to obtain the target view container, and merge the target view container with the video container of the target video to obtain the effect barrage container to be rendered.

[0071] The preset effects barrage layer refers to a pre-set layer used to load effects barrage layers. The initial effects barrage layer refers to the layer that loads all effects barrage layers. The preset view container refers to a pre-set view container that is added to the view area of ​​the native view. View containers divide the page into independent, different parts. Animated elements can be played through view containers. The root composition layer is a container containing multiple effects barrage layers, corresponding to a composition in Adobe After Effects (AE). The target view container is a view container that includes all effects barrage layers. The video container is a view container that displays the video playback screen.

[0072] Specifically, the terminal parses the target special effects barrage configuration information to obtain the preset special effects barrage layer. Then, the terminal loads the special effects barrage layers corresponding to each bitmap data into the preset special effects barrage layer, obtaining the initial special effects barrage layer. Next, this initial special effects barrage layer is loaded into the root composition layer of the preset view container, thus obtaining the target view container. Finally, the terminal merges the target view container with the video container of the target video to obtain the special effects barrage container to be rendered; that is, the special effects barrage to be displayed and the playback screen of the target video are finally merged into the same view level.

[0073] In a specific embodiment, such as Figure 3 The diagram shows the rendering of the PAG effects bullet comment container, which includes: the PAG effects bullet comment layer (Main), the PAG root composition layer, the PAG view container (PAGView), and the video container. The video container is at the bottom layer, and the PAG effects bullet comment layer is at the top layer. The middle layers are the PAG root composition layer and the PAG view container, which are then merged and rendered. The PAG effects bullet comment layer can be a PAG Composition layer, which needs to be loaded into the PAG root composition layer. Specifically: The full-screen special effects barrage generated through the full-screen special effects barrage configuration information is applied to the PAG special effects barrage layer. The original barrage is first converted into bitmap data, and then a corresponding PAG special effects barrage layer, PAGLayer (PAG layer), is generated. PAGLayer includes its subclasses PAGImageLayer (PAG image layer), PAGTextLayer (PAG text layer), PAGFile (PAG file object), and combinations of subclasses, such as a combination of a PAG image layer and a PAG file object. Then, the PAG special effects barrage layer is added to the root PAGComposition (PAG composition layer) of the PAGView (PAG view container), resulting in the target view container. The size of the animated effect elements can be adjusted using setContentSize (element size control function) to match the width and height of the barrage view. Finally, the target view container and the video container are merged to obtain the barrage container to be rendered, and then rendered.

[0074] In the above embodiments, a preset special effects barrage layer is obtained from the target special effects barrage configuration information, and the special effects barrage layers corresponding to each bitmap data are added to the preset special effects barrage layer to obtain an initial special effects barrage layer; the initial special effects barrage layer is applied to the root composition layer of the preset view container to obtain a target view container, and the target view container is merged with the video container of the target video to obtain a special effects barrage container to be rendered, so that the target special effects barrage rendered by the obtained special effects barrage container on different devices can be consistent.

[0075] In one embodiment, the bullet screen display method further includes the step of:

[0076] Obtain the effect barrage layer modification request, which carries the two-dimensional attribute information corresponding to the target effect barrage layer; call the layer setting interface based on the effect barrage layer modification request, and update the target effect barrage layer using the two-dimensional attribute information through the layer setting interface to obtain the updated effect barrage layer.

[0077] The "Special Effects Barrage Layer Modification Request" is a request to modify the attributes of a special effects barrage layer. Two-dimensional attribute information refers to the two-dimensional attribute information of the special effects barrage layer. Each special effects barrage layer has corresponding two-dimensional attribute information, which may include coordinates (position), scale, rotation, size, etc. The layer settings interface is a pre-defined interface for adjusting the attribute information of special effects barrage layers. Updating the special effects barrage layer refers to adjusting the special effects barrage layer using the two-dimensional attribute information corresponding to the target special effects barrage layer.

[0078] Specifically, when the terminal detects a trigger operation to modify the special effects barrage layer, it obtains the special effects barrage layer modification request. Then, it parses the request to obtain the two-dimensional attribute information corresponding to the target special effects barrage layer. The terminal then responds to the request by calling the layer settings interface and updates the attribute information of the target special effects barrage layer using the two-dimensional attribute information. For example, the size of the target special effects barrage layer can be adjusted based on the layer size in the two-dimensional attribute information, the display coordinates can be adjusted based on the coordinates in the two-dimensional attribute information, and the target special effects barrage layer can be scaled based on the scaling ratio in the two-dimensional attribute information.

[0079] In one embodiment, the server can directly obtain the modification request through the layer setting interface, and then directly use the two-dimensional attribute information to update the target special effects barrage layer to obtain the updated special effects barrage layer.

[0080] In the above embodiments, by updating the target special effects barrage layer using two-dimensional attribute information, the updated special effects barrage layer is obtained. Then, by updating the special effects barrage layer to display the special effects barrage, the presentation and smoothness of the animation effect can be improved. Furthermore, by calling the layer settings interface to adjust the target special effects barrage layer, the flexibility of the special effects barrage display is improved.

[0081] In one embodiment, S206, special effects animation rendering is performed based on the container of special effects bullet comments to be rendered, to obtain the target special effects bullet comments corresponding to each native bullet comment, including the following steps:

[0082] A rendering tree is generated based on the container of bullet comments to be rendered, resulting in a target rendering tree, and a target shader corresponding to the target rendering tree is generated. The target shader is then used to render the bullet comments to be rendered according to the target rendering tree, resulting in target bullet comments corresponding to each native bullet comment.

[0083] The target render tree refers to the render tree composed of the special effects bullets in the container to be rendered. The render tree consists of visible elements in the element display sequence. Through this target render tree, the corresponding target special effects bullets can be drawn in the correct order. The target shader refers to the shader corresponding to the target render tree. This shader is used to implement image rendering and is used to replace the editable program of the fixed rendering pipeline.

[0084] Specifically, when rendering the bullet effect container, the terminal first generates a render tree based on the container to obtain the target render tree. The root compositing layer of the bullet effect container can be used as a branch node of the target render tree, and each target bullet effect layer in the root compositing layer can be used as a leaf node. Then, the terminal generates the target shader corresponding to the target render tree. This can be done using a pre-set shader template, replacing the bullet effect parameters in the shader template with those from the target render tree. Finally, the target shader is used to render the bullet effect animation according to the target render tree, resulting in the target bullet effect bullets corresponding to each native bullet effect.

[0085] In a specific embodiment, such as Figure 4 The diagram illustrates the generated target rendering tree. Specifically, in this PAG rendering tree, PAGComposition (PAG compositing layer) serves as a branch node, and PAGLayer (PAG layer) serves as a leaf node. The PAG Layer describes individual animation effect elements, such as text, images, and video frames, corresponding to layers in After Effects. The PAG Layer is the special effects barrage layer. By configuring and combining PAGLayer and PAGComposition, various types of animation effects can be obtained. The root compositing layer serves as the root node of the target rendering tree, other compositing layers serve as branch nodes, and each special effects barrage layer within the compositing layers serves as a leaf node, thus obtaining the target rendering tree. The target rendering tree is then used to draw the image, resulting in the target special effects barrage corresponding to each native barrage.

[0086] In the above embodiment, a target rendering tree is obtained by generating a rendering tree based on the bullet screen container to be rendered, and a target shader corresponding to the target rendering tree is generated. Then, the target shader is used to render the bullet screen container to be rendered according to the target rendering tree to obtain the target bullet screen corresponding to each original bullet screen, thereby improving the rendering efficiency.

[0087] In one embodiment, such as Figure 5 As shown, S202, when the target video is playing and has special effects bullet comments to be displayed, obtains the target special effects bullet comment configuration information corresponding to the target video and the original bullet comment data when the target video has special effects bullet comments to be displayed, including:

[0088] S502 plays the target video and responds to the bullet screen enable event for the target video. It displays the corresponding native bullet screen on the playback interface of the target video and generates a special effects bullet screen configuration information download request, and sends the special effects bullet screen configuration information download request to the video playback server.

[0089] S504: Obtain the target special effects barrage configuration information corresponding to the target video returned by the video playback server, and obtain the current playback time. When the current playback time is consistent with the preset special effects barrage opening time in the target special effects barrage configuration information, confirm that the target video is in the state of waiting to display special effects barrage.

[0090] S506: Obtain the original bullet screen data of the target video when the special effects bullet screen is to be displayed.

[0091] The "bullet screen activation event" refers to the event that begins displaying the bullet screen corresponding to the target video, which can be triggered by a triggering operation. The "bullet screen configuration information download request" is a request used to download the bullet screen configuration information corresponding to the target video. The "video playback server" refers to the server of the video playback platform corresponding to the target video. Users can log in to the video playback platform to watch various videos. The "current playback time" refers to the current playback time of the target video. The "preset bullet screen activation time" refers to the pre-set time for displaying bullet screen effects.

[0092] Specifically, the terminal detects a trigger operation for playing the target video and responds by playing the target video. Then, during the playback of the target video, it detects a bullet comment (danmaku) activation event for the target video, responds to the bullet comment activation event, obtains the native bullet comments for the target video, and displays the corresponding native bullet comments on the target video's playback interface. Simultaneously, after responding to the bullet comment activation event, it generates a request to download special effects bullet comment configuration information and sends the request to the video playback server. The video playback server receives the special effects bullet comment configuration information download request from the terminal, retrieves the target special effects bullet comment configuration information corresponding to the target video from its database, and then returns the target special effects bullet comment configuration information to the terminal. The terminal obtains and saves the target special effects bullet comment configuration information returned by the video playback server. Then, during the playback of the target video, it obtains the current playback time in real time and compares it with the preset special effects bullet comment activation time in the target special effects bullet comment configuration information. When the current playback time matches the preset special effects bullet comment activation time in the target special effects bullet comment configuration information, it confirms that the target video is ready to display special effects bullet comments. At this point, the terminal can obtain the native bullet screen data of the target video when it is in the state of displaying special effects bullet screens from the video playback server. In one embodiment, the terminal determines that the target video is in the state of displaying special effects bullet screens when the current playback time is within the preset special effects bullet screen activation time range in the target special effects bullet screen configuration information. In another embodiment, the target video may have different special effects bullet screen configuration information at different playback time periods, and the terminal can obtain all the special effects bullet screen configuration information of the target video from the video playback server. Then, based on the time range corresponding to the special effects bullet screen configuration information and the current playback time, the terminal determines the special effects bullet screen configuration information to be used.

[0093] In a specific embodiment, such as Figure 6The diagram illustrates the process of enabling special effects bullet comments. Specifically: When the terminal detects that a user has enabled bullet comments on a playing video, such as by detecting a trigger operation, the terminal generates a pre-download request for the PAG special effects file corresponding to the target video. It then downloads and saves the PAG special effects file from the video playback server. Next, the terminal compares the display time range of the special effects bullet comments corresponding to the PAG special effects file with the current playback time to determine if the current playback time is within the display time range. If the current playback time is not within the display time range, only ordinary bullet comments are displayed; if special effects bullet comments are available, their display is disabled. When the current playback time is within the display time range, the special effects bullet comments are displayed using the configured information. Furthermore, the terminal continuously checks whether the current playback time of the target video is within the display time range, meaning the video player continuously calls back the playback time until the target video finishes playing.

[0094] In the above embodiments, by responding to a bullet comment activation event for the target video during playback, the corresponding native bullet comments are displayed on the target video's playback interface. A special effects bullet comment configuration information download request is generated and sent to the video playback server to obtain the target special effects bullet comment configuration information corresponding to the target video, thus facilitating subsequent use. Furthermore, when the current playback time matches the preset special effects bullet comment activation time in the target special effects bullet comment configuration information, it is confirmed that the target video is in a state where special effects bullet comments are to be displayed, and the native bullet comment data for this state is obtained, ensuring the accuracy of special effects bullet comment activation.

[0095] In one embodiment, the bullet screen display method further includes the step of:

[0096] Get the currently playing video frame. When the currently playing video frame is consistent with the preset video frame for opening special effects in the target special effects barrage configuration information, determine that the target video is in the state where special effects barrage is to be displayed; or respond to the special effects barrage opening event for the target video to determine that the target video is in the state where special effects barrage is to be displayed.

[0097] Here, "currently playing video frame" refers to the video frame in the target video currently being played. "Preset special effects barrage start video frame" refers to the pre-set video frame from which special effects barrage is displayed. "Special effects barrage start event" refers to the event that begins displaying special effects barrage; it can be triggered when the terminal detects a trigger operation that activates special effects barrage.

[0098] Specifically, the terminal obtains the currently playing video frame of the target video, and then compares the currently playing video frame with the preset special effects barrage video frame. For example, it can calculate the similarity between the currently playing video and the preset special effects barrage video frame based on the video's pixel-based image. When the similarity exceeds a preset threshold, it indicates that the currently playing video frame and the preset special effects barrage video frame are consistent. At this point, it is determined that the target video is in the state where special effects barrage is to be displayed.

[0099] In one embodiment, the terminal detects a trigger operation to enable special effects bullet comments, responds to the trigger operation by triggering a special effects bullet comment enable event, and responds to a special effects bullet comment enable event for a target video, determining that the target video is in a state where special effects bullet comments are to be displayed. That is, the user can manually enable special effects bullet comments for the target video through a trigger operation.

[0100] In the above embodiments, the terminal determines whether the target video is in a state where special effects bullet comments are to be displayed by detecting whether the currently playing video frame is a preset special effects bullet comment opening video frame or whether a special effects bullet comment opening event is detected, thereby expanding the application scenarios of special effects bullet comments and improving the flexibility of special effects bullet comment display.

[0101] In one embodiment, the native bullet screen data includes at least one of image native bullet screen, text native bullet screen and combined native bullet screen, and the target special effect bullet screen configuration information includes the special effect bullet screen type and the corresponding special effect bullet screen display parameters.

[0102] like Figure 7 As shown in step S204, each original bullet comment in the original bullet comment data is converted into bitmap data to obtain individual bitmap data. Then, according to the target effect bullet comment configuration information, effect bullet comment layers corresponding to each bitmap data are generated, including:

[0103] S702 converts the original image bullet comments into bitmap data to obtain image bitmap data, and generates image effect bullet comment layers corresponding to the image bitmap data according to the image effect bullet comment type and corresponding image effect bullet comment display parameters in the target effect bullet comment configuration information.

[0104] Among them, native image bullet comments refer to bullet comments in image format. For example, the native image bullet comment can be an emoji bullet comment, which can be an avatar bullet comment, an arrow bullet comment, or various other emoji bullet comments. Native text bullet comments refer to native text bullet comments in text format. For example, the native text bullet comment can be in English text format or in gradient text format. Combined native bullet comments refer to native bullet comments that combine image and text formats. That is, a combined native bullet comment can include both text and images. For example, a combined native bullet comment can be a combination of bullet comment views or bullet comment layers. Special effect bullet comment types refer to the types of special effect bullet comments. Different animation effects correspond to different special effect bullet comment types. For example, blur animation effects correspond to blur special effect bullet comment types, font deformation animation effects correspond to deformation special effect bullet comment types, emboss animation effects correspond to emboss special effect bullet comment types, and basic animation effects such as zoom in and out correspond to basic special effect bullet comment types. Different special effect bullet comment types have different special effect bullet comment display parameters. Different special effects bullet screen display parameters are used to achieve corresponding animation effects. For example, the parameters for deformation animation effects are used to achieve the corresponding deformation animation effect, so that the special effects bullet screen displays a deformation animation effect when displayed. Image bitmap data refers to the bitmap data obtained after converting the original image bullet screen. Image special effects bullet screen type refers to the type of special effects bullet screen corresponding to the original image bullet screen. Image special effects bullet screen display parameters refer to the special effects bullet screen display parameters corresponding to the original image bullet screen, which are the special effects bullet screen display parameters corresponding to the type of special effects bullet screen to which the original image bullet screen belongs. Image special effects bullet screen layer refers to the special effects bullet screen layer corresponding to the original image bullet screen.

[0105] Specifically, the terminal identifies all native image bullet comments from the various native bullet comments. For example, it can determine native image bullet comments based on their format; bullet comments in image format are native image bullet comments. This image format can refer to the storage format of the image, including formats such as bmp, jpg, and png. Then, the native image bullet comments are converted into bitmap data to obtain image bitmap data. Next, the terminal generates corresponding image effect bullet comment layers based on the image effect bullet comment type and corresponding display parameters in the target effect bullet comment configuration information. For example, the image bitmap data is deformed according to the deformation effect bullet comment type and corresponding display parameters in the target effect bullet comment configuration information. These display parameters can include the transformation parameter `transform`, the effect parameter `effects`, and the layer style parameter `layerStyles`. These parameters are then used to transform the image bitmap data, resulting in effect bullet comment layers with deformation animation effects.

[0106] S704 converts the original text bullet comments into bitmap data to obtain text bitmap data. Based on the text effect bullet comment type and corresponding text effect bullet comment display parameters in the target effect bullet comment configuration information, it generates text effect bullet comment layers corresponding to the text bitmap data.

[0107] Here, "text bitmap data" refers to the bitmap data obtained after converting the original image-based bullet comments. "Text effect bullet comment type" refers to the type of effect bullet comments corresponding to the original text bullet comments. "Text effect bullet comment display parameters" refers to the display parameters of the effect bullet comments corresponding to the original text bullet comments, specifically the display parameters corresponding to the type of effect bullet comments to which the original text bullet comments belong. "Text effect bullet comment layer" refers to the effect bullet comment layer corresponding to the original text bullet comments.

[0108] Specifically, the terminal identifies all native text comments from the various native bullet comments. For example, it can determine native image comments based on their format; for instance, bullet comments in text format (e.g., TXT text format) are native text comments. Then, the native text comments are converted into bitmap data to obtain text bitmap data, essentially converting the native text comments as a whole into bitmap data. Next, using the text effect bullet comment type and corresponding display parameters from the target effect bullet comment configuration information, text effect bullet comment layers corresponding to the text bitmap data are generated. These display parameters can include layer style parameters, text animation effect parameters, and conversion parameters. The conversion parameters and text animation effect parameters are used to convert the text bitmap data into corresponding animated text, and then, based on the layer style parameters, the corresponding text effect bullet comment layer with that animation effect is obtained.

[0109] S706 converts the combined native bullet comments into bitmap data to obtain combined bitmap data. Based on the combined effect bullet comment type and corresponding combined effect bullet comment display parameters in the target effect bullet comment configuration information, it generates combined effect bullet comment layers corresponding to the combined bitmap data.

[0110] Among them, "combined bitmap data" refers to the bitmap data obtained after converting the combined original bullet comments. "Combined special effects bullet comment type" refers to the type of special effects bullet comments corresponding to the combined original bullet comments. "Combined special effects bullet comment display parameters" refers to the display parameters of the special effects bullet comments corresponding to the type of special effects bullet comments to which the combined original bullet comments belong. "Combined special effects bullet comment layer" refers to the special effects bullet comment layer corresponding to the combined original bullet comments.

[0111] Specifically, the terminal identifies all native image bullet comments from the various native bullet comments. For example, it can determine native image bullet comments based on their format; image bullet comments are native image bullet comments, and text bullet comments are native text bullet comments. Then, the native image bullet comments are converted into bitmap data to obtain image bitmap data. Next, based on the combined effect bullet comment type and corresponding combined effect bullet comment display parameters in the target effect bullet comment configuration information, combined effect bullet comment layers corresponding to the combined bitmap data are generated. These combined effect bullet comment display parameters can include layer style parameters, text animation effect parameters, and conversion parameters. The combined native bullet comments are then animated using the text animation effect parameters and conversion parameters to obtain animated combined bullet comments, and finally, combined effect bullet comment layers are generated according to the layer style parameters.

[0112] In one embodiment, native bullet comments within the same display time range can use the same animation effect for bullet comment transformation. For example, native bullet comments within the same display time range can be converted into blurred bullet comments with a blur animation effect, or native bullet comments within the same display time range can be converted into deformed bullet comments with a text deformation animation effect. In another embodiment, different native bullet comments within the same display time range can use different animation effects for bullet comment transformation. For example, some native bullet comments can be converted into blurred bullet comments with a blur animation effect, and other native bullet comments can be converted into deformed bullet comments with a deformation animation effect.

[0113] In a specific embodiment, such as Figure 8 The diagram illustrates the process of converting native bullet comments into special effects bullet comment layers. Specifically: Various types of bullet comments are obtained from the native bullet comments, including view-type, layer-type, and combined view-type bullet comments. For example, view-type bullet comments can be bullet comment views, layer-type bullet comments can be bullet comment layers, and combined bullet comments can be bullet comments from asynchronous nodes. Then, each type of native bullet comment is converted into bitmap data, and a corresponding PAG image layer (PAGImageLayer) is generated for each bitmap data, thus obtaining the special effects bullet comment layer.

[0114] In the above embodiments, by converting the original image bullet comments, original text bullet comments, and combined original bullet comments into bitmap data, each bitmap data is obtained, and special effect bullet comment layers corresponding to each bitmap data are generated according to the target special effect bullet comment configuration information, thereby improving the accuracy of the obtained special effect bullet comment layers.

[0115] In one embodiment, the special effects barrage display parameters are determined based on the video content of the target video when the special effects barrage is to be displayed. The association between the video content and the special effects barrage display parameters is pre-set. For example, if the video content shows a scene of fire, the corresponding special effects barrage display parameters could be those for a morphing animation effect. Different video content has corresponding special effects barrage display parameters. When it is necessary to display the special effects barrage corresponding to the video content, the original barrage is converted according to the special effects barrage display parameters associated with the video content to obtain the special effects barrage corresponding to the video content, and the corresponding special effects barrage is displayed when the video content is shown.

[0116] In one embodiment, such as Figure 9 As shown, the methods for displaying bullet comments also include:

[0117] S902, when the target video being played is in the state of waiting to display special effects bullet comments, responds to the special effects activation event for the currently sent bullet comment and obtains the current special effects bullet comment configuration information corresponding to the currently sent bullet comment.

[0118] Among them, "currently sent bullet comment" refers to the bullet comment sent by the user at the current playback time, which is to be displayed on the target video playback interface. "Effect activation event" is the event that triggers the conversion of the currently sent bullet comment into an effect bullet comment; this event is triggered by a trigger operation. "Current effect bullet comment configuration information" refers to the configuration information used when converting the currently sent bullet comment into an effect bullet comment; this current effect bullet comment configuration information can be obtained based on the animation effect selected by the user.

[0119] Specifically, when the target video being played is displaying special effects comments, i.e., when the target video on the terminal is displaying special effects comments, the terminal detects a user's trigger operation to enable the special effects comments for the currently sent comments. For example, the user can send comments while the target video is playing, and can trigger an event to enable special effects comments for the currently sent comments by selecting a special effects comment option. At this time, the terminal responds to the special effects enable event for the currently sent comments, and can obtain the current special effects comment configuration information corresponding to the currently sent comments based on the selected special effects comment option. Different special effects comment options can make the sent comments have different animation effects, i.e., different special effects comments.

[0120] S904 converts the currently sent bullet screen into bitmap data to obtain the current bitmap data, and generates the current special effect bullet screen layer corresponding to the current bitmap data according to the current special effect bullet screen configuration information.

[0121] Here, "current bitmap data" refers to the bitmap data corresponding to the currently sent bullet comment. "Current special effects bullet comment layer" refers to the special effects bullet comment layer corresponding to the currently sent bullet comment.

[0122] Specifically, while converting the native bullet comments into bitmap data, the terminal also converts the currently sent bullet comments into bitmap data to obtain the current bitmap data. Then, it converts the current bitmap data according to the special effects bullet comment display parameters in the current special effects bullet comment configuration information, thereby generating the current special effects bullet comment layer corresponding to the current bitmap data.

[0123] S906, apply the special effects barrage layer corresponding to each bitmap data and the current special effects barrage layer to the preset special effects barrage container to obtain the current special effects barrage container to be rendered, and perform special effects animation rendering based on the current special effects barrage container to be rendered to obtain the target special effects barrage corresponding to each original barrage and the current special effects barrage corresponding to the currently sent barrage.

[0124] S908 displays the target special effects bullet comments corresponding to each original bullet comment and the current special effects bullet comment corresponding to the currently sent bullet comment in the playback interface of the target video.

[0125] The "currently unrendered effect barrage container" refers to the container containing the current effect barrage layer. The "current effect barrage" refers to the effect barrage corresponding to the currently sent barrage.

[0126] Specifically, the terminal loads the special effects barrage layers corresponding to each bitmap data and the current special effects barrage layer into the preset special effects barrage container to obtain the current special effects barrage container to be rendered. Then, based on the current special effects barrage container to be rendered, special effects animation is rendered to obtain the target special effects barrage corresponding to each native barrage and the current special effects barrage corresponding to the currently sent barrage. The target special effects barrage corresponding to each native barrage and the current special effects barrage corresponding to the currently sent barrage are displayed in the playback interface of the target video.

[0127] In the above embodiments, when the target video being played is displaying special effects bullet comments, an effect activation event for the currently sent bullet comment is responded to, and the current special effects bullet comment configuration information corresponding to the currently sent bullet comment is obtained. The currently sent bullet comment is converted into bitmap data to obtain current bitmap data, and a current special effects bullet comment layer corresponding to the current bitmap data is generated according to the current special effects bullet comment configuration information. Then, the special effects bullet comment layers corresponding to each bitmap data and the current special effects bullet comment layer are applied to a preset special effects bullet comment container to obtain the current special effects bullet comment container to be rendered. This allows the current special effects bullet comment layer and the special effects bullet comment layers corresponding to each bitmap data to be rendered and displayed in the same preset special effects bullet comment container, avoiding inconsistencies in the display of the special effects bullet comments corresponding to the sent bullet comments on different devices, thereby improving the consistency of the display of the special effects bullet comments corresponding to the sent bullet comments on different devices.

[0128] In one embodiment, such as Figure 10 As shown, the methods for displaying bullet comments also include:

[0129] S1002, determine the target native bullet comments and non-target native bullet comments from each native bullet comment in the native bullet comment data.

[0130] S1004 converts the target's original bullet comments into bitmap data to obtain various bitmap data, and generates the corresponding effect bullet comment layer according to the target's original bullet comments configuration information.

[0131] Here, "target native bullet comments" refers to the native bullet comments that are to be converted into special effects bullet comments. "Non-target native bullet comments" refers to bullet comments that do not need to be converted into special effects bullet comments.

[0132] Specifically, the target native bullet comments and non-target native bullet comments are determined from the native bullet comment data. The terminal divides each native bullet comment into two parts based on its display position: target native bullet comments and non-target native bullet comments. For example, native bullet comments displayed in the upper half of the playback screen are considered target native bullet comments, while those displayed in the lower half are considered target native bullet comments. The terminal can also divide native bullet comments into target and non-target native bullet comments according to pre-set rules. For instance, native bullet comments sent within a target time range are considered target native bullet comments, while those sent outside the target time range are considered non-target native bullet comments. Then, the terminal performs bitmap data conversion on the target native bullet comments to obtain individual bitmap data and generates corresponding effect bullet comment layers according to the target effect bullet comment configuration information.

[0133] S1006: Apply the special effects barrage layer corresponding to the target native barrage to the preset special effects barrage container to obtain the special effects barrage container to be rendered, and apply the non-target native barrage to the preset native container to obtain the native container to be rendered.

[0134] The preset native container refers to a pre-set container used to hold native bullet comments. The native container to be rendered refers to a container that includes non-target native bullet comments.

[0135] Specifically, the terminal loads all the special effects barrage layers corresponding to the target native barrage into a preset special effects barrage container to obtain the special effects barrage container to be rendered, and then loads all the non-target native barrages into a preset native container to obtain the native container to be rendered.

[0136] S1008 merges the special effects barrage container to be rendered and the native container to be rendered to obtain the target container to be rendered, and performs barrage rendering based on the target container to obtain the target special effects barrage and non-target native barrage corresponding to the target native barrage.

[0137] S1010 displays the target effect bullet comments and non-target original bullet comments corresponding to the target's original bullet comments in the target video playback interface.

[0138] Specifically, the terminal merges the container for the special effects bullet comments to be rendered and the container for the native bullet comments to be rendered, obtaining the target container for rendering. Then, it renders the bullet comments based on this target container, resulting in the target special effects bullet comments and non-target native bullet comments corresponding to the target native bullet comments. In other words, the terminal merges the container for the special effects bullet comments to be rendered and the container for the native bullet comments to be rendered, rendering them together so that the rendered bullet comments are displayed in the same video frame. Finally, the target special effects bullet comments and non-target native bullet comments corresponding to the target native bullet comments are displayed on the target video's playback interface.

[0139] In the above embodiments, target native bullet comments and non-target native bullet comments are determined from the native bullet comments in the native bullet comment data. The target native bullet comments are then converted into corresponding special effects bullet comments, while the non-target native bullet comments remain unchanged. Finally, the target special effects bullet comments and non-target native bullet comments corresponding to the target native bullet comments are displayed on the target video playback interface. This allows some native bullet comments to be converted into special effects bullet comments for display, thereby improving the flexibility of special effects bullet comment display.

[0140] In one embodiment, the bullet screen display method further includes:

[0141] When the target video being played is in the state of having native bullet comments to be displayed, the native bullet comment data is obtained and rendered based on the native bullet comment data to obtain the native bullet comments; the native bullet comments are then displayed on the playback interface of the target video.

[0142] In this context, "target video in a state of awaiting native bullet comments" means that the target video is in a state of displaying native bullet comments. For example, after a user enables bullet comments, the terminal detects the activation of bullet comments and begins displaying native bullet comments in the target video. At this time, the target video is in a state of displaying native bullet comments.

[0143] Specifically, the terminal can detect whether the currently playing target video is in a state where native bullet comments are to be displayed. For example, when the terminal detects a trigger operation that enables bullet comments for the currently playing target video, it confirms that the currently playing target video is in a state where native bullet comments are to be displayed. Or, when the terminal detects that the currently playing target video is in a state where bullet comments are already enabled, it confirms that the currently playing target video is in a state where native bullet comments are to be displayed. When the currently playing target video is in a state where native bullet comments are to be displayed, the terminal can use a pre-set bullet comment component for displaying bullet comments to obtain native bullet comment data, and use the bullet comment component to render the native bullet comment data to obtain the native bullet comments. Then, the native bullet comments are displayed on the playback interface of the target video.

[0144] In one embodiment, when the target video being played is under the condition of displaying native bullet comments, the current playback time is obtained. If the current playback time is within the time range of the pre-displayed special effects bullet comments, it indicates that the target video is under the condition of displaying special effects bullet comments.

[0145] In one embodiment, when the target video being played is not displaying any special effects bullet comments, the terminal obtains the original bullet comment data and renders and displays the original bullet comments.

[0146] In one specific embodiment, when displaying native bullet comments in a target video, a bullet comment library component can be used. This component is driven by timed messages, and bullet comment data is distributed, measured, and rendered for each frame. Specifically, while the target video is playing a video frame, the bullet comment library component performs track distribution, bullet comment measurement, and bullet comment rendering for the corresponding video frame, and then displays the native bullet comments for that video frame on the screen simultaneously with the playback of that video frame.

[0147] In the above embodiments, when the target video being played is in a state where native bullet comments are to be displayed, native bullet comment data is obtained and rendered based on the native bullet comment data to obtain native bullet comments. Then, the native bullet comments are displayed on the playback interface of the target video, thereby ensuring that the target video can display native bullet comments normally.

[0148] In one embodiment, before S202, and before obtaining the target special effects barrage configuration information corresponding to the target video and the native barrage data of the target video when it is in the state of displaying special effects barrage, the following steps are included:

[0149] The creation page displays the configuration information for special effects bullet comments. Upon completion of the creation process on the creation page, it retrieves the target special effects bullet comment configuration information and displays the video association page. On the video association page, it responds to the completion of the association process for the target video, saving the target special effects bullet comment configuration information associated with the target video.

[0150] The "Special Effects Bullet Comments Configuration Information Creation Page" is used to create special effects bullet comment configuration information. This page allows users to create the names, style types, and specific animation resource files for the special effects bullet comments. The "Creation Completed" operation is the trigger action that completes the creation of the special effects bullet comment configuration information. The "Video Association Page" is the page that associates the special effects bullet comment configuration information with the target video. The "Association Completed" operation is the trigger action that completes the association between the special effects bullet comment configuration information and the target video.

[0151] Specifically, when the terminal detects a creation operation for special effects bullet comment configuration information, it responds by displaying a creation page for special effects bullet comment configuration information, which the user can then use to create the configuration information. Upon detecting a creation completion operation, it responds to a creation completion operation for the creation page and retrieves the target special effects bullet comment configuration information from the creation page. Then, when the terminal detects a video association trigger operation, it responds by displaying a video association page, where the user can associate the special effects bullet comment configuration information with a video. Finally, upon detecting an association completion operation, it responds to an association completion operation for the target video on the video association page, saving the association between the special effects bullet comment configuration information and the corresponding video.

[0152] In a specific embodiment, such as Figure 11The image shows a schematic of the creation page for special effects bullet screen configuration information. This page allows users to enter the name of the special effects bullet screen, select the PAG style type, and then select a pre-configured PAG effect file via the file upload button. Users can choose to upload a PAG effect file from their local files or upload a resource link for the PAG effect file. The PAG effect file is a dedicated animation file format designed for high-performance rendering scenarios. It can store vector graphics, text, bitmaps, and sequence frames with extremely high compression ratios, and fully utilizes the hardware acceleration capabilities of various platforms for fast decoding and high-speed rendering to screens of various sizes. The PAG effect file is a pure binary data structure file; using PAG effect files to store animation effects saves storage resources. The PAG effect file can be a source file exported from animation effects created in AE (Adobe After Effects). The special effects bullet screen configuration information can then be associated with the video on the video association page. For example... Figure 12 The image shows a schematic of the video association page. Specifically, users enter the name of the special effects barrage configuration information to be associated on the video association page, and then set the associated video playback time range. Within this time range, special effects barrages matching the associated configuration information will be displayed in the target video. For example, this time range could be set to start at 1 hour, 1 minute, and 30 seconds and end at 1 hour, 3 minutes, and 20 seconds. Users can also choose whether to change the color of the special effects barrages. After the user clicks the save button, the terminal detects that the association for the target video is complete and saves the special effects barrage configuration information with the same effect name associated with the corresponding video playback time range on the video association page.

[0153] In the above embodiments, the target special effects barrage configuration information is obtained by creating a page, and the target special effects barrage configuration information is associated with the target video and saved through the video association page, which facilitates subsequent use and improves efficiency.

[0154] In one embodiment, S202, obtaining the target special effects bullet screen configuration information corresponding to the target video and the native bullet screen data of the target video when it is in the state of displaying special effects bullet screens includes the following steps:

[0155] When the barrage rendering of the barrage corresponding to the forward video frame of the target video is completed, a barrage refresh message corresponding to the current video frame of the forward video frame is generated, and a special effects barrage refresh message corresponding to the current video frame is generated; based on the barrage refresh message of the current video frame, the preset barrage library component is called to obtain the native barrage data corresponding to the current video frame, and based on the special effects barrage refresh message, the preset special effects barrage component is called to obtain the target special effects barrage configuration information corresponding to the target video.

[0156] Here, "Forward Video Frame" refers to the previous video frame corresponding to the current video frame. "Bullet Screen Rendering Complete" means that the bullet screen to be displayed corresponding to the forward video frame has been rendered. This bullet screen can be a native bullet screen, a special effects bullet screen, or a combination of both. "Current Video Frame" refers to the video frame in the target video where the bullet screen will be displayed. "Bullet Screen Refresh Message" is a trigger message for displaying bullet screens in the next video frame; that is, a trigger message for track distribution, bullet screen measurement, and bullet screen rendering of the bullet screen data in the next video frame. "Special Effects Bullet Screen Refresh Message" is a trigger message for displaying special effects bullet screens in the next video frame. "Preset Bullet Screen Library Component" refers to pre-set components used to display bullet screens. "Preset Special Effects Bullet Screen Component" refers to pre-set components used to display special effects bullet screens; for example, this preset special effects bullet screen component can be a PAG component created using the PAG animation framework.

[0157] Specifically, when the target video being played is in the state where special effects bullet comments are to be displayed, and the terminal detects that the bullet comments corresponding to the previous video frame of the target video have been rendered, it generates a bullet comment refresh message for the current video frame corresponding to the previous video frame, and also generates a special effects bullet comment refresh message for the current video frame. Then, it uses the bullet comment refresh message of the current video frame to call a preset bullet comment library component to obtain the native bullet comment data corresponding to the current video frame, and uses the special effects bullet comment refresh message to call a preset special effects bullet comment component to obtain the target special effects bullet comment configuration information corresponding to the target video.

[0158] In one specific embodiment, the bullet comment library component is driven by timed messages, and the bullet comment data trajectory distribution, measurement, and rendering are performed every frame. Integrating the PAG animation framework into the bullet comment library component can lead to a missynchronization of their refresh rates due to the unstable rendering time of the bullet comment library component. Figure 13 The diagram illustrates the normal refresh of the bullet comment library component. Normally, the component's timed message is triggered every 17ms. However, during bullet comment rendering on the first video frame, the time consumed increases by 8ms, causing an 8ms delay in the bullet comment library component's refresh message for the second video frame. The PAG animation framework still refreshes according to the 17ms timed message trigger time, meaning the PAG refresh is still based on the coordinates of the first video frame. This leads to performance issues such as jitter and slower movement speed of the bullet comments as the video frame moves from right to left. In this application, as shown... Figure 14The diagram illustrates the refresh process when a bullet screen rendering error occurs. Upon detecting the completion of bullet screen rendering for a video frame, a refresh message is generated for the bullet screen library component and refresh information for the PAG animation framework. Specifically, by overriding PAGView, the refresh timing is controlled to occur after the video frame's danm rendering is complete. Subsequent track distribution, measurement, and rendering are then performed to maintain consistency between the PAG animation framework's refresh rhythm and the bullet screen library component's rendering rhythm. This prevents situations where the displacement coordinates are not updated in the next refresh, thus improving bullet screen smoothness.

[0159] In the above embodiment, when the rendering of the bullet comments corresponding to the preceding video frame of the target video is completed, a bullet comment refresh message corresponding to the current video frame of the preceding video frame is generated, and a special effects bullet comment refresh message corresponding to the current video frame is also generated. Based on the bullet comment refresh message of the current video frame, a preset bullet comment library component is called to obtain the native bullet comment data corresponding to the current video frame, and based on the special effects bullet comment refresh message, a preset special effects bullet comment component is called to obtain the target special effects bullet comment configuration information corresponding to the target video. That is, when the rendering of the bullet comments corresponding to the preceding video frame is detected to be completed, a bullet comment refresh message and a corresponding special effects bullet comment refresh message for the current video frame are generated, avoiding the bullet comment display smoothness problem caused by the special effects bullet comment refresh before the bullet comment library component has finished rendering, thereby improving the smoothness of the special effects bullet comment display.

[0160] In a specific embodiment, such as Figure 15 The diagram shown is a flowchart illustrating the method for displaying bullet comments, which is executed by computer equipment and includes the following steps:

[0161] S1502, responding to the barrage enable event for the target video being played, displaying the corresponding native barrage on the target video playback interface, generating a special effects barrage configuration information download request, sending the special effects barrage configuration information download request to the video playback server; obtaining the target special effects barrage configuration information corresponding to the target video returned by the video playback server and saving it.

[0162] S1504: Real-time acquisition of the current playback time. When the current playback time is consistent with the preset special effects barrage opening time corresponding to the target special effects barrage configuration information, the native barrage data of the target video under the condition of waiting to display special effects barrage is acquired, and the target special effects barrage configuration information corresponding to the target video is acquired.

[0163] S1506 converts each original bullet screen in the original bullet screen data into bitmap data to obtain each bitmap data, and generates the corresponding special effect bullet screen layer according to the target special effect bullet screen configuration information.

[0164] S1508: Obtain the preset special effects barrage layer from the target special effects barrage configuration information, add the special effects barrage layers corresponding to each bitmap data to the preset special effects barrage layer, and obtain the initial special effects barrage layer.

[0165] S1510: Apply the initial special effects barrage layer to the root composition layer of the preset view container to obtain the target view container, and merge the target view container with the video container of the target video to obtain the special effects barrage container to be rendered.

[0166] S1512, generate a rendering tree based on the barrage container of the special effects to be rendered, obtain the target rendering tree, and generate the target shader corresponding to the target rendering tree.

[0167] S1514: Use the target shader to render the special effects animation of the barrage container to be rendered according to the target rendering tree, obtain the target special effects barrage corresponding to each original barrage, and display the target special effects barrage corresponding to each original barrage in the playback interface of the target video.

[0168] In the above embodiments, when the display of bullet comments on the target video is enabled, the target special effects bullet comment configuration information corresponding to the target video is obtained and saved. Then, when the current playback time is consistent with the preset special effects bullet comment activation time corresponding to the target special effects bullet comment configuration information, each original bullet comment in the original bullet comment data is converted into bitmap data to obtain each bitmap data. According to the target special effects bullet comment configuration information, special effects bullet comment layers corresponding to each bitmap data are generated. The initial special effects bullet comment layer is applied to the root composition layer of the preset view container to obtain the target view container. The target view container is then merged with the video container of the target video to obtain the special effects bullet comment container to be rendered. Finally, the special effects bullet comment container to be rendered is rendered, thereby displaying the target special effects bullet comments corresponding to each original bullet comment in the playback interface of the target video, thus improving the consistency of the special effects bullet comment display.

[0169] In one specific embodiment, this bullet screen display method is applied to a video playback platform, specifically: such as Figure 16The diagram illustrates the process of rendering special effects bullet comments. Users log into a video playback platform via a terminal to watch videos. While watching, users can activate bullet comments by clicking the "Enable Bullet Comments" button. When the terminal detects this activation, it sends a request to the video playback platform's server to download the special effects bullet comment configuration information. The terminal then receives the configuration information returned by the server. This configuration information can be a PAG effect file corresponding to a displacement effect. This PAG effect file can be created in After Effects using a displacement map; that is, a map is created in After Effects, and then a PAGFile is exported from the PAG After Effects plugin. The video playback time is then monitored in real-time. When the playback time matches the pre-set time range for displaying special effects bullet comments, the animation rendering of the bullet comments begins. The terminal parses the PAG effects file to obtain the PAG displacement animation effect type and PAG displacement parameters. Then, using these parameters, it converts each native bullet comment into a displacement effect bullet comment layer, PAGLayer. This layer is then loaded into a preset effects bullet comment container to obtain the container for rendering the effects bullet comments. Vertical synchronization is used to refresh the bullet comment library component and the PAG component. The terminal generates a shader for the container and uses it to render the animation effects, resulting in the displacement effect bullet comments corresponding to each native bullet comment. Finally, the displacement effect bullet comments corresponding to each native bullet comment are displayed on the target video's playback interface, ensuring consistent display across multiple devices. The terminal can also display morphing effect bullet comments on the target video's playback interface, such as... Figure 17 The diagram shows various displacement effect bullet comments. This displacement can be a bullet comment that replaces text with deformed text, such as 1706 shown in the diagram, or it can be a bullet comment that deforms other content, such as a bullet comment that deforms a text box, as shown in 1702 and 1704. The terminal can also display blurred effect bullet comments on the target video's playback interface, such as... Figure 18 The image shows a schematic diagram of various blurred effect bullet comments. Each of these blurred effect bullet comments is completely blurred. The black boxes in the image represent completely blurred bullet comments. The blur level of the effect bullet comments can be controlled by adjusting the blur level parameter in the effect bullet comment configuration information.

[0170] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0171] Based on the same inventive concept, this application also provides a bullet screen display device for implementing the bullet screen display method described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more bullet screen display device embodiments provided below can be found in the limitations of the bullet screen display method above, and will not be repeated here.

[0172] In one embodiment, such as Figure 19 As shown, a bullet screen display device 1900 is provided, including: a data acquisition module 1902, a layer generation module 1904, a rendering module 1906, and a display module 1908, wherein:

[0173] The data acquisition module 1902 is used to acquire the target special effects barrage configuration information and the original barrage data of the target video when the target video is in the state of displaying special effects barrage.

[0174] The layer generation module 1904 is used to convert each original barrage in the original barrage data into bitmap data to obtain each bitmap data, and generate the special effect barrage layer corresponding to each bitmap data according to the target special effect barrage configuration information.

[0175] The rendering module 1906 is used to apply the special effects barrage layers corresponding to each bitmap data to the preset special effects barrage container to obtain the special effects barrage container to be rendered, and to perform special effects animation rendering based on the special effects barrage container to obtain the target special effects barrage corresponding to each original barrage.

[0176] Display module 1908 is used to display the target special effects bullet comments corresponding to each original bullet comment in the playback interface of the target video.

[0177] In one embodiment, the rendering module 1906 is further configured to obtain a preset special effects barrage layer from the target special effects barrage configuration information, add the special effects barrage layers corresponding to each bitmap data to the preset special effects barrage layer to obtain an initial special effects barrage layer; apply the initial special effects barrage layer to the root composition layer of the preset view container to obtain a target view container, and merge the target view container with the video container of the target video to obtain a special effects barrage container to be rendered.

[0178] In one embodiment, the bullet screen display device 1900 further includes:

[0179] The layer modification module is used to obtain the effect barrage layer modification request. The effect barrage layer modification request carries the two-dimensional attribute information corresponding to the target effect barrage layer. Based on the effect barrage layer modification request, the layer setting interface is called, and the target effect barrage layer is updated using the two-dimensional attribute information through the layer setting interface to obtain the updated effect barrage layer.

[0180] In one embodiment, the rendering module 1906 is further configured to generate a rendering tree based on the barrage container to be rendered, obtain a target rendering tree, and generate a target shader corresponding to the target rendering tree; use the target shader to render the barrage container to be rendered according to the target rendering tree to obtain the target barrage corresponding to each native barrage.

[0181] In one embodiment, the data acquisition module 1902 is further configured to play the target video, respond to the barrage activation event for the target video, display the corresponding native barrage on the playback interface of the target video, generate a special effects barrage configuration information download request, and send the special effects barrage configuration information download request to the video playback server; obtain the target special effects barrage configuration information corresponding to the target video returned by the video playback server, and obtain the current playback time. When the current playback time is consistent with the preset special effects barrage activation time in the target special effects barrage configuration information, it is confirmed that the target video is in the state of waiting to display special effects barrage; and obtain the native barrage data of the target video in the state of waiting to display special effects barrage.

[0182] In one embodiment, the bullet screen display device 1900 further includes:

[0183] The video frame detection module is used to obtain the currently playing video frame. When the currently playing video frame matches the preset video frame for enabling special effects in the target special effects barrage configuration information, it is determined that the target video is in the state where special effects barrage is to be displayed; or

[0184] The activation module is used to respond to the special effects barrage activation event for the target video and to determine when the target video is in the state where special effects barrage is to be displayed.

[0185] In one embodiment, the native bullet screen data includes at least one of image native bullet screen, text native bullet screen and combined native bullet screen, and the target special effect bullet screen configuration information includes the special effect bullet screen type and the corresponding special effect bullet screen display parameters.

[0186] The layer generation module 1904 is also used to convert the original image bullet comments into bitmap data to obtain image bitmap data, and generate image effect bullet comment layers corresponding to the image bitmap data according to the image effect bullet comment type and corresponding image effect bullet comment display parameters in the target effect bullet comment configuration information; convert the original text bullet comments into bitmap data to obtain text bitmap data, and generate text effect bullet comment layers corresponding to the text bitmap data according to the text effect bullet comment type and corresponding text effect bullet comment display parameters in the target effect bullet comment configuration information; convert the combined original bullet comments into bitmap data to obtain combined bitmap data, and generate combined effect bullet comment layers corresponding to the combined bitmap data according to the combined effect bullet comment type and corresponding combined effect bullet comment display parameters in the target effect bullet comment configuration information.

[0187] In one embodiment, the special effects barrage display parameters are determined based on the video content of the target video when the special effects barrage is to be displayed.

[0188] In one embodiment, the bullet screen display device 1900 further includes:

[0189] The current bullet comment display module is used to respond to the effect activation event for the currently sent bullet comment when the target video being played is in the state of displaying special effects bullet comments. It retrieves the current special effects bullet comment configuration information corresponding to the currently sent bullet comment; converts the currently sent bullet comment into bitmap data to obtain current bitmap data, and generates a current special effects bullet comment layer corresponding to the current bitmap data according to the current special effects bullet comment configuration information; applies the special effects bullet comment layers corresponding to each bitmap data and the current special effects bullet comment layer to a preset special effects bullet comment container to obtain the current special effects bullet comment container to be rendered, and performs special effects animation rendering based on the current special effects bullet comment container to obtain the target special effects bullet comment corresponding to each native bullet comment and the current special effects bullet comment corresponding to the currently sent bullet comment; and displays the target special effects bullet comment corresponding to each native bullet comment and the current special effects bullet comment corresponding to the currently sent bullet comment in the target video playback interface.

[0190] In one embodiment, the bullet screen display device 1900 further includes:

[0191] The target native bullet screen display module is used to identify the target native bullet screen and non-target native bullet screens from the various native bullet screens in the native bullet screen data; convert the target native bullet screens into bitmap data to obtain individual bitmap data, and generate the corresponding effect bullet screen layers according to the target effect bullet screen configuration information; apply the effect bullet screen layers corresponding to the target native bullet screens to a preset effect bullet screen container to obtain the effect bullet screen container to be rendered, and apply the non-target native bullet screens to the preset native container to obtain the native container to be rendered; merge the effect bullet screen container to be rendered and the native container to be rendered to obtain the target container to be rendered, and perform bullet screen rendering based on the target container to obtain the target effect bullet screens and non-target native bullet screens corresponding to the target native bullet screens; display the target effect bullet screens and non-target native bullet screens corresponding to the target native bullet screens in the target video playback interface.

[0192] In one embodiment, the bullet screen display device 1900 further includes:

[0193] The native bullet screen display module is used to obtain native bullet screen data when the target video being played is in the native bullet screen to be displayed, and to render the native bullet screen based on the native bullet screen data to obtain the native bullet screen;

[0194] Display native bullet comments on the target video's playback interface.

[0195] In one embodiment, the bullet screen display device 1900 further includes:

[0196] The configuration module is used to display the creation page for special effects bullet comments configuration information, respond to the creation completion operation on the creation page, obtain the target special effects bullet comments configuration information, and display the video association page; and respond to the association completion operation for the target video on the video association page, and save the target special effects bullet comments configuration information associated with the target video.

[0197] In one embodiment, the data acquisition module 1902 is further configured to generate a bullet screen refresh message corresponding to the current video frame of the forward video frame when the bullet screen rendering of the corresponding forward video frame of the target video is completed, and generate a special effects bullet screen refresh message corresponding to the current video frame; based on the bullet screen refresh message of the current video frame, call a preset bullet screen library component to obtain the original bullet screen data corresponding to the current video frame, and based on the special effects bullet screen refresh message, call a preset special effects bullet screen component to obtain the target special effects bullet screen configuration information corresponding to the target video.

[0198] Each module in the aforementioned bullet screen display device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0199] In one embodiment, a computer device is provided, which may be a terminal or a server. In this embodiment, the computer device is described as a terminal, and its internal structure diagram is as follows. Figure 20 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a bullet screen display method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0200] Those skilled in the art will understand that Figure 20 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0201] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0202] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0203] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0204] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0205] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0206] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0207] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for displaying bullet comments, characterized in that, The method includes: When the target video being played is under the condition of displaying special effects bullet comments, obtain the target special effects bullet comment configuration information corresponding to the target video and the original bullet comment data when the target video is under the condition of displaying special effects bullet comments; Each original barrage in the original barrage data is converted into bitmap data to obtain each bitmap data, and an effect barrage layer corresponding to each bitmap data is generated according to the target effect barrage configuration information. The process involves applying the special effects barrage layers corresponding to each bitmap data to a preset special effects barrage container to obtain a special effects barrage container to be rendered, and performing special effects animation rendering based on the special effects barrage container to obtain the target special effects barrage corresponding to each original barrage. This includes: using the root compositing layer in the special effects barrage container to be rendered as a branch node of the target rendering tree, using each target special effects barrage layer in the root compositing layer as a leaf node of the target rendering tree to obtain a target rendering tree, and performing special effects animation rendering on the special effects barrage container to be rendered according to the target rendering tree to obtain the target special effects barrage corresponding to each original barrage. The root compositing layer is used to load the initial special effects barrage layer, which is obtained by loading the special effects barrage layers corresponding to each bitmap data into the preset special effects barrage layer. The target special effects bullet comments corresponding to each of the original bullet comments are displayed in the playback interface of the target video.

2. The method according to claim 1, characterized in that, The step of applying the special effects barrage layers corresponding to each bitmap data to a preset special effects barrage container to obtain the special effects barrage container to be rendered includes: Obtain a preset special effects barrage layer from the target special effects barrage configuration information, and add the special effects barrage layers corresponding to each bitmap data to the preset special effects barrage layer to obtain the initial special effects barrage layer. The initial special effects barrage layer is applied to the root compositing layer of the preset view container to obtain the target view container, and the target view container is merged with the video container of the target video to obtain the special effects barrage container to be rendered.

3. The method according to any one of claims 1 to 2, characterized in that, The method further includes: Obtain a special effects barrage layer modification request, wherein the special effects barrage layer modification request carries the two-dimensional attribute information corresponding to the target special effects barrage layer; Based on the request to modify the special effects barrage layer, the layer settings interface is called, and the target special effects barrage layer is updated using the two-dimensional attribute information through the layer settings interface to obtain the updated special effects barrage layer.

4. The method according to claim 1, characterized in that, The process of rendering special effects animations based on the container of special effects bullet comments to be rendered, to obtain the target special effects bullet comments corresponding to each of the original bullet comments, includes: A rendering tree is generated based on the bullet screen container to be rendered, a target rendering tree is obtained, and a target shader corresponding to the target rendering tree is generated. The target shader is used to render the special effects animation of the container of special effects barrage according to the target rendering tree, so as to obtain the target special effects barrage corresponding to each original barrage.

5. The method according to claim 1, characterized in that, When the target video is playing and has special effects bullet comments to be displayed, the process of obtaining the target special effects bullet comment configuration information corresponding to the target video and the original bullet comment data when the target video has special effects bullet comments to be displayed includes: Play the target video and respond to the bullet screen enable event for the target video. Display the corresponding native bullet screen on the playback interface of the target video and generate a special effects bullet screen configuration information download request, and send the special effects bullet screen configuration information download request to the video playback server. Obtain the target special effects barrage configuration information corresponding to the target video returned by the video playback server, and obtain the current playback time. When the current playback time is consistent with the preset special effects barrage activation time in the target special effects barrage configuration information, confirm that the target video is in the state of waiting to display special effects barrage. Obtain the original bullet screen data of the target video when it is in the state of displaying special effects bullet screen.

6. The method according to claim 5, characterized in that, The method further includes: Obtain the currently playing video frame. When the currently playing video frame matches the preset video frame for enabling special effects comments in the target special effects comment configuration information, determine that the target video is in a state where special effects comments are to be displayed; or In response to the special effects barrage activation event for the target video, it is determined that the target video is in a state where special effects barrage is to be displayed.

7. The method according to claim 1, characterized in that, The native bullet screen data includes at least one of image native bullet screen, text native bullet screen and combined native bullet screen, and the target special effect bullet screen configuration information includes special effect bullet screen type and corresponding special effect bullet screen display parameters. The step of converting each native bullet comment in the native bullet comment data into bitmap data to obtain each bitmap data, and generating special effects bullet comment layers corresponding to each bitmap data according to the target special effects bullet comment configuration information, includes: The original image bullet comments are converted into bitmap data to obtain image bitmap data, and image effect bullet comment layers corresponding to the image bitmap data are generated according to the image effect bullet comment type and corresponding image effect bullet comment display parameters in the target effect bullet comment configuration information. The original text bullet comments are converted into bitmap data to obtain text bitmap data. Text bitmap layers are generated according to the text effect bullet comment type and corresponding text effect bullet comment display parameters in the target effect bullet comment configuration information. The combined native bullet comments are converted into bitmap data to obtain combined bitmap data. Combined effect bullet comment layers are generated according to the combined effect bullet comment type and corresponding combined effect bullet comment display parameters in the target effect bullet comment configuration information.

8. The method according to claim 7, characterized in that, The parameters for displaying special effects bullet comments are determined based on the video content of the target video when it is in the state where special effects bullet comments are to be displayed.

9. The method according to claim 1, characterized in that, The method further includes: When the target video being played is in the state of having special effects bullet comments to be displayed, respond to the special effects activation event for the currently sent bullet comment and obtain the current special effects bullet comment configuration information corresponding to the currently sent bullet comment; The currently sent bullet screen is converted into bitmap data to obtain current bitmap data, and the current special effects bullet screen layer corresponding to the current bitmap data is generated according to the current special effects bullet screen configuration information; The special effects barrage layer corresponding to each bitmap data and the current special effects barrage layer are applied to the preset special effects barrage container to obtain the current special effects barrage container to be rendered. The special effects animation is rendered based on the current special effects barrage container to be rendered to obtain the target special effects barrage corresponding to each original barrage and the current special effects barrage corresponding to the currently sent barrage. The target video playback interface displays the target special effects bullet comments corresponding to each of the original bullet comments and the current special effects bullet comments corresponding to the currently sent bullet comments.

10. The method according to claim 1, characterized in that, The method further includes: From the original bullet screen data, determine the target original bullet screen and the non-target original bullet screen; The target native bullet screen is converted into bitmap data to obtain various bitmap data, and the special effects bullet screen layer corresponding to the target native bullet screen is generated according to the target special effects bullet screen configuration information; Apply the special effects barrage layer corresponding to the target native barrage to the preset special effects barrage container to obtain the special effects barrage container to be rendered, and apply the non-target native barrage to the preset native container to obtain the native container to be rendered. The special effects barrage container to be rendered and the native container to be rendered are merged to obtain the target container to be rendered, and barrage rendering is performed based on the target container to be rendered to obtain the target special effects barrage corresponding to the target native barrage and the non-target native barrage. The target special effects bullet comments corresponding to the target native bullet comments and the non-target native bullet comments are displayed in the playback interface of the target video.

11. The method according to claim 1, characterized in that, The method further includes: When the target video being played is in the state of having native bullet comments to be displayed, the native bullet comment data is obtained and rendered based on the native bullet comment data to obtain the native bullet comments; The native bullet comments are displayed on the playback interface of the target video.

12. The method according to claim 1, characterized in that, Before obtaining the target special effects bullet screen configuration information corresponding to the target video and the native bullet screen data of the target video when the target video is displaying special effects bullet screens, the method further includes: The creation page displays the configuration information of special effects bullet comments, responds to the creation completion operation of the creation page, obtains the configuration information of the target special effects bullet comments, and displays the video-related page; In response to the completion of the association operation for the target video on the video association page, the target special effects bullet screen configuration information is associated with and saved with the target video.

13. The method according to claim 1, characterized in that, The process of obtaining the target special effects bullet screen configuration information corresponding to the target video and the native bullet screen data of the target video when it is in the state of displaying special effects bullet screen includes: When the barrage rendering of the barrage corresponding to the forward video frame of the target video is completed, a barrage refresh message corresponding to the current video frame of the forward video frame is generated, and a special effects barrage refresh message corresponding to the current video frame is generated. Based on the bullet screen refresh message of the current video frame, a preset bullet screen library component is invoked to obtain the native bullet screen data corresponding to the current video frame, and based on the special effects bullet screen refresh message, a preset special effects bullet screen component is invoked to obtain the target special effects bullet screen configuration information corresponding to the target video.

14. A bullet screen display device, characterized in that, The device includes: The data acquisition module is used to acquire the target special effects barrage configuration information corresponding to the target video and the original barrage data of the target video when the target video is in the state of displaying special effects barrage. The layer generation module is used to convert each original barrage in the original barrage data into bitmap data to obtain each bitmap data, and generate the special effects barrage layer corresponding to each bitmap data according to the target special effects barrage configuration information. The rendering module is used to apply the special effects barrage layers corresponding to each bitmap data to a preset special effects barrage container to obtain a special effects barrage container to be rendered, and to perform special effects animation rendering based on the special effects barrage container to obtain the target special effects barrage corresponding to each original barrage. This includes: using the root compositing layer in the special effects barrage container to be rendered as a branch node of the target rendering tree, using each target special effects barrage layer in the root compositing layer as a leaf node of the target rendering tree to obtain a target rendering tree, and performing special effects animation rendering on the special effects barrage container to be rendered according to the target rendering tree to obtain the target special effects barrage corresponding to each original barrage. The root compositing layer is used to load an initial special effects barrage layer, which is obtained by loading the special effects barrage layers corresponding to each bitmap data into a preset special effects barrage layer. The display module is used to display the target special effects bullet comments corresponding to each of the original bullet comments in the playback interface of the target video.

15. The apparatus according to claim 14, characterized in that, The rendering module also obtains a preset special effects barrage layer from the target special effects barrage configuration information, adds the special effects barrage layers corresponding to each bitmap data to the preset special effects barrage layer, and obtains the initial special effects barrage layer. The initial special effects barrage layer is applied to the root compositing layer of the preset view container to obtain the target view container, and the target view container is merged with the video container of the target video to obtain the special effects barrage container to be rendered.

16. The apparatus according to any one of claims 14 to 15, characterized in that, The device further includes: The layer modification module is used to obtain a special effects barrage layer modification request, which carries two-dimensional attribute information corresponding to the target special effects barrage layer; based on the special effects barrage layer modification request, the layer setting interface is called, and the target special effects barrage layer is updated using the two-dimensional attribute information through the layer setting interface to obtain the updated special effects barrage layer.

17. The apparatus according to claim 14, characterized in that, The rendering module is further configured to generate a rendering tree based on the barrage container to be rendered, obtain a target rendering tree, and generate a target shader corresponding to the target rendering tree; use the target shader to render special effects animations on the barrage container to be rendered according to the target rendering tree, and obtain the target special effects barrages corresponding to each original barrage.

18. The apparatus according to claim 14, characterized in that, The data acquisition module is also used to play the target video, respond to the barrage activation event for the target video, display the corresponding native barrage on the playback interface of the target video, generate a special effects barrage configuration information download request, and send the special effects barrage configuration information download request to the video playback server. Obtain the target special effects barrage configuration information corresponding to the target video returned by the video playback server, and obtain the current playback time. When the current playback time is consistent with the preset special effects barrage activation time in the target special effects barrage configuration information, confirm that the target video is in the state of waiting to display special effects barrage. Obtain the original bullet screen data of the target video when it is in the state of displaying special effects bullet screen.

19. The apparatus according to claim 18, characterized in that, The device further includes: The video frame detection module is used to acquire the currently playing video frame. When the currently playing video frame matches the preset video frame for enabling special effects comments in the target special effects comment configuration information, it is determined that the target video is in a state where special effects comments are to be displayed; or The module is used to respond to the special effects barrage activation event for the target video and to determine that the target video is in a state where special effects barrage is to be displayed.

20. The apparatus according to claim 14, characterized in that, The native bullet screen data includes at least one of image native bullet screen, text native bullet screen and combined native bullet screen, and the target special effect bullet screen configuration information includes special effect bullet screen type and corresponding special effect bullet screen display parameters. The layer generation module is further configured to convert the original image bullet comments into bitmap data to obtain image bitmap data, and generate image effect bullet comment layers corresponding to the image bitmap data according to the image effect bullet comment type and corresponding image effect bullet comment display parameters in the target effect bullet comment configuration information; convert the original text bullet comments into bitmap data to obtain text bitmap data, and generate text effect bullet comment layers corresponding to the text bitmap data according to the text effect bullet comment type and corresponding text effect bullet comment display parameters in the target effect bullet comment configuration information; convert the combined original bullet comments into bitmap data to obtain combined bitmap data, and generate combined effect bullet comment layers corresponding to the combined bitmap data according to the combined effect bullet comment type and corresponding combined effect bullet comment display parameters in the target effect bullet comment configuration information.

21. The apparatus according to claim 20, characterized in that, The parameters for displaying special effects bullet comments are determined based on the video content of the target video when it is in the state where special effects bullet comments are to be displayed.

22. The apparatus according to claim 14, characterized in that, The device further includes: The currently sent bullet comment display module is used to respond to the effect activation event for the currently sent bullet comment when the target video being played is in the state of displaying special effects bullet comments. It obtains the current special effects bullet comment configuration information corresponding to the currently sent bullet comment; converts the currently sent bullet comment into bitmap data to obtain current bitmap data, and generates a current special effects bullet comment layer corresponding to the current bitmap data according to the current special effects bullet comment configuration information; applies the special effects bullet comment layers corresponding to each bitmap data and the current special effects bullet comment layer to a preset special effects bullet comment container to obtain a current special effects bullet comment container to be rendered, and performs special effects animation rendering based on the current special effects bullet comment container to obtain the target special effects bullet comments corresponding to each original bullet comment and the current special effects bullet comment corresponding to the currently sent bullet comment; and displays the target special effects bullet comments corresponding to each original bullet comment and the current special effects bullet comment corresponding to the currently sent bullet comment in the playback interface of the target video.

23. The apparatus according to claim 14, characterized in that, The device further includes: The target native bullet screen display module is used to determine the target native bullet screen and non-target native bullet screen from the native bullet screen data; convert the target native bullet screen into bitmap data to obtain each bitmap data, and generate the special effects bullet screen layer corresponding to the target native bullet screen according to the target special effects bullet screen configuration information; apply the special effects bullet screen layer corresponding to the target native bullet screen to a preset special effects bullet screen container to obtain a special effects bullet screen container to be rendered, and apply the non-target native bullet screen to the preset native container to obtain a native container to be rendered; merge the special effects bullet screen container to be rendered and the native container to be rendered to obtain a target container to be rendered, and perform bullet screen rendering based on the target container to be rendered to obtain the target special effects bullet screen and the non-target native bullet screen corresponding to the target native bullet screen; and display the target special effects bullet screen and the non-target native bullet screen corresponding to the target native bullet screen in the playback interface of the target video.

24. The apparatus according to claim 14, characterized in that, The device further includes: The native bullet screen display module is used to obtain native bullet screen data when the target video being played is in a state where native bullet screens are to be displayed, and to render the native bullet screens based on the native bullet screen data to obtain the native bullet screens; and to display the native bullet screens in the playback interface of the target video.

25. The apparatus according to claim 14, characterized in that, The device further includes: The configuration module is used to display the creation page for special effects bullet comments configuration information, respond to the creation completion operation for the creation page, obtain the target special effects bullet comments configuration information, and display the video association page; respond to the association completion operation for the target video on the video association page, and save the target special effects bullet comments configuration information associated with the target video.

26. The apparatus according to claim 14, characterized in that, The data acquisition module is also used to generate a bullet screen refresh message corresponding to the current video frame of the preceding video frame when the bullet screen rendering of the preceding video frame of the target video is completed, and to generate a special effects bullet screen refresh message corresponding to the current video frame. Based on the bullet screen refresh message of the current video frame, a preset bullet screen library component is invoked to obtain the native bullet screen data corresponding to the current video frame, and based on the special effects bullet screen refresh message, a preset special effects bullet screen component is invoked to obtain the target special effects bullet screen configuration information corresponding to the target video.

27. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 13.

28. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.

29. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Bullet screen display method and device, equipment and storage medium

    CN114531607A

  • Scene picture integration method and device, storage medium, processor and system

    CN114546547A