Bullet screen display method and device, computer equipment and storage medium
By obtaining and converting barrage data, generating and rendering special effects barrage layers, the problem of inconsistent display of special effects barrage in different devices is solved, and a more unified display effect is achieved.
Patent Information
- Application Number
- CN202310797637.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2043-06-30
AI Technical Summary
When the special effects barrage is displayed in different devices, the effects are inconsistent due to native views or asynchronous drawing methods.
By obtaining the special effects barrage configuration information and native barrage data of the target video, performing bitmap data conversion, generating special effects barrage layers, and rendering animations in the preset container to ensure consistent display in the target video playback interface.
The display consistency of special effects barrage is improved and the problem of inconsistent effects caused by equipment differences is avoided.
Smart Images

Figure CN119232999A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a bullet screen display method, device, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of Internet technology, barrage technology has emerged. Barrage refers to the commentary subtitles that pop up when watching videos on the Internet. At present, when displaying barrage, you can display ordinary barrage or barrage with animation effects, that is, special effect barrage. For example, you can display enlarged or reduced barrage. Since videos can be played on multiple terminals, that is, on different devices, such as mobile phones, computers, TVs and other devices, barrage with animation effects also needs to be displayed on different devices. However, when special effect barrage is displayed on different devices, it is easy to cause the problem of inconsistent special effect barrage when rendering using native views or asynchronous drawing. Summary of the invention
[0003] Based on this, it is necessary to provide a barrage display method, device, computer equipment, computer-readable storage medium and computer program product that can improve the consistency of special effect barrage display in response to the above-mentioned technical problems.
[0004] In a first aspect, the present application provides a bullet screen display method. The method comprises:
[0005] When the target video being played is in the case where the special effects barrage is to be displayed, the target special effects barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the special effects barrage is to be displayed are obtained;
[0006] Convert each native bullet screen in the native bullet screen data into bitmap data to obtain each bitmap data, and generate a special effect bullet screen layer corresponding to each bitmap data according to the target special effect bullet screen configuration information;
[0007] Apply the special effect bullet screen layers corresponding to each bitmap data to the preset special effect bullet screen container to obtain the special effect bullet screen container to be rendered, and perform special effect animation rendering based on the special effect bullet screen container to be rendered to obtain the target special effect bullet screen corresponding to each native bullet screen;
[0008] The target special effect barrage corresponding to each native barrage is displayed in the playback interface of the target video.
[0009] In a second aspect, the present application also provides a bullet screen display device. The device comprises:
[0010] A data acquisition module is used to obtain target special effect barrage configuration information corresponding to the target video and native barrage data of the target video when the target video being played is in the special effect barrage to be displayed;
[0011] The layer generation module is used to convert each native bullet screen in the native bullet screen data into bitmap data to obtain each bitmap data, and generate a special effect bullet screen layer corresponding to each bitmap data according to the target special effect bullet screen configuration information;
[0012] A rendering module is used to apply the special effect bullet screen layers corresponding to each bitmap data to a preset special effect bullet screen container to obtain a special effect bullet screen container to be rendered, and perform special effect animation rendering based on the special effect bullet screen container to be rendered to obtain a target special effect bullet screen corresponding to each native bullet screen;
[0013] The display module is used to display the target special effect bullet screens corresponding to each native bullet screen in the playback interface of the target video.
[0014] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0015] When the target video being played is in the case where the special effects barrage is to be displayed, the target special effects barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the special effects barrage is to be displayed are obtained;
[0016] Convert each native bullet screen in the native bullet screen data into bitmap data to obtain each bitmap data, and generate a special effect bullet screen layer corresponding to each bitmap data according to the target special effect bullet screen configuration information;
[0017] Apply the special effect bullet screen layers corresponding to each bitmap data to the preset special effect bullet screen container to obtain the special effect bullet screen container to be rendered, and perform special effect animation rendering based on the special effect bullet screen container to be rendered to obtain the target special effect bullet screen corresponding to each native bullet screen;
[0018] The target special effect barrage corresponding to each native barrage is displayed in the playback interface of the target video.
[0019] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0020] When the target video being played is in the case where the special effects barrage is to be displayed, the target special effects barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the special effects barrage is to be displayed are obtained;
[0021] Convert each native bullet screen in the native bullet screen data into bitmap data to obtain each bitmap data, and generate a special effect bullet screen layer corresponding to each bitmap data according to the target special effect bullet screen configuration information;
[0022] Apply the special effect bullet screen layers corresponding to each bitmap data to the preset special effect bullet screen container to obtain the special effect bullet screen container to be rendered, and perform special effect animation rendering based on the special effect bullet screen container to be rendered to obtain the target special effect bullet screen corresponding to each native bullet screen;
[0023] The target special effect barrage corresponding to each native barrage is displayed in the playback interface of the target video.
[0024] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0025] When the target video being played is in the case where the special effects barrage is to be displayed, the target special effects barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the special effects barrage is to be displayed are obtained;
[0026] Convert each native bullet screen in the native bullet screen data into bitmap data to obtain each bitmap data, and generate a special effect bullet screen layer corresponding to each bitmap data according to the target special effect bullet screen configuration information;
[0027] Apply the special effect bullet screen layers corresponding to each bitmap data to the preset special effect bullet screen container to obtain the special effect bullet screen container to be rendered, and perform special effect animation rendering based on the special effect bullet screen container to be rendered to obtain the target special effect bullet screen corresponding to each native bullet screen;
[0028] The target special effect barrage corresponding to each native barrage is displayed in the playback interface of the target video.
[0029] The above-mentioned barrage display method, device, computer equipment, storage medium and computer program product obtain the target special effect barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the target video being played is in the special effect barrage to be displayed; each native barrage in the native barrage data is converted into bitmap data to obtain each bitmap data, and a special effect barrage layer corresponding to each bitmap data is generated according to the target special effect barrage configuration information; the special effect barrage layer corresponding to each bitmap data is applied to a preset special effect barrage container to obtain a special effect barrage container to be rendered, and special effect animation rendering is performed based on the special effect barrage container to be rendered to obtain the target special effect barrage corresponding to each native barrage; and the target special effect barrage corresponding to each native barrage is displayed in the playback interface of the target video. That is, the special effect barrage layers corresponding to each native barrage are applied to the preset special effect barrage container to obtain the special effect barrage container to be rendered, and then the special effect barrage container to be rendered is rendered and the target special effect barrage obtained after rendering is displayed, avoiding the problem of inconsistent special effect barrages displayed due to rendering using native views or asynchronous drawing methods, thereby improving the consistency of the display of the target special effect barrage. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A diagram showing an application environment of a bullet screen display method in an embodiment;
[0031] Figure 2 A schematic diagram of a process of displaying a bullet screen in one embodiment;
[0032] Figure 3 It is a rendering schematic diagram of a special effect bullet screen container to be rendered in a specific embodiment;
[0033] Figure 4 A schematic diagram of a target rendering tree generated in a specific embodiment;
[0034] Figure 5 A schematic diagram of a process for obtaining native bullet comment data in one embodiment;
[0035] Figure 6 A schematic diagram of a process of opening a special effect bullet screen in a specific embodiment;
[0036] Figure 7 A schematic diagram of a process for obtaining a special effect bullet screen layer in one embodiment;
[0037] Figure 8 A schematic diagram of a native bullet screen conversion into a special effect bullet screen layer in a specific embodiment;
[0038] Fig. 9 A schematic diagram of a process for displaying the current special effect bullet screen in an embodiment;
[0039] Fig.10 A schematic diagram of a process for displaying a target special effect bullet screen in one embodiment;
[0040] Fig.11 A schematic diagram of a page for creating special effect bullet screen configuration information in a specific embodiment;
[0041] Fig.12 A schematic diagram of a video association page in a specific embodiment;
[0042] Fig.13 It is a schematic diagram of component refresh when bullet screen rendering is normal in a specific embodiment;
[0043] Fig.14 It is a schematic diagram of component refresh when bullet screen rendering is abnormal in a specific embodiment;
[0044] Fig.15 It is a flowchart of a bullet screen display method in a specific embodiment;
[0045] Fig.16 A schematic diagram of a process of rendering special effect bullet screens in a specific embodiment;
[0046] Fig.17 A schematic diagram of each replacement special effect barrage in a specific embodiment;
[0047] Fig.18 A schematic diagram of various blurry special effect bullet screens in a specific embodiment;
[0048] Fig.19 It is a structural block diagram of a special effect bullet screen display device in one embodiment;
[0049] Fig. 20 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] The bullet screen display method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, can be integrated on the server 104, or can be placed on the cloud or other servers. The server 104 can be a server of the video playback platform. The terminal 102 can obtain each video from the data storage system of the server 104. Then the terminal 102 responds to the playback operation of the target video in each video and plays the target video. When the terminal 102 detects that the target video being played is in the case of a special effect barrage to be displayed, the target special effect barrage configuration information corresponding to the target video and the native barrage data of the target video in the case of a special effect barrage to be displayed; the terminal 102 performs bitmap data conversion on each native barrage in the native barrage data to obtain each bitmap data, and generates a special effect barrage layer corresponding to each bitmap data according to the target special effect barrage configuration information; the terminal 102 applies the special effect barrage layer corresponding to each bitmap data to a preset special effect barrage container to obtain a special effect barrage container to be rendered, and performs special effect animation rendering based on the special effect barrage container to be rendered to obtain the target special effect barrage corresponding to each native barrage; the terminal 102 displays the target special effect barrage corresponding to each native barrage in the playback interface of the target video. Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 may be implemented as an independent server or a server cluster composed of multiple servers, or may be a cloud server.
[0052] In one embodiment, Figure 2 As shown, a bullet screen display method is provided, which is applied to Figure 1 The terminal in the example is used for explanation. It can be understood that the method can also be applied to a server, and can also be applied to a system including 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 being played is in the case where the special effects barrage is to be displayed, obtain the target special effects barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the special effects barrage is to be displayed.
[0054] Among them, the target video refers to the video that needs to display special effects barrage. Special effects barrage refers to barrage with animation effects. For example, the animation effect can be a basic animation effect, such as zooming in and out. It can also be an extended animation effect, such as deformation, vibration, blur, and concave and convex effects, etc. The target video is in a situation where the special effects barrage is to be displayed, which means that the target video being played is in a situation where the special effects barrage needs to be displayed. For example, when the target video being played meets the pre-set special effects barrage display conditions, the target video is in a situation where the special effects barrage is to be displayed. The pre-set special effects barrage display conditions can be pre-set playback time, playback content, and keywords that appear in the barrage, etc.
[0055] The target special effect barrage configuration information refers to the configuration information of the special effect barrage to be converted, and the target special effect barrage configuration information may include the parameters necessary for generating the barrage with animation effects. For example, the target special effect barrage configuration information may be a PAG special effect file obtained from PAG (Complete Animation Workflow Solution), and the parameters necessary for generating the barrage with animation effects may be extracted from the PAG special effect file.
[0056] Native barrage data refers to the original barrage data, which may be the data of ordinary barrages that have not been converted by animation effects. The native barrage data may also be barrage data obtained through a native barrage component, which refers to a component developed using a native programming language and used to display barrages.
[0057] Specifically, the terminal responds to the play operation for the target video and plays the target video. The play operation refers to the trigger operation for playing the target video, and the trigger operation includes but is not limited to touch operation, cursor operation, key operation, voice operation and action operation, etc. For example, the touch operation may be a touch press operation or a touch click operation or a touch slide operation, etc. The cursor operation may be an operation for controlling the cursor to click or an operation for controlling the cursor to press or an operation for controlling the cursor to slide. The key operation may be a virtual key operation or a physical key operation, etc. The voice operation refers to an operation controlled by voice. The action operation refers to an operation controlled by the audience's action, such as hand action, head action, etc.
[0058] When the terminal plays the target video, it detects that the target video being played is in the case of a special effect barrage to be displayed, wherein the terminal determines that when the target video being played meets the pre-set special effect barrage display conditions, it means that the target video is in the case of a special effect barrage to be displayed. For example, when the terminal determines that the play time point of the target video reaches the time point of the special effect barrage display, it determines that the target video is in the case of a special effect barrage to be displayed. The terminal can also determine that the target video is in the case of a special effect barrage to be displayed when there is a barrage with pre-set keywords in the barrage displayed by the target video. The terminal can also determine that the target video is in the case of a special effect barrage to be displayed when the target video is played to a pre-set key frame. Then the terminal obtains the target special effect barrage configuration information corresponding to the target video and the native barrage data of the target video in the case of the special effect barrage to be displayed from the server providing the target video. The terminal can also obtain the target special effect barrage configuration information corresponding to the target video in advance and save it in the memory, and then when it needs to be used, the terminal can obtain the target special effect barrage configuration information corresponding to the target video from the memory.
[0059] S204, converting each native barrage in the native barrage data into bitmap data to obtain each bitmap data, and generating a special effect barrage layer corresponding to each bitmap data according to the target special effect barrage configuration information.
[0060] Among them, native barrage refers to ordinary barrage that has not been converted into special effect barrage, which is the original barrage. The native barrage can be a barrage in text form, a barrage in picture form, or a barrage in the form of a combination of text and picture. The text barrage can be a text barrage in different languages, such as Chinese barrage, English barrage, Japanese barrage, Russian barrage, etc. Bitmap data refers to barrage in bitmap form, that is, converting native barrage into bitmap. Each native barrage is converted into a bitmap.
[0061] Special Effect Barrage Layer refers to the layer corresponding to Special Effect Barrage. Layer is a film containing elements such as text or graphics, which are stacked together in order to form the final effect of the page. Layer can accurately position the elements on the page. You can add text, pictures, tables, plug-ins to the layer, and you can also nest layers in it.
[0062] Specifically, the terminal converts each native barrage in the native barrage data into bitmap data to obtain the bitmap data corresponding to each native barrage, that is, to obtain each bitmap data, that is, to convert the data format of the native barrage into the bitmap format, that is, to use the bitmap to store the native barrage, thereby obtaining the bitmap data. Then the terminal generates a special effect barrage layer corresponding to each bitmap data according to the target special effect barrage configuration information, wherein the terminal can transform each bitmap data using the parameters of the special effect barrage configured by the target special effect barrage configuration information to obtain the transformed special effect barrage layer. That is, by using bitmap data to generate a special effect barrage layer, the generation efficiency can be improved.
[0063] S206, applying the special effect bullet screen layers corresponding to each bitmap data to a preset special effect bullet screen container to obtain a special effect bullet screen container to be rendered, and performing special effect animation rendering based on the special effect bullet screen container to be rendered to obtain target special effect bullet screens corresponding to each native bullet screen.
[0064] The preset special effect bullet screen container refers to a pre-set view container for carrying the special effect bullet screen layer. The to-be-rendered special effect bullet screen container refers to a special effect bullet screen container that needs to be rendered by the front end. The target special effect bullet screen refers to the rendered special effect bullet screen, which is a bullet screen with animation effects.
[0065] Specifically, the terminal loads the special effect bullet screen layer corresponding to each bitmap data into the pre-set special effect bullet screen container, thereby obtaining the special effect bullet screen container to be rendered, that is, merging all the special effect bullet screen layers into one layer to obtain the special effect bullet screen container. Then, a shader is generated according to the front-end rendering process, and the special effect animation is rendered on the special effect bullet screen container to be rendered through the shader. When the rendering is completed, the target special effect bullet screen corresponding to each native bullet screen is obtained.
[0066] S208, displaying the target special effect bullet screens corresponding to the respective native bullet screens in the playback interface of the target video.
[0067] Specifically, the terminal displays the target special effect bullet screens corresponding to the respective native bullet screens in the playback interface of the target video according to the bullet screen style and animation effect of the target special effect bullet screen.
[0068] The above-mentioned barrage display method, device, computer equipment, storage medium and computer program product obtain the target special effect barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the target video being played is in the special effect barrage to be displayed; each native barrage in the native barrage data is converted into bitmap data to obtain each bitmap data, and a special effect barrage layer corresponding to each bitmap data is generated according to the target special effect barrage configuration information; the special effect barrage layer corresponding to each bitmap data is applied to a preset special effect barrage container to obtain a special effect barrage container to be rendered, and special effect animation rendering is performed based on the special effect barrage container to be rendered to obtain the target special effect barrage corresponding to each native barrage; and the target special effect barrage corresponding to each native barrage is displayed in the playback interface of the target video. That is, the special effect barrage layers corresponding to each native barrage are applied to the preset special effect barrage container to obtain the special effect barrage container to be rendered, and then the special effect barrage container to be rendered is rendered and the target special effect barrage obtained after rendering is displayed, avoiding the problem of inconsistent special effect barrages displayed due to rendering using native views or asynchronous drawing methods, thereby improving the consistency of the display of the target special effect barrage.
[0069] In one embodiment, S206, applying the special effect bullet screen layers corresponding to the respective bitmap data to the preset special effect bullet screen container to obtain the special effect bullet screen container to be rendered includes:
[0070] Get the preset special effect bullet screen layer from the target special effect bullet screen configuration information, add the special effect bullet screen layers corresponding to each bitmap data to the preset special effect bullet screen layer, and obtain the initial special effect bullet screen layer. Apply the initial special effect bullet screen layer to the root synthesis 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 effect bullet screen container to be rendered.
[0071] Among them, the preset special effect barrage layer refers to a pre-set layer for loading special effect barrage layers. The initial special effect barrage layer refers to the layer for loading all special effect barrage layers. The preset view container refers to a pre-set view container, which is a view area added to the native view. The view container divides the page into independent and different parts. Elements with animation effects can be played through the view container. The root synthesis layer refers to a container containing multiple special effect barrage layers, which corresponds to the synthesis in AE (Adobe After Effects, graphics and video processing software). The target view container refers to a view container that includes all special effect barrage layers. The video container refers to a view container that displays the video playback screen.
[0072] Specifically, the terminal parses the target special effect bullet screen configuration information to obtain the preset special effect bullet screen layer in the target special effect bullet screen configuration information. Then the terminal loads the special effect bullet screen layers corresponding to each bitmap data into the preset special effect bullet screen layer to obtain the initial special effect bullet screen layer. Then the initial special effect bullet screen layer is loaded into the root synthesis layer of the preset view container to obtain the target view container. Finally, the terminal merges the target view container with the video container of the target video to obtain the special effect bullet screen container to be rendered, that is, the special effect bullet screen to be displayed and the playback screen of the target video are finally merged into the same view level.
[0073] In a specific embodiment, Figure 3 The figure shows a rendering diagram of the special effect bullet screen container to be rendered, including: PAG special effect bullet screen layer Main, PAG root composition layer, PAG view container (PAGView) and video container. The video container is at the bottom layer, the PAG special effect bullet screen layer is at the top layer, the middle layer is the PAG root composition layer and the PAG view container, and finally the merged rendering is performed. The PAG special effect bullet screen layer can be a PAGComposition (PAG composition layer), and the PAG special effect bullet screen layer needs to be loaded into the PAG root composition layer. Specifically: the full-screen special effects barrage generated by the full-screen special effects barrage configuration information acts on the PAG special effects barrage layer, wherein the original barrage is first converted into bitmap data, and then the PAG special effects barrage layer corresponding to the bitmap data is generated, namely PAGLayer (PAG layer), which includes its subclasses PAGImageLayer (PAG image layer), PAGTextLayer (PAG text layer), PAGFile (PAG file object) and subclass combinations, such as the combination of PAG image layer and PAG file object. Then add the PAG special effects barrage layer to the root PAGComposition (PAG synthesis layer) of PAGView (PAG view container) to obtain the target view container. You can also adjust the size of the animation effect element through setContentSize (element size control function) to make it consistent with the width and height of the barrage View (view). Finally, merge the target view container and the video container to obtain the special effects barrage container to be rendered and render it.
[0074] In the above embodiment, by obtaining the preset special effect barrage layer from the target special effect barrage configuration information, the special effect barrage layers corresponding to each bitmap data are added to the preset special effect barrage layer to obtain the initial special effect barrage layer; the initial special effect barrage layer is applied to the root synthesis 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 effect barrage container to be rendered, so that the obtained special effect barrage container to be rendered can render the target special effect barrage on different devices to keep consistent.
[0075] In one embodiment, the bullet screen display method further includes the steps of:
[0076] Get the special effect barrage layer modification request, which carries the two-dimensional attribute information corresponding to the target special effect barrage layer; call the layer setting interface based on the special effect barrage layer modification request, and use the two-dimensional attribute information to update the target special effect barrage layer through the layer setting interface to obtain the updated special effect barrage layer.
[0077] Among them, the special effect barrage layer modification request is a request for modifying the properties of the special effect barrage layer. Two-dimensional attribute information refers to the two-dimensional attribute information of the special effect barrage layer. Each special effect barrage layer has corresponding two-dimensional attribute information, which may include coordinates (position), scaling (scale), rotation (rotate), size (size), etc. The layer setting interface is a pre-set interface for adjusting the attribute information of the special effect barrage layer. Updating the special effect barrage layer refers to the special effect barrage layer adjusted using the two-dimensional attribute information corresponding to the target special effect barrage layer.
[0078] Specifically, when the terminal detects a trigger operation to modify the special effects barrage layer, it obtains a special effects barrage layer modification request. The special effects barrage layer modification request is then parsed to obtain the two-dimensional attribute information corresponding to the carried target special effects barrage layer. The terminal then calls the layer setting interface in response to the special effects barrage layer modification request, and uses the two-dimensional attribute information to update the attribute information of the target special effects barrage layer through the layer setting interface to obtain an updated special effects barrage layer. For example, the size of the target special effects barrage layer can be adjusted according to the layer size of the two-dimensional attribute information, the display coordinates of the target special effects barrage layer can be adjusted according to the coordinates in the two-dimensional attribute information, and the target special effects barrage layer can be scaled according to 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 effect bullet screen layer to obtain the updated special effect bullet screen layer.
[0080] In the above embodiment, the target special effect barrage layer is updated by using two-dimensional attribute information to obtain an updated special effect barrage layer, and then the special effect barrage layer is updated to display the special effect barrage, which can improve the presentation and smoothness of the animation effect, and the target special effect barrage layer is adjusted by calling the layer setting interface, thereby improving the flexibility of the special effect barrage display.
[0081] In one embodiment, S206, performing special effect animation rendering based on the special effect bullet screen container to be rendered to obtain target special effect bullet screens corresponding to each native bullet screen respectively includes the following steps:
[0082] A rendering tree is generated based on the special effect 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 a special effect animation for the special effect bullet screen container to be rendered according to the target rendering tree, and a target special effect bullet screen corresponding to each native bullet screen is obtained.
[0083] The target rendering tree refers to the rendering tree composed of the special effects bullets in the special effects bullet container to be rendered. The rendering tree is composed of visible elements in the element display sequence. The target rendering tree can be used to draw the corresponding target special effects bullets in the correct order. The target shader refers to the shader corresponding to the target rendering tree. The shader is used to implement image rendering and is an editable program used to replace the fixed rendering pipeline.
[0084] Specifically, when the terminal renders the special effects bullet screen container to be rendered, it first generates a rendering tree according to the special effects bullet screen container to be rendered to obtain a target rendering tree, wherein the root synthesis layer in the special effects bullet screen container to be rendered can be used as a branch node of the target rendering tree, and then each target special effects bullet screen layer in the root synthesis layer is used as a leaf node of the target rendering tree, thereby obtaining the target rendering tree. The terminal then generates a target shader corresponding to the target rendering tree, wherein a pre-set shader template can be used to generate the target shader corresponding to the target rendering tree, that is, the special effects bullet screen related parameter information in the shader template is replaced with the parameter information of the special effects bullet screen in the target rendering tree. The target shader is then used to perform special effects animation rendering on the special effects bullet screen container to be rendered according to the target rendering tree to obtain the target special effects bullet screens corresponding to each native bullet screen.
[0085] In a specific embodiment, Figure 4 The figure shows a schematic diagram of the generated target rendering tree. Specifically, in the PAG rendering tree, PAGComposition (PAG composition layer) is used as a branch node of the rendering tree, and PAGLayer (PAG layer) is used as a leaf node of the rendering tree. The PAG Layer is used to describe a single animation effect element, such as text, pictures, video frames, etc., corresponding to the layer in AE. PAG Layer is a special effect bullet screen layer, in which various types of animation effects can be obtained by configuring and combining PAGLayer and PAGComposition. Among them, the root composition layer is used as the root node of the target rendering tree, and other composition layers are used as branch nodes of the target rendering tree. Each special effect bullet screen layer in the composition layer is used as a leaf node of the target rendering tree, thereby obtaining the target rendering tree, and then the target rendering tree is used to draw the screen to obtain the target special effect bullet screen corresponding to each native bullet screen.
[0086] In the above embodiment, a rendering tree is generated based on the special effect bullet chat container to be rendered, a target rendering tree is obtained, and a target shader corresponding to the target rendering tree is generated. Then, the target shader is used to render the special effect animation of the special effect bullet chat container to be rendered according to the target rendering tree, and the target special effect bullet chat corresponding to each native bullet chat is obtained, thereby improving the rendering efficiency.
[0087] In one embodiment, Figure 5 As shown, S202, that is, when the target video being played is in the case where the special effect barrage is to be displayed, obtaining the target special effect barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the special effect barrage is to be displayed, includes:
[0088] S502, playing the target video, and responding to the bullet screen start event for the target video, displaying the corresponding native bullet screen on the playback interface of the target video, generating a special effect bullet screen configuration information download request, and sending the special effect bullet screen configuration information download request to the video playback server;
[0089] S504, obtaining the target special effect barrage configuration information corresponding to the target video returned by the video playback server, and obtaining the current playback time. When the current playback time is consistent with the preset special effect barrage start time in the target special effect barrage configuration information, it is confirmed that the target video is in the state of the special effect barrage to be displayed;
[0090] S506, obtaining native bullet screen data of the target video when the special effect bullet screen is to be displayed.
[0091] Among them, the bullet screen start event refers to the event of starting to display the bullet screen corresponding to the target video being played, and the bullet screen start event can be triggered by a trigger operation. The special effect bullet screen configuration information download request refers to a request for downloading the special effect 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 watch various videos by logging in to the video playback platform. The current playback time refers to the time point at which the target video is currently being played. The preset special effect bullet screen start time refers to the pre-set time point for displaying the special effect bullet screen.
[0092] Specifically, the terminal detects a trigger operation for the target video playback, and responds to the trigger operation to play the target video. Then, during the playback of the target video, a bullet screen opening event for the target video is detected. In response to the bullet screen opening event for the target video, the native bullet screen of the target video can be obtained, and then the corresponding native bullet screen is displayed on the playback interface of the target video. At the same time, after responding to the bullet screen opening event for the target video, a special effect bullet screen configuration information download request is generated, and the special effect bullet screen configuration information download request is sent to the video playback server. The video playback server receives the special effect bullet screen configuration information download request sent by the terminal, finds the target special effect bullet screen configuration information corresponding to the target video from the database, and then returns the target special effect bullet screen configuration information corresponding to the target video to the terminal. The terminal obtains the target special effect bullet screen configuration information corresponding to the target video returned by the video playback server and saves it. Then, during the playback of the target video, the current playback time is obtained in real time, and the current playback time is compared with the preset special effect bullet screen opening time in the target special effect bullet screen configuration information. When the current playback time is consistent with the preset special effect bullet screen opening time in the target special effect bullet screen configuration information, it is confirmed that the target video is in the case of a special effect bullet screen to be displayed. At this time, the terminal can obtain the native bullet screen data of the target video in the case of the special effects bullet screen to be displayed from the video playback server. In one embodiment, the terminal determines that when the current playback time is within the preset special effects bullet screen opening time range in the target special effects bullet screen configuration information, it confirms that the target video is in the case of the special effects bullet screen to be displayed. In one embodiment, the target video may have different special effects bullet screen configuration information in 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, the special effects bullet screen configuration information to be used is determined according to the time range corresponding to the special effects bullet screen configuration information and the current playback time.
[0093] In a specific embodiment, Figure 6As shown, it is a flow chart of opening the special effect barrage. Specifically, when the terminal detects that the user opens the barrage for the video being played, such as detecting the trigger operation of opening the barrage. At this time, the terminal generates a pre-download request for the PAG special effect file corresponding to the target video, and then downloads and saves the PAG special effect file corresponding to the target video from the video playback server. Then the terminal compares the special effect barrage display time range corresponding to the PAG special effect file with the current playback time to determine whether the current playback time is within the special effect barrage display time range. When the current playback time is not within the special effect barrage display time range, only ordinary barrage needs to be displayed. If there is a special effect barrage that can be displayed, the display of the special effect barrage is turned off, that is, the special effect barrage is not displayed. When the current playback time is within the special effect barrage display time range, the special effect barrage configuration information is used to display the special effect barrage. In addition, the terminal continuously detects whether the time point at which the target video is currently played is within the special effect barrage display time range, that is, the video player continuously calls back the playback time until the target video ends.
[0094] In the above embodiment, by responding to the bullet screen opening event for the target video when playing the target video, the corresponding native bullet screen is displayed on the playback interface of the target video, and a special effect bullet screen configuration information download request is generated, and the special effect bullet screen configuration information download request is sent to the video playback server to obtain the target special effect bullet screen configuration information corresponding to the target video, so as to facilitate subsequent use. And when the current playback time is consistent with the preset special effect bullet screen opening time in the target special effect bullet screen configuration information, it is confirmed that the target video is in the case of the special effect bullet screen to be displayed, and the native bullet screen data of the target video in the case of the special effect bullet screen to be displayed is obtained, thereby ensuring the accuracy of the opening of the special effect bullet screen.
[0095] In one embodiment, the bullet screen display method further includes the steps of:
[0096] Get the currently playing video frame. When the currently playing video frame is consistent with the preset special effects barrage on video frame in the target special effects barrage configuration information, determine that the target video is in the state of special effects barrage to be displayed; or respond to the special effects barrage on event for the target video, determine that the target video is in the state of special effects barrage to be displayed.
[0097] Among them, the currently playing video frame refers to the video frame in the target video currently being played. The preset special effect barrage on video frame refers to the pre-set video frame for starting to display the special effect barrage. The special effect barrage on event refers to the event for starting to display the special effect barrage, which can be when the terminal detects a trigger operation for turning on the special effect barrage, and responds to the trigger operation to trigger the special effect barrage on event.
[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 effect bullet screen opening video frame. For example, the similarity between the currently playing video and the preset special effect bullet screen opening video frame can be calculated based on the image pixels of the video. When the similarity exceeds a preset threshold, it means that the currently playing video frame is consistent with the preset special effect bullet screen opening video frame. At this point, it is determined that the target video is in the state of the special effect bullet screen to be displayed.
[0099] In one embodiment, the terminal detects a trigger operation for turning on the special effect bullet screen, responds to the trigger operation to trigger a special effect bullet screen turn-on event, responds to the special effect bullet screen turn-on event for the target video, and determines that the target video is in a state where the special effect bullet screen is to be displayed. That is, the user can autonomously turn on the special effect bullet screen of the target video through the trigger operation.
[0100] In the above embodiment, the terminal determines whether the target video is in the state of special effect barrage to be displayed by detecting whether the currently played video frame is a preset special effect barrage turned on video frame or whether a special effect barrage turned on event is detected, thereby expanding the application scenarios of special effect barrage and improving the flexibility of special effect barrage display.
[0101] In one embodiment, the native barrage data includes at least one of a picture native barrage, a text native barrage, and a combined native barrage, and the target special effect barrage configuration information includes a special effect barrage type and a corresponding special effect barrage display parameter;
[0102] like Figure 7 As shown, S204, each native bullet screen in the native bullet screen data is converted into bitmap data to obtain each bitmap data, and a special effect bullet screen layer corresponding to each bitmap data is generated according to the target special effect bullet screen configuration information, including:
[0103] S702, convert the native barrage of the image into bitmap data to obtain image bitmap data, and generate image special effect barrage layers corresponding to the image bitmap data according to the image special effect barrage type and the corresponding image special effect barrage display parameters in the target special effect barrage configuration information.
[0104] Among them, the image native barrage refers to the native barrage in the form of an image, for example, the image native barrage can be an expression image barrage, and the expression image barrage can be an avatar barrage, an arrow barrage, various expression barrages, etc. The text native barrage refers to the native barrage in the form of text, for example, the text native barrage can be a native barrage in the form of English text, or a native barrage in the form of gradient text. The combined native barrage refers to the native barrage in the form of an image and a text, that is, a combined native barrage can include text and an image. For example, the combined native barrage can be a combination of a barrage view or a barrage layer. The special effect barrage type refers to the type of special effect barrage, and different animation effects correspond to different special effect barrage types. For example, the blur animation effect corresponds to the blur special effect barrage type, the font deformation animation effect corresponds to the deformation special effect barrage type, the concave and convex animation effect corresponds to the concave and convex special effect barrage type, and the basic animation effects such as zooming in and out correspond to the basic special effect barrage type. Different special effect barrage types have different special effect barrage display parameters. Different special effect barrage display parameters are used to achieve corresponding animation effects. For example, the special effect barrage display parameters of the deformation animation effect are used to achieve the corresponding deformation animation effect, so that the special effect barrage will show the deformation animation effect when displayed. Image bitmap data refers to the bitmap data obtained after the image native barrage is converted. Image special effect barrage type refers to the special effect barrage type corresponding to the image native barrage. Image special effect barrage display parameters refer to the special effect barrage display parameters corresponding to the image native barrage, and are the special effect barrage display parameters corresponding to the special effect barrage type to which the image native barrage belongs. Image special effect barrage layer refers to the special effect barrage layer corresponding to the image native barrage.
[0105] Specifically, the terminal determines all the picture native barrages from each native barrage. For example, the picture native barrage can be determined according to the format of the native barrage. For example, the barrage in the picture format is the picture native barrage. The picture format can refer to the format of storing pictures, including bmp, jpg, png and other picture formats. Then the picture native barrage is converted into bitmap data to obtain picture bitmap data. Then the terminal generates picture special effects barrage layers corresponding to the picture bitmap data according to the picture special effects barrage type and the corresponding picture special effects barrage display parameters in the target special effects barrage configuration information. For example, the picture bitmap data is deformed according to the deformation special effects barrage type and the corresponding special effects barrage display parameters in the target special effects barrage configuration information. The special effects barrage display parameters may include deformation parameters transform, special effects parameters effects and layer style parameters layerStyles, and then these parameters are used to transform the picture bitmap data to obtain a special effects barrage layer with a deformation animation effect.
[0106] S704, converting the text native bullet screen into bitmap data to obtain text bitmap data, and generating text special effect bullet screen layers corresponding to the text bitmap data according to the text special effect bullet screen type and the corresponding text special effect bullet screen display parameters in the target special effect bullet screen configuration information.
[0107] Among them, text bitmap data refers to the bitmap data obtained after the image native barrage is converted. Text special effect barrage type refers to the special effect barrage type corresponding to the text native barrage. Text special effect barrage display parameters refer to the special effect barrage display parameters corresponding to the text native barrage, which are the special effect barrage display parameters corresponding to the special effect barrage type to which the text native barrage belongs. Text special effect barrage layer refers to the special effect barrage layer corresponding to the text native barrage.
[0108] Specifically, the terminal determines all text native barrages from each native barrage. For example, the image native barrage can be determined according to the format of the native barrage. For example, the barrage in text format is the text native barrage, and the text format can be a txt text format. Then the text native barrage is converted into bitmap data to obtain text bitmap data, that is, the text native barrage is converted into bitmap data as a whole. Then, the text special effect barrage type and the corresponding text special effect barrage display parameters in the target special effect barrage configuration information are used to generate text special effect barrage layers corresponding to the text bitmap data, wherein the text special effect barrage display parameters may include layer style parameters, text animation effect parameters and conversion parameters. The text bitmap data is converted into the corresponding text with animation effects using the conversion parameters and the text animation effect parameters, and then the text special effect barrage layer corresponding to the text with the animation effect is obtained according to the layer style parameters.
[0109] S706, converting the combined native bullet screen into bitmap data to obtain combined bitmap data, and generating combined special effect bullet screen layers corresponding to the combined bitmap data according to the combined special effect bullet screen type and the corresponding combined special effect bullet screen display parameters in the target special effect bullet screen configuration information.
[0110] Among them, the combined bitmap data refers to the bitmap data obtained after the combined native barrage is converted. The combined special effect barrage type refers to the special effect barrage type corresponding to the combined native barrage. The combined special effect barrage display parameters refer to the special effect barrage display parameters corresponding to the combined native barrage, which are the special effect barrage display parameters corresponding to the special effect barrage type to which the combined native barrage belongs. The combined special effect barrage layer refers to the special effect barrage layer corresponding to the combined native barrage.
[0111] Specifically, the terminal determines all the picture native barrages from each native barrage. For example, the picture native barrage can be determined according to the format of the native barrage. For example, the barrage in picture format is the picture native barrage, and the barrage in text format is the text native barrage. The picture native barrage is then converted into bitmap data to obtain picture bitmap data. Then, according to the combined special effect barrage type and the corresponding combined special effect barrage display parameters in the target special effect barrage configuration information, a combined special effect barrage layer corresponding to the combined bitmap data is generated. The combined special effect barrage display parameters may include layer style parameters, text animation effect parameters, and conversion parameters. The combined native barrage is converted into an animation effect using the text animation effect parameters and the conversion parameters to obtain a combined barrage with animation effects, and then the combined special effect barrage layer is obtained according to the layer style parameters.
[0112] In one embodiment, native barrages within the same special effect barrage display time range can use the same animation effect to transform into special effect barrages. For example, all native barrages within the same special effect barrage display time range are transformed into blurred special effect barrages with blurred animation effects, or all native barrages within the same special effect barrage display time range are transformed into deformed special effect barrages with text deformation animation effects. In one embodiment, different native barrages within the same special effect barrage display time range can use different animation effects to transform into special effect barrages. For example, some native barrages can be transformed into blurred special effect barrages with blurred animation effects, and other native barrages can be transformed into deformed special effect barrages with deformation animation effects.
[0113] In a specific embodiment, Figure 8 The figure shows a schematic diagram of converting native bullet screen to special effect bullet screen layer. Specifically, various types of bullet screens in native bullet screens are obtained, which can be native bullet screens of view type, native bullet screens of layer type, and native bullet screens of view and combination type. For example, native bullet screens of view type can be bullet screen view, native bullet screens of layer type can be bullet screen layer, and native bullet screens of combination type can be bullet screens of asynchronous node, i.e. asynchronous node. Then, various types of native bullet screens are converted into bitmap data respectively, and then PAG image layers PAGImageLayer corresponding to each bitmap data are generated, so as to obtain special effect bullet screen layers.
[0114] In the above embodiment, by converting the image native barrage, text native barrage and combined native barrage into bitmap data, each bitmap data is obtained, and a special effect barrage layer corresponding to each bitmap data is generated according to the target special effect barrage configuration information, thereby improving the accuracy of the obtained special effect barrage layer.
[0115] In one embodiment, the special effect barrage display parameters are determined based on the video screen content of the target video when the special effect barrage is to be displayed. Among them, the association relationship between the video screen content and the special effect barrage display parameters is preset. For example, if the video screen content is a screen content showing a fire, the corresponding special effect barrage display parameters can be the special effect barrage display parameters corresponding to the deformation animation effect. Different video screen contents are set with corresponding special effect barrage display parameters. When it is necessary to display the special effect barrage corresponding to the video screen content, the native barrage is converted according to the special effect barrage display parameters associated with the video screen content to obtain the special effect barrage corresponding to the video screen content, and the corresponding special effect barrage is displayed when the video screen content is displayed.
[0116] In one embodiment, Fig. 9 As shown, the bullet screen display method further includes:
[0117] S902, when the target video being played is in the state where a special effect bullet screen is to be displayed, respond to a special effect start event for a currently sent bullet screen, and obtain current special effect bullet screen configuration information corresponding to the currently sent bullet screen.
[0118] Among them, the currently sent barrage refers to the currently sent barrage, that is, the barrage sent by the user at the current playback time to be displayed on the target video playback interface. The special effect start event refers to the event that triggers the conversion of the currently sent barrage to the special effect barrage, and the trigger event is triggered by a trigger operation. The current special effect barrage configuration information refers to the configuration information used when converting the currently sent barrage to the special effect barrage, and the current special effect barrage configuration information can be obtained according to the animation effect selected by the user.
[0119] Specifically, when the target video being played is in the case where the special effects barrage is to be displayed, that is, when the target video in the terminal is displaying the special effects barrage, the terminal detects the triggering operation of the user triggering the activation of the special effects barrage of the currently sent barrage through the target video. For example, the user can send barrage when the target video is playing, and can trigger the special effects activation event for the currently sent barrage by selecting the special effects barrage option when sending the barrage. At this time, the terminal responds to the special effects activation event for the currently sent barrage, and the terminal can obtain the current special effects barrage configuration information corresponding to the currently sent barrage according to the selected special effects barrage option. Different special effects barrage options can make the sent barrage have different animation effects, that is, different special effects barrages are obtained.
[0120] S904, converting the currently sent bullet screen into bitmap data to obtain current bitmap data, and generating a current special effect bullet screen layer corresponding to the current bitmap data according to the current special effect bullet screen configuration information.
[0121] The current bitmap data refers to the bitmap data corresponding to the currently sent bullet screen. The current special effect bullet screen layer refers to the special effect bullet screen layer corresponding to the currently sent bullet screen.
[0122] Specifically, while the terminal converts the bitmap data of the native barrage, it also converts the bitmap data of the currently sent barrage to obtain the current bitmap data, and converts the current bitmap data according to the special effect barrage display parameters in the current special effect barrage configuration information, thereby generating the current special effect barrage layer corresponding to the current bitmap data.
[0123] S906, apply the special effect barrage layer corresponding to each bitmap data and the current special effect barrage layer to the preset special effect barrage container, obtain the current special effect barrage container to be rendered, and perform special effect animation rendering based on the current special effect barrage container to be rendered, to obtain the target special effect barrage corresponding to each native barrage and the current special effect barrage corresponding to the currently sent barrage.
[0124] S908, displaying the target special effect barrage corresponding to each native barrage and the current special effect barrage corresponding to the currently sent barrage in the playback interface of the target video.
[0125] The current to-be-rendered special effect bullet screen container refers to the to-be-rendered special effect bullet screen container including the current special effect bullet screen layer. The current special effect bullet screen refers to the special effect bullet screen corresponding to the currently sent bullet screen.
[0126] Specifically, the terminal loads the special effect barrage layer and the current special effect barrage layer corresponding to each bitmap data into the preset special effect barrage container to obtain the current special effect barrage container to be rendered. Then, the special effect animation rendering is performed based on the current special effect barrage container to be rendered to obtain the target special effect barrage corresponding to each native barrage and the current special effect barrage corresponding to the currently sent barrage. The target special effect barrage corresponding to each native barrage and the current special effect barrage corresponding to the currently sent barrage are displayed in the playback interface of the target video.
[0127] In the above embodiment, when the target video being played is in the special effects barrage to be displayed, the special effects start event for the currently sent barrage is responded to, and the current special effects barrage configuration information corresponding to the currently sent barrage is obtained. The currently sent barrage is converted into bitmap data to obtain the current bitmap data, and the current special effects barrage layer corresponding to the current bitmap data is generated according to the current special effects barrage configuration information. Then, 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, so that the current special effects barrage layer and the special effects barrage layer corresponding to each bitmap data are rendered and displayed in the same preset special effects barrage container, avoiding the problem of inconsistency when the special effects barrage corresponding to the sent barrage is displayed in different devices, thereby improving the consistency of the special effects barrage corresponding to the sent barrage when displayed in different devices.
[0128] In one embodiment, Fig.10 As shown, the bullet screen display method further includes:
[0129] S1002, determining target native barrages and non-target native barrages from each native barrage in the native barrage data.
[0130] S1004, converting the target native bullet screen into bitmap data to obtain various bitmap data, and generating a special effect bullet screen layer corresponding to the target native bullet screen according to the target special effect bullet screen configuration information.
[0131] Among them, the target native barrage refers to the native barrage to be converted into special effect barrage. The non-target native barrage refers to the barrage that does not need to be converted into special effect barrage.
[0132] Specifically, the target native barrage and non-target native barrage are determined from each native barrage in the native barrage data, wherein the terminal divides each native barrage into two parts according to the display position of each native barrage, one part is the target native barrage, and the remaining part is the non-target native barrage. For example, the native barrage whose display position is in the upper half of the playback screen is used as the target native barrage, and the native barrage whose display position is in the lower half of the playback screen is used as the target meta-barrage. The terminal can also divide each native barrage into target native barrage and non-target native barrage according to a pre-set division rule, for example, the native barrage whose sending time is within the target time range is used as the target native barrage, and the native barrage whose sending time is not within the target time range is used as the non-target native barrage. Then the terminal converts the target native barrage into bitmap data, obtains each bitmap data, and generates a special effect barrage layer corresponding to the target native barrage according to the target special effect barrage configuration information.
[0133] S1006, applying the special effect bullet screen layer corresponding to the target native bullet screen to a preset special effect bullet screen container to obtain a special effect bullet screen container to be rendered, and applying the non-target native bullet screen to a preset native container to obtain a native container to be rendered.
[0134] The preset native container refers to a pre-set container for carrying native bullet comments. The native container to be rendered refers to a container including non-target native bullet comments.
[0135] Specifically, the terminal loads the special effect bullet screen layers corresponding to all target native bullet screens into a preset special effect bullet screen container to obtain a special effect bullet screen container to be rendered, and then loads all non-target native bullet screens into a preset native container to obtain a native container to be rendered.
[0136] S1008, merging the to-be-rendered special effect bullet screen container and the to-be-rendered native screen container to obtain a target to-be-rendered container, and performing bullet screen rendering based on the target to-be-rendered container to obtain a target special effect bullet screen and a non-target native bullet screen corresponding to the target native bullet screen.
[0137] S1010, displaying the target special effect barrage and non-target native barrage corresponding to the target native barrage in the playback interface of the target video.
[0138] Specifically, the terminal merges the special effect bullet screen container to be rendered and the native container to be rendered to obtain the target container to be rendered, and performs bullet screen rendering based on the target container to be rendered to obtain the target special effect bullet screen and non-target native bullet screen corresponding to the target native bullet screen. That is, the terminal merges the special effect bullet screen container to be rendered and the native container to be rendered and renders them together, so that the rendered bullet screen is in the same video screen. Then, the target special effect bullet screen and non-target native bullet screen corresponding to the target native bullet screen are displayed in the playback interface of the target video.
[0139] In the above embodiment, the target native barrage and non-target native barrage are determined from each native barrage in the native barrage data, and the target native barrage is converted into the corresponding special effect barrage, while the non-target native barrage remains unchanged, and finally the target special effect barrage and non-target native barrage corresponding to the target native barrage are displayed in the playback interface of the target video, that is, part of the native barrage can be converted into special effect barrage for display, thereby improving the flexibility of the special effect barrage display.
[0140] In one embodiment, the bullet screen display method further includes:
[0141] When the target video being played is in the state where the native barrage is to be displayed, the native barrage data is obtained, and the native barrage is rendered based on the native barrage data to obtain the native barrage; and the native barrage is displayed in the playback interface of the target video.
[0142] The target video is in the state of displaying native barrage, for example, after the user turns on the barrage, the terminal detects the triggering operation of turning on the barrage, and then starts to display the native barrage in the target video. At this time, the target video is in the state of displaying the native barrage.
[0143] Specifically, the terminal can detect whether the target video being played is in a state where the native barrage is to be displayed. For example, when the terminal detects a trigger operation to turn on the barrage for the target video being played, it is confirmed that the target video being played is in a state where the native barrage is to be displayed. Or when the terminal detects that the target video being played is in a state where the barrage is turned on, it is confirmed that the target video being played is in a state where the native barrage is to be displayed. When the target video being played is in a state where the native barrage is to be displayed, the terminal can use a pre-set barrage component for displaying barrage to obtain the native barrage data, and use the barrage component to render the native barrage data to obtain the native barrage. The native barrage is then displayed in the playback interface of the target video.
[0144] In one embodiment, when the target video being played is in the state of the native barrage to be displayed, the current playback time is obtained. When the current playback time is within the time range of the pre-display of the special effect barrage, it indicates that the target video is in the state of the special effect barrage to be displayed.
[0145] In one embodiment, when the target video being played is not in the state where the special effect bullet screen is to be displayed, the terminal obtains the native bullet screen data and renders and displays the native bullet screen.
[0146] In a specific embodiment, when the target video displays native barrage, the native barrage can be displayed through the barrage library component. The barrage library component is driven by a timing message, and the barrage data must be tracked, measured, and rendered for each frame. That is, when the target video is playing a video frame, the barrage library component is used to track distribute, measure, and render the barrage data corresponding to the video frame, and then the native barrage corresponding to the video frame is displayed on the playback screen while the video frame is played.
[0147] In the above embodiment, when the target video being played is in the situation where the native barrage is to be displayed, the native barrage data is obtained, and the native barrage is rendered based on the native barrage data to obtain the native barrage. Then, the native barrage is displayed in the playback interface of the target video, thereby ensuring that the target video can display the native barrage normally.
[0148] In one embodiment, before S202, when the target video being played is in the case where the special effect barrage is to be displayed, before obtaining the target special effect barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the special effect barrage is to be displayed, the step of:
[0149] Display the creation page of the special effect bullet screen configuration information, respond to the creation completion operation on the creation page, obtain the target special effect bullet screen configuration information, and display the video association page. In response to the association completion operation on the video association page for the target video, associate the target special effect bullet screen configuration information with the target video and save it.
[0150] Among them, the creation page of special effect barrage configuration information is a page for creating special effect barrage configuration information. Through this page, the noun, style type and specific animation effect resource file of special effect barrage can be created. The creation completion operation refers to the trigger operation of completing the creation of special effect barrage configuration information. The video association page refers to the page for associating special effect barrage configuration information with the target video, and the association completion operation refers to the trigger operation of completing the association of special effect barrage configuration information with the target video.
[0151] Specifically, when the terminal detects a creation operation of special effect barrage configuration information, it displays a creation page of the special effect barrage configuration information in response to the creation operation, and then the user can create the special effect barrage configuration information through the creation page. Then, when a creation completion operation is detected, the creation completion operation for the creation page is responded to, and the target special effect barrage configuration information is obtained from the creation page. Then, when the terminal detects a trigger operation of video association, it displays a video association page in response to the trigger operation, and then the user can associate the special effect barrage configuration information with the video in the video association page. Then, when the terminal detects an association completion operation, it responds to the association completion operation for the target video in the video association page, and saves the special effect barrage configuration information in the video association page in association with the corresponding video.
[0152] In a specific embodiment, Fig.11As shown, it is a schematic diagram of the creation page for special effect barrage configuration information, wherein the creation page is used to input the special effect name of the special effect barrage, and then select the PAG style type, and select the corresponding pre-set PAG special effect file by selecting the file upload button, and the uploaded PAG special effect file can be selected from the local file, or the resource link of the uploaded PAG special effect file can be selected. The PAG special effect file is a special dynamic effect file format designed for high-performance rendering scenarios. It can store dynamic effect elements such as vector graphics, text, bitmaps, and sequence frames with an extremely high compression ratio, and make full use of the hardware acceleration capabilities of each platform to quickly decode and render at high speed to screens of various sizes. The PAG special effect file is a file with a pure binary data structure. Using PAG special effect files to store animation effect content can save storage resources. The PAG special effect file can be a material file that exports the animation effect content produced in AE (Adobe After Effects) through PAG. Then the special effect barrage configuration information can be associated with the video in the video association page. As shown Fig.12 As shown, it is a schematic diagram of the video association page. Specifically: enter the name of the special effect barrage configuration information to be associated through the video association page, and then set the associated video playback time range, that is, the special effect barrage that meets the associated special effect barrage configuration information is displayed in the target video within the time range. For example, the time range is set to start at 1 hour, 1 minute and 30 seconds and end at 1 hour, 3 minutes and 20 seconds. You can also choose whether to change the color of the special effect barrage. Then the user clicks the Save button, and the terminal detects that the association operation for the target video is completed, and the special effect barrage configuration information with the same special effect name in the video association page is associated and saved with the corresponding video playback time range.
[0153] In the above embodiment, the target special effect barrage configuration information is obtained by creating a page, and the target special effect 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 target special effect bullet screen configuration information corresponding to the target video and native bullet screen data of the target video when the special effect bullet screen is to be displayed, includes the steps of:
[0155] When the barrage rendering corresponding to the forward video frame of the target video is completed, a barrage refresh message of the forward video frame corresponding to the current video frame is generated, and a special effect 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 effect barrage refresh message, the preset special effect barrage component is called to obtain the target special effect barrage configuration information corresponding to the target video.
[0156] Among them, the forward video frame refers to the previous video frame corresponding to the current video frame. The completion of barrage rendering means that the barrage rendering to be displayed corresponding to the forward video frame is completed. The barrage to be displayed can be a native barrage, a special effect barrage, or a combination of native barrage and special effect barrage. The current video frame refers to the video frame in the target video where the barrage is currently displayed. The barrage refresh message refers to a trigger message for displaying the barrage of the next video frame, that is, a trigger message for track distribution, barrage measurement and barrage rendering of the barrage data of the next video frame. The special effect barrage refresh message refers to a trigger message for displaying the special effect barrage of the next video frame. The preset barrage library component refers to a pre-set component for displaying barrage. The preset special effect barrage component refers to a pre-set component for displaying special effect barrage. For example, the preset special effect barrage component can be a PAG component created by the PAG animation framework.
[0157] Specifically, when the target video being played is in the case of a special effect bullet screen to be displayed, and the terminal detects that the bullet screen rendering corresponding to the forward video frame of the target video is completed, a bullet screen refresh message corresponding to the current video frame of the forward video frame is generated, and a special effect bullet screen refresh message corresponding to the current video frame is generated. Then, the bullet screen refresh message of the current video frame is used to call the preset bullet screen library component to obtain the native bullet screen data corresponding to the current video frame, and the special effect bullet screen refresh message is used to call the preset special effect bullet screen component to obtain the target special effect bullet screen configuration information corresponding to the target video.
[0158] In a specific embodiment, the bullet screen library component is driven by a timing message, and each frame needs to perform track distribution, measurement, and rendering of the bullet screen data. Connecting the PAG animation framework to the bullet screen library component will cause the refresh frequency of the PAG animation framework and the bullet screen library component to be out of sync, because there is a problem that the rendering of the bullet screen library component is time-consuming and unstable, such as Fig.13 As shown, it is a schematic diagram of the normal refresh of the barrage library component, wherein the timing message of the barrage library component is usually triggered at 17ms (milliseconds). However, when rendering the barrage for the first video frame, the time consumed increases by 8ms, resulting in a delay of 8ms in the refresh message of the barrage library component of the second video frame, while the PAG animation framework will still refresh according to the trigger time of the timing message 17ms, that is, the real-time refresh of the PAG is still the coordinate point of the first video frame, which will cause a series of performance problems such as jitter and slow displacement speed of the special effect barrage in the process of the video frame moving from right to left. In this application, Fig.14As shown in the figure, the refresh process diagram when the bullet screen rendering is abnormal, that is, after detecting that the bullet screen rendering of the video frame is completed, the refresh message of the bullet screen library component and the refresh information of the PAG animation framework are generated, that is, by overwriting PAGView, the refresh call timing is controlled to be refreshed after the danm rendering of the video frame is completed. Then the subsequent track distribution, measurement and rendering drawing are carried out to keep the refresh rhythm of the PAG animation framework consistent with the rendering rhythm of the bullet screen library component, avoiding the situation where the displacement coordinates are not updated in the next refresh, and improving the fluency of the bullet screen.
[0159] In the above embodiment, when the barrage rendering 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 effect 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 effect barrage refresh message, the preset special effect barrage component is called to obtain the target special effect barrage configuration information corresponding to the target video. That is, when it is detected that the barrage rendering corresponding to the forward video frame is completed, the barrage refresh message of the current video frame and the corresponding special effect barrage refresh message are generated to avoid the problem of smoothness of the barrage display caused by the refresh of the special effect barrage when the rendering of the barrage library component is not yet completed, thereby improving the smoothness of the special effect barrage display.
[0160] In a specific embodiment, Fig.15 The figure is a flow chart of the bullet screen display method, which is executed by a computer device and specifically includes the following steps:
[0161] S1502, respond to the barrage start event for the target video being played, display the corresponding native barrage on the playback interface of the target video, generate a special effect barrage configuration information download request, and send the special effect barrage configuration information download request to the video playback server; obtain the target special effect barrage configuration information corresponding to the target video returned by the video playback server and save it.
[0162] S1504, obtain the current playback time in real time. When the current playback time is consistent with the preset special effect barrage start time corresponding to the target special effect barrage configuration information, obtain the native barrage data of the target video in the case of the special effect barrage to be displayed and obtain the target special effect barrage configuration information corresponding to the target video.
[0163] S1506, converting each native barrage in the native barrage data into bitmap data to obtain each bitmap data, and generating a special effect barrage layer corresponding to each bitmap data according to the target special effect barrage configuration information.
[0164] S1508, obtaining a preset special effect barrage layer from the target special effect barrage configuration information, adding the special effect barrage layers corresponding to each bitmap data to the preset special effect barrage layer, and obtaining an initial special effect barrage layer.
[0165] S1510, applying the initial special effect bullet screen layer to the root synthesis layer of the preset view container to obtain a target view container, and merging the target view container with the video container of the target video to obtain a special effect bullet screen container to be rendered.
[0166] S1512, generate a rendering tree based on the special effect bullet screen container to be rendered, obtain a target rendering tree, and generate a target shader corresponding to the target rendering tree.
[0167] S1514, using the target shader to perform special effect animation rendering on the special effect bullet screen container to be rendered according to the target rendering tree, to obtain the target special effect bullet screen corresponding to each native bullet screen, and to display the target special effect bullet screen corresponding to each native bullet screen in the playback interface of the target video.
[0168] In the above embodiment, by turning on the barrage display of the target video, the target special effect barrage configuration information corresponding to the target video is obtained and saved, and then when the current playback time is consistent with the preset special effect barrage opening time corresponding to the target special effect barrage configuration information, each native barrage in the native barrage data is converted into bitmap data to obtain each bitmap data, and a special effect barrage layer corresponding to each bitmap data is generated according to the target special effect barrage configuration information, and the initial special effect barrage layer is applied to the root synthesis 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 effect barrage container to be rendered, and finally the special effect barrage container to be rendered is rendered, so that the target special effect barrage corresponding to each native barrage is displayed in the playback interface of the target video, thereby improving the consistency of the special effect barrage display.
[0169] In a specific embodiment, the bullet screen display method is applied to a video playback platform, specifically: Fig.16As shown, it is a flow chart of special effect bullet screen rendering, in which the user logs in to the video playback platform through the terminal to watch the video. When watching the video, the user can display the bullet screen corresponding to the video by turning on the bullet screen button. At this time, when the terminal detects the operation of turning on the bullet screen, it sends a download request for the special effect bullet screen configuration information to the server of the video playback platform, and obtains the special effect bullet screen configuration information of the video being watched returned by the server. The special effect bullet screen configuration information can be a PAG special effect file corresponding to the displacement special effect, and the special effect bullet screen configuration information corresponding to the displacement special effect can be a PAG special effect file established in AE using a displacement map, that is, creating a post-map in AE, and then exporting PAGFile from the AE plug-in of PAG, that is, a PAG special effect file. Then obtain the video playback time in real time, and when the video playback time meets the pre-set time range for the special effect bullet screen display, start rendering the animation effect of the special effect bullet screen. That is, the terminal parses the PAG special effects file, obtains the PAG replacement animation effect type and PAG replacement parameters, and then uses the PAG replacement animation effect type and PAG replacement parameters to convert each native barrage into a replacement special effect barrage layer, namely PAGLayer. Each replacement special effect barrage layer is then loaded into a preset special effect barrage container to obtain a special effect barrage container to be rendered, and then the barrage library component and the PAG component are driven to refresh through the vertical synchronization signal. In addition, the terminal generates a shader for the special effect barrage container to be rendered, and uses the shader to render animation effects to obtain the replacement special effect barrage corresponding to each native barrage. The replacement special effect barrage corresponding to each native barrage is then displayed in the playback interface of the target video, so that the target video can display the special effect barrage and ensure the consistency of display on multiple terminals. The terminal can also display deformation special effect barrage in the playback interface of the target video, such as Fig.17 As shown in the figure, it is a schematic diagram of each replacement special effect bullet screen, the replacement can be a special effect bullet screen that replaces text with deformed text, such as 1706 shown in the figure, or a special effect bullet screen after other content is deformed, for example, a special effect bullet screen after a text box is deformed, as shown in 1702 and 1704. The terminal can also display a blurred special effect bullet screen on the playback interface of the target video, such as Fig.18 As shown, it is a schematic diagram of each blurred special effect barrage, and each blurred special effect barrage is completely blurred. The black box shown in the figure is a completely blurred barrage, and the blurriness of the special effect barrage can be controlled by adjusting the blurriness parameter in the special effect barrage configuration information.
[0170] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0171] Based on the same inventive concept, the embodiment of the present application also provides a bullet screen display device for implementing the bullet screen display method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the bullet screen display device provided below can refer to the limitations of the bullet screen display method above, and will not be repeated here.
[0172] In one embodiment, Fig.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 effect barrage configuration information corresponding to the target video and the native barrage data of the target video when the target video being played is in the special effect barrage to be displayed;
[0174] The layer generation module 1904 is used to convert each native bullet commentary in the native bullet commentary data into bitmap data to obtain each bitmap data, and generate a special effect bullet commentary layer corresponding to each bitmap data according to the target special effect bullet commentary configuration information;
[0175] The rendering module 1906 is used to apply the special effect bullet screen layers corresponding to each bitmap data to the preset special effect bullet screen container to obtain the special effect bullet screen container to be rendered, and perform special effect animation rendering based on the special effect bullet screen container to be rendered to obtain the target special effect bullet screen corresponding to each native bullet screen;
[0176] The display module 1908 is used to display the target special effect bullet comments corresponding to each native bullet comment in the playback interface of the target video.
[0177] In one embodiment, the rendering module 1906 is also used to obtain a preset special effect barrage layer from the target special effect barrage configuration information, add the special effect barrage layer corresponding to each bitmap data to the preset special effect barrage layer, and obtain the initial special effect barrage layer; apply the initial special effect barrage layer to the root synthesis 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 effect 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 a special effect barrage layer modification request, which carries the two-dimensional attribute information corresponding to the target special effect barrage layer; based on the special effect barrage layer modification request, the layer setting interface is called, and the target special effect barrage layer is updated using the two-dimensional attribute information through the layer setting interface to obtain the updated special effect barrage layer.
[0180] In one embodiment, the rendering module 1906 is also used to generate a rendering tree based on the special effect 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 perform special effect animation rendering on the special effect barrage container to be rendered according to the target rendering tree, and obtain the target special effect barrage corresponding to each native barrage.
[0181] In one embodiment, the data acquisition module 1902 is also used to play the target video, and respond to the barrage start event for the target video, display the corresponding native barrage on the playback interface of the target video, and generate a special effect barrage configuration information download request, and send the special effect barrage configuration information download request to the video playback server; obtain the target special effect 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 effect barrage start time in the target special effect barrage configuration information, it is confirmed that the target video is in the state of special effect barrage to be displayed; obtain the native barrage data of the target video in the state of special effect barrage to be displayed.
[0182] In one embodiment, the bullet screen display device 1900 further includes:
[0183] A video frame detection module is used to obtain a currently playing video frame, and when the currently playing video frame is consistent with a preset special effect barrage start-up video frame in the target special effect barrage configuration information, it is determined that the target video is in a state where a special effect barrage is to be displayed; or
[0184] The opening module is used to respond to the special effect barrage opening event for the target video and determine that the target video is in a state where the special effect barrage is to be displayed.
[0185] In one embodiment, the native barrage data includes at least one of a picture native barrage, a text native barrage, and a combined native barrage, and the target special effect barrage configuration information includes a special effect barrage type and a corresponding special effect barrage display parameter;
[0186] The layer generation module 1904 is also used to convert the native barrage of images into bitmap data to obtain image bitmap data, and generate image special effects barrage layers corresponding to the image bitmap data according to the image special effects barrage type and the corresponding image special effects barrage display parameters in the target special effects barrage configuration information; convert the native text barrage into bitmap data to obtain text bitmap data, and generate text special effects barrage layers corresponding to the text bitmap data according to the text special effects barrage type and the corresponding text special effects barrage display parameters in the target special effects barrage configuration information; convert the combined native barrage into bitmap data to obtain combined bitmap data, and generate combined special effects barrage layers corresponding to the combined bitmap data according to the combined special effects barrage type and the corresponding combined special effects barrage display parameters in the target special effects barrage configuration information.
[0187] In one embodiment, the special effect bullet screen display parameters are determined based on the video screen content of the target video when the special effect bullet screen is to be displayed.
[0188] In one embodiment, the bullet screen display device 1900 further includes:
[0189] The currently sent barrage display module is used to respond to the special effect start event for the currently sent barrage when the target video being played is in the special effect barrage to be displayed, and obtain the current special effect barrage configuration information corresponding to the currently sent barrage; convert the currently sent barrage into bitmap data to obtain the current bitmap data, and generate the current special effect barrage layer corresponding to the current bitmap data according to the current special effect barrage configuration information; apply the special effect barrage layer corresponding to each bitmap data and the current special effect barrage layer to the preset special effect barrage container to obtain the current special effect barrage container to be rendered, and perform special effect animation rendering based on the current special effect barrage container to be rendered to obtain the target special effect barrage corresponding to each native barrage and the current special effect barrage corresponding to the currently sent barrage; display the target special effect barrage corresponding to each native barrage and the current special effect barrage corresponding to the currently sent barrage in the playback interface of the target video.
[0190] In one embodiment, the bullet screen display device 1900 further includes:
[0191] The target native barrage display module is used to determine the target native barrage and non-target native barrage from each native barrage in the native barrage data; convert the target native barrage into bitmap data to obtain each bitmap data, and generate a special effect barrage layer corresponding to the target native barrage according to the target special effect barrage configuration information; apply the special effect barrage layer corresponding to the target native barrage to the preset special effect barrage container to obtain the special effect 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; merge the special effect barrage container to be rendered and the native container to be rendered to obtain the target container to be rendered, and render the barrage based on the target container to be rendered to obtain the target special effect barrage and non-target native barrage corresponding to the target native barrage; display the target special effect barrage and non-target native barrage corresponding to the target native barrage in the playback interface of the target video.
[0192] In one embodiment, the bullet screen display device 1900 further includes:
[0193] The native barrage display module is used to obtain the native barrage data when the target video being played is in the case where the native barrage is to be displayed, and render based on the native barrage data to obtain the native barrage;
[0194] Display native bullet comments in the playback interface of the target video.
[0195] In one embodiment, the bullet screen display device 1900 further includes:
[0196] The configuration module is used to display the creation page of the special effect barrage configuration information, respond to the creation completion operation on the creation page, obtain the target special effect barrage configuration information, and display the video association page; respond to the association completion operation on the target video in the video association page, and associate the target special effect barrage configuration information with the target video and save it.
[0197] In one embodiment, the data acquisition module 1902 is also used to generate a barrage refresh message for the current video frame corresponding to the forward video frame when the barrage rendering corresponding to the forward video frame of the target video is completed, and to generate a special effect barrage refresh message corresponding to the current video frame; based on the barrage refresh message of the current video frame, call the preset barrage library component to obtain the native barrage data corresponding to the current video frame, and based on the special effect barrage refresh message, call the preset special effect barrage component to obtain the target special effect barrage configuration information corresponding to the target video.
[0198] Each module in the above-mentioned bullet screen display device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0199] In one embodiment, a computer device is provided. The computer device may be a terminal or a server. In this embodiment, the computer device is described as a terminal. The internal structure diagram thereof may be as follows: Fig. 20 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless method can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a bullet screen display method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0200] Those skilled in the art will understand that Fig. 20 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0201] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0202] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0203] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[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, stored data, displayed data, 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 relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0205] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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), magnetoresistive 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0206] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A bullet screen display method, characterized in that: The method comprises: When the target video being played is in the case where the special effects barrage is to be displayed, obtaining the target special effects barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the special effects barrage is to be displayed; Convert each native bullet screen in the native bullet screen data into bitmap data to obtain each bitmap data, and generate a special effect bullet screen layer corresponding to each bitmap data according to the target special effect bullet screen configuration information; Applying the special effect bullet screen layers corresponding to the respective bitmap data to a preset special effect bullet screen container to obtain a special effect bullet screen container to be rendered, and performing special effect animation rendering based on the special effect bullet screen container to be rendered to obtain target special effect bullet screens corresponding to the respective native bullet screens; The target special effect barrage corresponding to each of the native barrages is 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 effect bullet screen layers corresponding to the respective bitmap data to a preset special effect bullet screen container to obtain a special effect bullet screen container to be rendered includes: Acquire a preset special effect barrage layer from the target special effect barrage configuration information, and add the special effect barrage layers corresponding to each bitmap data to the preset special effect barrage layer to obtain an initial special effect barrage layer; The initial special effect bullet screen layer is applied to the root synthesis 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 the special effect bullet screen container to be rendered.
3. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: Obtain a special effect bullet screen layer modification request, where the special effect bullet screen layer modification request carries two-dimensional attribute information corresponding to a target special effect bullet screen layer; A layer setting interface is called based on the special effect bullet screen layer modification request, and the target special effect bullet screen layer is updated using the two-dimensional attribute information through the layer setting interface to obtain an updated special effect bullet screen layer.
4. The method according to claim 1, characterized in that: The performing special effect animation rendering based on the special effect bullet screen container to be rendered to obtain target special effect bullet screens corresponding to the respective native bullet screens includes: Generate a rendering tree based on the special effect bullet screen container to be rendered, obtain a target rendering tree, and generate a target shader corresponding to the target rendering tree; The target shader is used to perform special effect animation rendering on the special effect bullet screen container to be rendered according to the target rendering tree to obtain the target special effect bullet screens corresponding to each of the native bullet screens.
5. The method according to claim 1, characterized in that When the target video being played is in a state where the special effect barrage is to be displayed, obtaining the target special effect barrage configuration information corresponding to the target video and the native barrage data of the target video in a state where the special effect barrage is to be displayed, including: Play the target video, respond to the bullet screen start event for the target video, display the corresponding native bullet screen on the playback interface of the target video, generate a special effect bullet screen configuration information download request, and send the special effect bullet screen configuration information download request to the video playback server; Obtain the target special effect 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 effect barrage start time in the target special effect barrage configuration information, confirm that the target video is in the state of the special effect barrage to be displayed; The native bullet screen data of the target video is obtained when the special effect bullet screen is to be displayed.
6. The method according to claim 5, characterized in that The method further comprises: Obtaining a currently playing video frame, and when the currently playing video frame is consistent with a preset special effect barrage start-up video frame in the target special effect barrage configuration information, determining that the target video is in a state where a special effect barrage is to be displayed; or In response to a special effect bullet screen start event for the target video, it is determined that the target video is in a state where a special effect bullet screen is to be displayed.
7. The method according to claim 1, characterized in that The native barrage data includes at least one of picture native barrage, text native barrage and combined native barrage, and the target special effect barrage configuration information includes a special effect barrage type and corresponding special effect barrage display parameters; The step of converting each native bullet screen in the native bullet screen data into bitmap data to obtain each bitmap data, and generating a special effect bullet screen layer corresponding to each bitmap data according to the target special effect bullet screen configuration information, comprises: Convert the native bullet screen of the image into bitmap data to obtain image bitmap data, and generate image special effect bullet screen layers corresponding to the image bitmap data according to the image special effect bullet screen type and the corresponding image special effect bullet screen display parameters in the target special effect bullet screen configuration information; Convert the text native bullet screen into bitmap data to obtain text bitmap data, and generate text special effect bullet screen layers corresponding to the text bitmap data according to the text special effect bullet screen type and the corresponding text special effect bullet screen display parameters in the target special effect bullet screen configuration information; The combined native barrage is converted into bitmap data to obtain combined bitmap data, and combined special effect barrage layers corresponding to the combined bitmap data are generated according to the combined special effect barrage type and the corresponding combined special effect barrage display parameters in the target special effect barrage configuration information.
8. The method according to claim 7, characterized in that The special effect barrage display parameters are determined based on the video screen content of the target video when the special effect barrage is to be displayed.
9. The method according to claim 1, characterized in that: The method further comprises: When the target video being played is in a state where a special effect barrage is to be displayed, respond to a special effect start event for a currently sent barrage, and obtain current special effect barrage configuration information corresponding to the currently sent barrage; Convert the currently sent bullet screen into bitmap data to obtain current bitmap data, and generate a current special effect bullet screen layer corresponding to the current bitmap data according to the current special effect bullet screen configuration information; Apply the special effect barrage layer corresponding to each bitmap data and the current special effect barrage layer to a preset special effect barrage container to obtain a current special effect barrage container to be rendered, and perform special effect animation rendering based on the current special effect barrage container to be rendered to obtain the target special effect barrage corresponding to each native barrage and the current special effect barrage corresponding to the currently sent barrage; The target special effect barrage corresponding to each of the native barrages and the current special effect barrage corresponding to the currently sent barrage are displayed in the playback interface of the target video.
10. The method according to claim 1, characterized in that The method further comprises: Determine a target native barrage and a non-target native barrage from each native barrage in the native barrage data; Convert the target native bullet screen into bitmap data to obtain various bitmap data, and generate a special effect bullet screen layer corresponding to the target native bullet screen according to the target special effect bullet screen configuration information; Apply the special effect bullet screen layer corresponding to the target native bullet screen to a preset special effect bullet screen container to obtain a special effect bullet screen container to be rendered, and apply the non-target native bullet screen to a preset native container to obtain a native container to be rendered; Merge the to-be-rendered special effect bullet screen container and the to-be-rendered native container to obtain a target to-be-rendered container, and perform bullet screen rendering based on the target to-be-rendered container to obtain a target special effect bullet screen and the non-target native bullet screen corresponding to the target native bullet screen; The target special effect barrage corresponding to the target native barrage and the non-target native barrage are displayed in the playback interface of the target video.
11. The method according to claim 1, characterized in that The method further comprises: When the target video being played is in the case where the native barrage is to be displayed, the native barrage data is obtained, and the native barrage data is rendered to obtain the native barrage; The native barrage is displayed in the playback interface of the target video.
12. The method according to claim 1, characterized in that In the case where the target video being played is in the special effect barrage to be displayed, before obtaining the target special effect barrage configuration information corresponding to the target video and the native barrage data of the target video in the case where the special effect barrage is to be displayed, the method further includes: Displaying a creation page of special effect barrage configuration information, responding to a creation completion operation on the creation page, obtaining target special effect barrage configuration information, and displaying a video-related page; In response to the association completion operation for the target video in the video association page, the target special effect barrage configuration information is associated with the target video and saved.
13. The method according to claim 1, characterized in that The obtaining of target special effect bullet screen configuration information corresponding to the target video and native bullet screen data of the target video when the special effect bullet screen is to be displayed includes: When the bullet screen rendering corresponding to the forward video frame of the target video is completed, a bullet screen refresh message corresponding to the current video frame of the forward video frame is generated, and a special effect bullet screen 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 effect barrage refresh message, the preset special effect barrage component is called to obtain the target special effect barrage configuration information corresponding to the target video.
14. A bullet screen display device, characterized in that: The device comprises: A data acquisition module, for acquiring, when a target video being played is in a state where a special effect barrage is to be displayed, target special effect barrage configuration information corresponding to the target video and native barrage data when the target video is in a state where a special effect barrage is to be displayed; A layer generation module, used for converting each native bullet screen in the native bullet screen data into bitmap data to obtain each bitmap data, and generating a special effect bullet screen layer corresponding to each bitmap data according to the target special effect bullet screen configuration information; A rendering module, used to apply the special effect bullet screen layers corresponding to the respective bitmap data to a preset special effect bullet screen container to obtain a special effect bullet screen container to be rendered, and perform special effect animation rendering based on the special effect bullet screen container to be rendered to obtain a target special effect bullet screen corresponding to each of the native bullet screens; A display module is used to display the target special effect barrages corresponding to each of the native barrages in the playback interface of the target video.
15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
Citation Information
Patent Citations
Live video bullet screen playing method and system
CN106658204A
Bullet screen rendering method and device, computer readable storage medium and computer equipment
CN111083551A
Bullet screen rendering method based on cascading style sheet and related equipment
CN111538557A
Bullet screen display method and device, equipment and storage medium
CN114531607A
Scene picture integration method and device, storage medium, processor and system
CN114546547A
