Barrage display method, device and equipment and storage medium

CN122534263APending Publication Date: 2026-08-07BEIJING IQIYI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING IQIYI TECH CO LTD
Filing Date
2026-05-29
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]本申请实施例的目的是提供一种弹幕显示方法、装置、设备和存储介质,能够解决弹幕显示的视觉表现不佳与行为模式单一的问题

Benefits of technology

[0010]本申请实施例提供的弹幕显示方法,通过在弹幕轨道上设置移动方向相反的弹幕,可以为相向运动的弹幕在界面中的碰撞创造条件,从而形成视觉焦点,通过弹幕参数的获取和碰撞次数的统计,可以进一步根据界面中弹幕的碰撞次数对弹幕的显示方式进行自适应的调整,在碰撞次数未达到预设的碰撞阈值按照预设的第一弹幕退场动画效果进行弹幕显示,在碰撞次数达到预设的碰撞阈值之后自动调整为按照预设的第二弹幕退场动画效果进行弹幕显示,以从界面中清除弹幕,进而能够有效提升弹幕显示的视觉表现力,根据不同的碰撞阶段调整弹幕在界面中的行为模式,避免因弹幕单一的行为模式而影响弹幕的显示效果,使得弹幕的显示更加具有吸引力和趣味性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122534263A_ABST
    Figure CN122534263A_ABST
Patent Text Reader

Abstract

The application discloses a method and device for displaying a barrage, equipment and a storage medium. The barrage is displayed through an interface, at least one barrage track is arranged in the interface, and the barrage includes barrages moving in opposite directions on the barrage track. The method comprises the following steps: acquiring barrage parameters of the barrage; counting the number of collisions of the barrages moving in opposite directions on the barrage track according to the barrage parameters; displaying the barrage according to a preset first barrage exit animation effect to remove the barrage from the interface when the number of collisions does not reach a preset collision threshold; and displaying the barrage according to a preset second barrage exit animation effect to remove the barrage from the interface when the number of collisions reaches the preset collision threshold. The visual performance of the barrage can be effectively improved, and the interactive interest of the barrage can be enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of bullet screen technology, specifically relating to a bullet screen display method and device, an electronic device, and a storage medium. Background Technology

[0002] With the rapid development of video technology, more and more users can watch various video programs online. During the viewing process, bullet comments have become an indispensable form of real-time interaction.

[0003] Current mainstream bullet screen systems primarily employ a linear motion model, causing bullet comments to move unidirectionally at a constant speed along a fixed track on the screen. However, these systems still have significant shortcomings in visual presentation and interactive experience. Visually, the bullet comments move only in a fixed direction at a constant speed, resulting in a monotonous visual rhythm and a lack of dynamic visual effects. In terms of interactive experience, the behavior of bullet comments from appearance to disappearance is entirely static, lacking behavioral variation and interaction between comments, making the behavior pattern monotonous and lacking in fun. Summary of the Invention

[0004] The purpose of this application is to provide a method, apparatus, device, and storage medium for displaying bullet comments, which can solve the problems of poor visual performance and monotonous behavior patterns in bullet comment display.

[0005] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a method for displaying bullet comments, wherein the bullet comments are displayed through an interface, the interface having at least one bullet comment track, and the bullet comments include bullet comments moving in opposite directions on the bullet comment track, the method comprising: Obtain the bullet screen parameters; The number of collisions between bullets moving in opposite directions on the bullet track is counted based on the bullet parameters. If the number of collisions does not reach the preset collision threshold, the bullet screen is displayed according to the preset first bullet screen exit animation effect to clear the bullet screen from the interface; When the number of collisions reaches a preset collision threshold, the bullet screen is displayed according to a preset second bullet screen exit animation effect to remove the bullet screen from the interface.

[0006] Secondly, embodiments of this application provide a bullet screen display device that displays bullet screens via an interface. The interface has at least one bullet screen track, and the bullet screens include a first bullet screen and a second bullet screen that move in opposite directions on the bullet screen track. The device includes: A bullet screen parameter acquisition module is used to acquire the bullet screen parameters of the bullet screen. The collision count module is used to count the number of collisions between bullets moving in opposite directions on the bullet track based on the bullet parameters. The first bullet screen exit animation effect display module is used to display the bullet screen according to the preset first bullet screen exit animation effect to clear the bullet screen from the interface when the number of collisions does not reach the preset collision threshold. The second bullet screen exit animation effect display module is used to display the bullet screen according to the preset second bullet screen exit animation effect to remove the bullet screen from the interface when the number of collisions reaches the preset collision threshold.

[0007] Thirdly, embodiments of this application provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of the method described in the first aspect.

[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0009] Fifthly, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps of the method described in the first aspect.

[0010] The bullet screen display method provided in this application creates conditions for collisions between bullet screens moving in opposite directions on the bullet screen track, thereby forming a visual focus. By acquiring bullet screen parameters and counting the number of collisions, the display method of the bullet screen can be adaptively adjusted according to the number of collisions in the interface. When the number of collisions has not reached a preset collision threshold, the bullet screen is displayed according to a preset first bullet screen exit animation effect. After the number of collisions reaches the preset collision threshold, the display method automatically adjusts to a preset second bullet screen exit animation effect to clear the bullet screen from the interface. This effectively improves the visual expressiveness of the bullet screen display. By adjusting the behavior mode of the bullet screen in the interface according to different collision stages, the display effect of the bullet screen is avoided due to a single behavior mode, making the display of the bullet screen more attractive and interesting. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating the steps of an embodiment of a bullet screen display method according to this application; Figure 2 This is a schematic diagram of a collision scene according to an embodiment of the bullet screen display method of this application; Figure 3 This is a schematic diagram of the shockwave effect of an embodiment of the bullet screen display method of this application; Figure 4 This is a schematic diagram of bullet screen trailing in one embodiment of the bullet screen display method of this application; Figure 5 This is a schematic diagram of the timing state machine of a collision barrage display method according to an embodiment of this application; Figure 6 This is a block diagram of a bullet screen system according to an embodiment of the bullet screen display method of this application; Figure 7 This is a structural block diagram of an embodiment of a bullet screen display device according to this application; Figure 8 This is a schematic diagram of the electronic device structure of an embodiment of the bullet screen display device of this application. Detailed Implementation

[0013] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0015] The bullet screen display method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0016] Current mainstream bullet comment systems primarily employ a linear motion model for displaying bullet comments. The bullet comments move unidirectionally at a constant speed along a fixed track, with position interpolation achieved through CSS3 (Cascading Style Sheets Level 3) animations or JavaScript timers. This is widely used in the basic bullet comment functionality of various streaming media platforms. Meanwhile, timeline-based bullet comment management systems precisely control the timing and position of bullet comments using timestamps and employ queue management mechanisms to bind bullet comments to the video timeline. Furthermore, static style bullet comment systems differentiate bullet comment types using preset CSS (Cascading Style Sheets) style classes or inline style configurations (such as color, font, and size). However, these traditional solutions have significant limitations: linear motion systems result in a lack of interaction between bullet comments, monotonous visual effects, and a lack of dynamism and hierarchy; timeline management systems focus only on time synchronization, ignoring spatial interaction and visual effects; and static style systems have fixed styles and cannot adjust visual effects based on dynamic interactions. These limitations lead to significant deficiencies in the visual expressiveness and interactive fun of traditional bullet comment systems.

[0017] To address the aforementioned issues, this application provides a method for displaying bullet comments, applicable to video platforms, live streaming platforms, and interactive media applications. This method effectively enhances the visual appeal of bullet comments and increases their interactive fun.

[0018] Reference Figure 1 This is a flowchart of a method for displaying bullet comments according to an embodiment of the present application. The method displays the bullet comments through an interface, which has at least one bullet comment track. The bullet comments include bullet comments that move in opposite directions on the bullet comment track.

[0019] The interface can be a display interface on various devices, such as smartphones, tablets, e-book readers, MP4 (Moving Picture Experts Group AudioLayer IV) players, laptops, in-vehicle computers, desktop computers, smart TVs, wearable devices, and other electronic device displays. The bullet screen track can be a virtual track in the bullet screen system used to manage the display position and movement path of bullet screens, and to manage the layout and animation of the bullet screens. The shape, position, and other related parameters of the bullet screen track can be set according to actual needs. The number of bullet screen tracks set in the interface can be one or more; this application does not impose a specific limitation. Bullets moving in opposite directions on the bullet screen track can be bullets that start displaying from both ends of the bullet screen track and move towards each other. For example, if the bullet screen track set in the interface is a horizontally placed straight track, then bullets moving in opposite directions on this bullet screen track can include bullets moving from left to right and bullets moving from right to left. The movement direction of each bullet can be determined based on the corresponding direction markers generated during bullet screen production.

[0020] By setting at least one bullet screen track in the interface and displaying bullet screens moving in opposite directions on the bullet screen track, a two-way bullet screen flow can be established in the interface, so that bullet screens moving in opposite directions on the bullet screen track can meet in the central area of ​​the bullet screen track, thereby creating conditions for bullet screen interaction and forming a visual focus on the interface.

[0021] The bullet screen display method of this application embodiment includes the following steps: Step 101: Obtain the bullet screen parameters; Among them, bullet screen parameters refer to configuration data that controls the display effects and behavior of bullet screens. The types of bullet screen parameters can include basic bullet screen parameters, bullet screen display parameters, and bullet screen interaction parameters. For example, basic bullet screen parameters can include information such as the size, speed, transparency, and color of the bullet screen; bullet screen display parameters can include information such as the font, display time, display spacing, and display position of the bullet screen; and bullet screen interaction parameters can include information such as the user's on / off status of the bullet screen, speed adjustment, font size selection, and color selection.

[0022] Different color parameters can be set for bullet comments that move in different directions. For example, bullet comments moving from left to right can be set to blue, and bullet comments moving from right to left can be set to red.

[0023] Step 102: Count the number of collisions of bullets moving in opposite directions on the bullet track based on the bullet parameters; In step 102, since the interface displays bullets that move in opposite directions on the bullet track, these bullets will meet and collide on the bullet track after moving for a certain time / distance. The number of collisions between bullets moving in opposite directions on the bullet track can be counted based on the bullet parameters of the bullets.

[0024] The movement direction of the bullet comments can be determined based on their corresponding bullet comment markers. Each bullet comment generates a corresponding bullet comment marker during production, which can include the bullet comment's movement direction. The movement direction can include a first direction and a second direction opposite to the first direction. The first direction can be from right to left, from left to right, or any other movement direction corresponding to the bullet comment's trajectory. The collision count is the cumulative number of all collisions that occur between bullet comments on the interface. The collision count can be reset before the start of each bullet comment campaign, after which the collision count will be 0.

[0025] Step 103: If the number of collisions does not reach the preset collision threshold, display the bullet comments according to the preset first bullet comment exit animation effect to clear the bullet comments from the interface; The collision threshold can be a pre-set maximum number of collisions. For example, the collision threshold can be set to 10, or it can be set according to the actual needs of the bullet screen operation activities. This application does not impose any specific restrictions on this.

[0026] In step 103, the displayed bullet comment behavior mode can be adjusted according to the number of collisions of the bullet comments on the interface. If the number of collisions does not reach the preset collision threshold, the bullet comments are displayed according to the preset first bullet comment exit animation effect to clear them from the interface. Compared with the original abrupt bullet comment clearing method where the bullet comments disappear directly after being moved to the interface boundary, the preset first bullet comment exit animation effect can effectively improve the visual expressiveness of the bullet comments, making the bullet comment clearing process more vivid.

[0027] Step 104: When the number of collisions reaches a preset collision threshold, the bullet screen is displayed according to the preset second bullet screen exit animation effect to remove the bullet screen from the interface.

[0028] In step 104, the displayed bullet comment behavior mode can be adjusted according to the number of collisions in the bullet comments on the interface. When the number of collisions reaches a preset collision threshold, the displayed bullet comment behavior mode is switched, and the bullet comment is displayed according to the preset second bullet comment exit animation effect to remove the bullet comment from the interface. Compared with the original unchanging bullet comment clearing method, the adaptive bullet comment exit animation effect switching based on the number of collisions can effectively improve the visual expressiveness of the bullet comments, making the bullet comment clearing process more vivid. It can also alleviate the visual pressure on users in high-density bullet comment scenarios and enhance the interactive fun of bullet comments.

[0029] Through the above implementation process, setting bullet comments with opposite movement directions on the bullet comment track of the interface can create conditions for bullet comments to collide in the interface, thereby forming a visual focus. By statistically analyzing the number of collisions obtained from the bullet comment parameters, the display method of the bullet comments can be adaptively adjusted according to the number of collisions in the interface. When the number of collisions has not reached the preset collision threshold, the bullet comments are displayed according to the preset first bullet comment exit animation effect. After the number of collisions reaches the preset collision threshold, the display of the bullet comments is automatically adjusted to the preset second bullet comment exit animation effect to clear the bullet comments from the interface. This achieves adaptive adjustment of bullet comment behavior, allowing the bullet comment system to perform multi-stage bullet comment display arrangement, which can effectively improve the visual expressiveness of the bullet comment display. Adjusting the behavior mode of the bullet comments in the interface according to different collision stages avoids the impact of a single behavior mode on the display effect of the bullet comments, making the bullet comment display more attractive and interesting, thereby enhancing the interactive fun of the bullet comments.

[0030] In some embodiments of this application, the bullet screen parameters include at least initial velocity, acceleration, and initial boundary coordinates; step 102, which involves counting the number of collisions between bullets moving in opposite directions on the bullet screen track based on the bullet screen parameters, specifically includes: The movement distance of the bullet screen per frame is determined based on the initial velocity and the acceleration. The collision margin corresponding to the bullet screen is determined based on the movement distance of each frame and a preset coefficient. The bullets that are displayed simultaneously on the same bullet track and move in opposite directions are defined as the first bullet and the second bullet. The number of collisions between the first and second bullet comments on the bullet comment track is calculated based on the movement distance per frame and the collision margin.

[0031] Among them, the initial velocity in the bullet screen parameters can represent the initial velocity when the bullet screen starts moving on the bullet screen track, and the acceleration in the bullet screen parameters can represent the acceleration of the bullet screen in each frame during the movement. The initial velocity and acceleration in the bullet screen parameters can be preset according to actual needs, and this application does not impose specific restrictions on them.

[0032] In this embodiment, to make the visual effect of the bullet comments more impactful, a linear acceleration movement mode is used for bullet comment display, where the bullet comments move with uniform acceleration along a bullet comment track on the interface. The movement speed of the bullet comments per frame can be determined based on the initial velocity and acceleration, where barrage.speed = barrage.acceleration*t + speedDefault, where barrage.acceleration represents the acceleration of the bullet comments, t represents the movement time of the bullet comments, and speedDefault represents the initial velocity of the bullet comments. Then, the movement distance of the bullet comments per frame can be determined based on the movement speed of each frame, and the collision margin corresponding to the bullet comments can be determined based on the movement distance per frame and a preset coefficient. The collision margin can be a redundancy in the movement distance of each frame reserved during the detection of whether a collision occurs, and can be obtained by multiplying the movement distance of each frame of the bullet comments by a preset coefficient. For example, the preset coefficient can be set to 1.1. This ensures that a collision is detected when two bullet comments are very close, while preventing the bullet comment system from displaying the corresponding effect too early before an actual collision occurs, thus affecting the realism of the bullet comment collision. The preset coefficient can also be set according to actual needs, and this application does not impose specific restrictions on it. Bullets with opposite movement directions displayed simultaneously on the same bullet comment track can be defined as the first bullet comment and the second bullet comment. Then, the number of collisions between the first bullet comment and the second bullet comment on the bullet comment track is counted based on the movement distance and collision margin per frame.

[0033] Through the above implementation process, the introduction of collision margin allows for the detection of collisions between the first and second bullet comments before the actual collision occurs, providing the bullet comment system with sufficient reaction time to display the corresponding animation effects promptly upon the actual collision. The predicted collision timing can be controlled by adjusting preset coefficients, enabling the bullet comment system to begin displaying the corresponding bullet comment exit animation effects simultaneously with the collision of the first and second bullet comments. Based on the movement distance per frame and the collision margin, real-time and accurate collision count statistics can be achieved, providing triggering conditions for subsequently adjusting bullet comment behavior patterns to display different bullet comment exit animation effects.

[0034] In some embodiments of this application, the step of counting the number of collisions between the first and second bullet comments on the bullet comment track based on the moving distance per frame and the collision margin specifically includes: As the first bullet screen and the second bullet screen move one frame in the interface, the first moving distance of the first bullet screen and the second moving distance of the second bullet screen are determined according to the collision margin. Based on the first movement distance and initial boundary coordinates of the first barrage, determine the current boundary prediction coordinates of the first barrage; Based on the second movement distance and initial boundary coordinates of the second barrage, determine the current boundary prediction coordinates of the second barrage; When the current boundary prediction coordinates of the first bullet screen and the current boundary prediction coordinates of the second bullet screen overlap, it is determined that the first bullet screen and the second bullet screen have collided. The number of collisions is obtained by counting the number of times the first bullet screen and the corresponding second bullet screen collide in the interface.

[0035] The initial boundary coordinates in the bullet screen parameters can include initial left boundary coordinates, initial right boundary coordinates, initial top boundary coordinates, and initial bottom boundary coordinates, used to reflect the position information of the bullet screen on the bullet screen track before it begins to move. For example, for a bullet screen moving from right to left, its initial left boundary coordinates can correspond to the right starting point of its bullet screen track; the initial right boundary coordinates can be determined based on the initial left boundary coordinates and the length of the bullet screen; and the initial top and bottom boundary coordinates can be determined based on the boundaries of the bullet screen track corresponding to the bullet screen or based on the size (font size) of the bullet screen. The coordinate system corresponding to the initial boundary coordinates can be a coordinate system established with the lower left corner of the interface as the origin, or a coordinate system established with the center point of the interface as the origin, or a coordinate system established with the lower right corner of the interface as the origin; this application does not impose specific limitations on this.

[0036] Each time the first and second bullet comments move one frame on the screen, their first and second movement distances can be determined based on collision margins. The first movement distance of the first bullet comment is the sum of its actual movement distance in the current frame and the corresponding collision margin, and the second movement distance of the second bullet comment is the sum of its actual movement distance in the current frame and the corresponding collision margin. Based on the first movement distance and initial boundary coordinates, the predicted current boundary coordinates of the first bullet comment can be determined. Similarly, based on the second movement distance and initial boundary coordinates, the predicted current boundary coordinates of the second bullet comment can be determined. These predicted current boundary coordinates are the expected current position of the bullet comment predicted based on either the first or second movement distance, and differ from its actual current position. When the predicted current boundary coordinates of the first and second bullet comments overlap, a collision is confirmed. Furthermore, a pre-established collision counter is used to count the number of collisions between the first and second bullet comments on the screen, thus obtaining the collision count.

[0037] When detecting whether bullet comments collide, each bullet comment can be considered as a whole contained within a rectangular bounding box, based on its boundary coordinates. If the bounding boxes of two bullet comments overlap in both the horizontal and vertical directions, then the two bullet comments can be considered to have collided. (Refer to...) Figure 2 This is a schematic diagram of a collision scenario according to an embodiment of the bullet screen display method of this application. The bullet screen "Awesome, longer, please!" moving from left to right can be considered the first bullet screen, with the red border representing the bounding box of the first bullet screen. The bullet screen "Hahahaha" moving from right to left can be considered the second bullet screen, with the blue border representing the bounding box of the second bullet screen. A collision is considered to have occurred when the bounding boxes of the first and second bullet screens overlap.

[0038] Correspondingly, the conditions for determining a collision between the bullet comments can be expressed by the following formula: max(left1, left2) ≤ min(right1, right2) and max(top1, top2) ≤ min(bottom1, bottom2). Here, left1 represents the left boundary coordinate of the first bullet comment, left2 represents the left boundary coordinate of the second bullet comment, right1 represents the right boundary coordinate of the first bullet comment, right2 represents the right boundary coordinate of the second bullet comment, top1 represents the top boundary coordinate of the first bullet comment, top2 represents the top boundary coordinate of the second bullet comment, bottom1 represents the bottom boundary coordinate of the first bullet comment, and bottom2 represents the bottom boundary coordinate of the second bullet comment. A collision between the first and second bullet comments can be determined when the maximum value of the left boundary coordinates of the first and second bullet comments is less than or equal to the minimum value of the right boundary coordinates of the first and second bullet comments, and the maximum value of the top boundary coordinates of the first and second bullet comments is less than or equal to the minimum value of the bottom boundary coordinates of the first and second bullet comments. Since this embodiment detects whether bullets displayed on the same bullet screen track collide, the bullets displayed on the same bullet screen track must overlap in one of the horizontal or vertical directions. For example, in the case of... Figure 2 When detecting bullet comments on a horizontally placed bullet comment track, since the first and second bullet comments on the same track will inevitably overlap vertically, it is only necessary to determine the horizontal overlap between the first and second bullet comments. Through the above implementation process, the collision time of the first and second bullet comments can be predicted based on the boundary coordinates of the first and second bullet comments, and the number of collisions on the interface can be counted. This provides the triggering conditions for subsequently adjusting the bullet comment behavior mode to display different bullet comment exit animation effects.

[0039] Reference Figure 3This is a schematic diagram of the shockwave effect of an embodiment of the bullet screen display method of this application. In some embodiments of this application, the first bullet screen exit animation effect includes a shockwave effect and a clearing effect. Step 103, which involves displaying the bullet screen according to the preset first bullet screen exit animation effect to clear the bullet screen from the interface, includes: The bullet patterns that collide on the bullet pattern track are identified as collision bullet patterns; The collision point corresponding to the collision barrage is determined based on the barrage parameters; The impact wave effect is displayed at the collision point, and the collision barrage is displayed according to the clearing effect; the clearing effect includes speed decay, random rotation, bounce, scaling and fading.

[0040] If the number of collisions does not reach the preset collision threshold, bullets that collide on the bullet track can be identified as colliding bullets, and the collision point corresponding to the colliding bullets can be determined based on the bullet parameters. The collision point can represent the position where the current boundary predicted coordinates of the bullets overlap at the time of the collision. After determining the collision point, a shockwave effect can be displayed at the collision point, and the colliding bullets can be displayed according to the clearing effects; the clearing effects include speed decay, random rotation, bounce, scaling, and fading.

[0041] Traditional bullet screen systems often employ a single "penetration mode" to display bullets, where they penetrate each other on the screen and then suddenly disappear at the edge, easily causing visual fatigue and a poor viewing experience. The above implementation enhances the visual impact of bullet collisions by displaying shockwave effects at the collision points, even when the number of collisions has not reached a preset collision threshold. Furthermore, it displays colliding bullets with clearing effects including speed decay, random rotation, bounce, scaling, and fading, simulating the realistic physical effects of rigid body collisions and enhancing visual impact. The scaling and fading effects in the clearing effects also allow for a natural transition during bullet clearing.

[0042] For example, the display time of the clearing effect of the collision barrage and the display time of the shock wave effect can be set to a unified time, that is, the display time of the exit animation effect of the first barrage, so that the duration of the shock wave effect in the interface is synchronized with the clearing time of the collision barrage.

[0043] In some embodiments of this application, displaying the shockwave effect at the collision point includes: A concentric energy ring of a preset size is displayed at the collision point; the concentric energy ring is used to simulate the shock wave effect. The concentric energy rings are controlled to expand to a preset radius according to a preset energy ring expansion speed, and the transparency of the concentric energy rings is controlled to decrease to a preset transparency value according to a preset energy ring fading speed.

[0044] If the number of collisions does not reach the preset collision threshold, a message such as the preset first bullet screen exit animation can be displayed at the collision point. Figure 3 The concentric energy rings of a preset size are used to simulate shockwave effects. The concentric energy rings expand to a preset radius based on a preset expansion speed, and their transparency decreases to a preset transparency value based on a preset fading speed. The radius of the concentric energy rings can expand uniformly from a preset initial radius to the preset radius. The expansion speed can be set to match the fading speed, so that the displayed concentric energy rings expand to the preset radius while simultaneously decreasing to the preset transparency value. The initial radius, initial transparency value, preset radius, and preset transparency value of the concentric energy rings can all be pre-configured according to actual needs; this application does not impose specific limitations on this. Setting the preset transparency value to 0 will cause the concentric energy rings to expand and fade over time on the interface. For example, the concentric energy rings include an outer energy ring and an inner energy ring. Furthermore, by configuring blur parameters in the UI components of the bullet screen system, blurring parameters can be added to the outer energy ring within the concentric energy rings. Figure 3 The Gaussian blur effect is shown. Through the above implementation process, a concentric energy ring that expands over time while decreasing in transparency can be displayed at the point of impact to simulate the shock wave of a bullet hell collision, forming a visual focus in the interface and enhancing visual impact.

[0045] For example, during the display of bullet comments according to the preset exit animation effect, when a bullet comment collision is detected, a shockwave object is created at the collision point to represent the collision effect. The created shockwave object is saved to the `shockwaves` array. Then, based on the display progress of the shockwave object, the radius and transparency of the shockwave object for each frame are calculated, and the corresponding shockwave object is drawn on the Canvas. That is, two concentric rings with different radii are drawn on the Canvas using `ctx.arc() + ctx.stroke()` to obtain concentric energy rings (i.e., shockwave objects) and displayed on the interface. The display progress of the shockwave object can be determined by dividing the current display duration of the shockwave object by the preset total display duration of the shockwave object. When the display progress of the shockwave object is 0, the radius of the concentric energy ring is 0 and the transparency is 1. As the display progress increases, the corresponding radius gradually increases proportionally, and the transparency gradually decreases proportionally. When the display progress of the shockwave object is 1, the radius of the concentric energy ring reaches the preset radius, and the transparency is 0. If the total display duration of a shockwave object exceeds the preset limit, the corresponding shockwave object can be removed from the shockwaves array. For example, the bullet screen system can render the shockwave effect first and then render the bullet screen comments on the interface.

[0046] In some embodiments of this application, the clearing effects include speed decay, random rotation, bounce, scaling, and fading. The clearing effects of the colliding bullet comments can be controlled by configuring and executing a preset code file in the background of the bullet comment system.

[0047] The collision barrage is displayed according to the aforementioned clearing effect, including: The speed decay of colliding bullets can be controlled. After bullets moving in opposite directions on the bullet track collide, the speed of the corresponding bullet on the track is controlled to decay to 0. The decay rate of the bullet speed can be pre-configured according to actual needs, and this application does not impose specific limitations on it.

[0048] The projectiles can be randomly rotated. This random rotation can be three-dimensional, including rotations around the Y-axis and Z-axis. During this random rotation, preset Y-axis and Z-axis rotation angle ranges can be obtained. For example, the Y-axis rotation angle range can be set to [15°, 30°], and the Z-axis rotation angle range can be set to [5°, 15°]. Then, an angle value can be randomly selected from the preset Y-axis rotation angle range as the Y-axis rotation angle, and an angle value can be randomly selected from the preset Z-axis rotation angle range as the Z-axis rotation angle. Furthermore, the selected Y-axis and Z-axis rotation angles can be converted from angle values ​​to radian values, thus obtaining the Y-axis rotation radians and Z-axis rotation radians. Simultaneously, the rotation direction of the bullet comments can be randomly determined, including the Y-axis rotation direction and the Z-axis rotation direction. For example, `Math.random()` can be used to generate a random number between 0 and 1, and then it can be determined whether the generated random number is greater than 0.5. If the generated random number is greater than 0.5, the rotation direction of the bullet comments is determined to be clockwise; if the generated random number is less than or equal to 0.5, the rotation direction of the bullet comments is determined to be counterclockwise. Then, the Y-axis rotation radians, Y-axis rotation direction, Z-axis rotation radians, and Z-axis rotation direction can be used as rotation parameters to control the collision bullet comments to rotate at a uniform speed during the display time of the first bullet comment exit animation, thereby achieving a natural 3D rotation effect. For example, the planar rotation angle (i.e., the Z-axis rotation angle) of the collision bullet comments during rotation can be determined using `rotationDirection * progress * maxRotation` in the code file. Here, `rotationDirection` represents the rotation direction; `rotationDirection` can be 1 for clockwise rotation and -1 for counterclockwise rotation. `progress` represents the progress percentage of the clearing effect. `maxRotation` represents the maximum rotation radius (i.e., the Z-axis rotation angle). The quasi-3D rotation angle (i.e., the Y-axis rotation angle) of the colliding bullet hell during its rotation can be determined by `rotationY` in the code file. `rotationY` represents the rotation angle of the bullet hell around the Y-axis.

[0049] It allows control over the display of bounce effects in collision-based bullet patterns. The bounce effect is achieved by controlling the bullet patterns to move in the opposite direction to their initial movement after a collision. The bounce effect can be set to execute only within a preset bounce duration after a collision, making the displayed bounce effect more realistic. Furthermore, the easing function `easeOutCubic` can be used to smoothly decelerate the bounced bullet patterns, allowing for a natural transition from fast to slow movement speed. For example, the bounce execution time can be set to 250ms. The current bounce progress (bounceProgress) can be determined by the ratio of the elapsed time after the collision to 250ms. Then, the bounce speed of the bullets can be adjusted using the cubic easing function (easeOut = 1 - Math.pow(1 - bounceProgress, 3). When elapsed is 0, easeOut is close to 0. When elapsed is 250ms, easeOut is close to 1. Then, the corresponding speed control factor can be determined based on easeOut to dynamically adjust the bounce speed of the colliding bullets and avoid sudden speed changes during the bounce. The speed control factor (velocityMultiplier = 1 – easeOut) decreases as the current bounce progress increases, gradually changing from close to 1 to 0. The bullet displacement per millisecond after the bounce becomes smaller and smaller, thus controlling the movement speed of the colliding bullets to transition naturally from fast to slow during the bounce process.

[0050] The colliding bullet comments can be scaled up as a whole during the display time of the first bullet comment exit animation effect, according to a preset scaling ratio. For example, the scaling ratio can be set according to actual needs; this application does not impose specific limitations on this. With a scaling ratio of 0.7, the colliding bullet comments can be shrunk to 0.7 times their original size during the display time of the first bullet comment exit animation effect to simulate the loss of bullet comments after a collision.

[0051] The system can fade out opposing bullet comments within the display time of the first bullet comment's exit animation, based on a preset fade-out speed. Bullet comment parameters include an initial transparency value. A linear fade-out method can be used, reducing the transparency value of the opposing bullet comments from its initial value to 0 according to the preset fade-out speed, achieving a gradual change in bullet comment transparency and thus clearing the bullet comments from the interface.

[0052] The danmaku rendering library renderBarrage() can convert the states of danmaku that have undergone the aforementioned clearing effects, including speed decay, random rotation, bounce, scaling, and fading, into a canvas API and draw the corresponding danmaku image in real time on the display interface.

[0053] Through the above implementation process, colliding bullet comments can be displayed using clearing effects including speed decay, random rotation, bounce, scaling, and fading. This simulates the physical effects of bullet comment collisions, creating natural changes in the movement of the bullet comments on the interface, forming a visual focus, and solving the problem of monotonous bullet comment movement in existing displays. Effects such as fading and scaling can achieve a smooth visual transition when clearing bullet comments, controlling the natural clearing of bullet comments after a collision, avoiding visual discontinuity caused by sudden disappearance of bullet comments, thereby effectively improving the visual expressiveness of the bullet comment display.

[0054] In some embodiments of this application, step 104, which involves displaying the bullet comments according to a preset second bullet comment exit animation effect to clear the bullet comments from the interface, includes: The bullets that collide are held in place on the bullet track to form a bullet pile; The stacking status of each bullet track is determined based on the bullet parameters corresponding to the bullet stack or the bullets that have not collided. If the stacking of bullet comments on each of the bullet comment tracks is severely stacked, stop displaying the undisplayed bullet comments and clear the displayed bullet comments from the interface.

[0055] When the number of collisions reaches a preset collision threshold, the behavior mode of the bullet comments can be switched, and the bullet comments will be displayed according to a preset second bullet comment exit animation effect. By stopping the colliding bullet comments on the bullet comment track, a bullet comment pile can be formed on the interface. The bullet comment pile is formed by multiple bullet comments stopping at the collision point after colliding. For example, when the number of collisions reaches the preset collision threshold, bullet comments on the same bullet comment track and moving in opposite directions will stop at the collision point after colliding. The bullet comments displayed subsequently will also stop at the collision point after colliding with the bullet comments that are still on the interface, and so on, continuously accumulating to form a bullet comment pile. For example, during the process of displaying the bullet comments according to the preset second bullet comment exit animation effect, the backend of the bullet comment system records the collision boundary coordinates collisionX / collisionY when bullet comments located on the same bullet comment track and moving in opposite directions collide. The bullet comments that collide are marked as stackable (isStacking=true), and the stackable bullet comment items are stored in a rendering array. In the animation, the stackable bullet comments are fixed at the corresponding collision boundary coordinates to form a bullet comment stack.

[0056] The stacking status of each bullet comment track can be determined based on the parameters of the bullet comment pile or the bullet comments that have not collided. Then, when the stacking status of each bullet comment track is severely stacked, the display of undisplayed bullet comments is stopped, and the displayed bullet comments are cleared from the interface. Through the above implementation process, after the number of collisions reaches a preset collision threshold, a preset code file is executed in the background of the bullet comment system to automatically adjust the behavior mode of the bullet comments, switching the behavior mode of the bullet comments from "disappear after collision" to "stack after collision". This means that the bullet comments on the interface no longer fade away after a collision, but stay and accumulate on the interface after a collision. When the stacking status of each bullet comment track on the interface is severely stacked, the display of undisplayed bullet comments is stopped in time, and the displayed bullet comments are cleared from the interface. This alleviates the visual pressure on users in high-density bullet comment scenarios and makes room for the display of subsequent bullet comments.

[0057] In some embodiments of this application, when a subsequently displayed bullet comment collides with a bullet comment already on the interface, the corresponding bullet comment that collides can be controlled to display a slight bounce effect. For example, the display progress of the current bounce effect can be determined by the ratio of the elapsed time after the collision to a preset bounce execution time. Then, a smooth bounce effect can be achieved using the sine function sin(progress * π). The value of sin(progress * π) is 0 when the display progress of the bounce effect is 0, 1 when the display progress of the bounce effect is 0.5, and returns to 0 when the display progress of the bounce effect is 1. This sine function can be used to control the colliding bullet comment to bounce a preset bounce distance after the collision and return to the impact point. The preset bounce distance can be set to 30 pixels, or it can be set according to actual needs; this application does not impose specific limitations on this. Through the above implementation process, when a newly displayed bullet comment collides with a bullet comment that is already on the bullet comment track, a slight bounce effect can be added to the corresponding bullet comment that collides, making the effect of the bullet comment collision more vivid and improving the visual expressiveness of the bullet comment.

[0058] In some embodiments of this application, determining the stacking status of each bullet track based on the bullet parameters corresponding to the bullet stack and the bullets that have not collided includes: The system detects whether there are any bullet comments that have not collided on the bullet comment track according to a preset bullet comment layout cycle. If it is detected that there are bullets on the bullet track that have not collided, the target bullet closest to the starting point of the bullet track is determined from the bullets that have not collided, the current boundary coordinates of the target bullet are obtained, and the available distance of the bullet track corresponding to the bullet track is determined based on the current boundary coordinates of the target bullet and the coordinates of the starting point of the track. If all the bullets on the bullet track have collided, the target bullet closest to the starting point of the bullet track is determined from the bullet pile, the current boundary coordinates of the target bullet are obtained, and the available distance of the bullet track corresponding to the bullet track is determined based on the current boundary coordinates of the target bullet and the coordinates of the starting point of the track. If the available distance of the track is less than the preset minimum safe distance, the accumulation of the barrage track is determined to be severe accumulation.

[0059] The bullet comment layout cycle represents the time interval at which bullet comments are added to the interface, i.e., the real-time processing time from when a bullet comment is sent by the user to when it is displayed on the interface. Based on a preset bullet comment layout cycle, the system can detect whether there are any bullet comments on the bullet comment track that have not collided with the user each time a new bullet comment is to be displayed.

[0060] If non-collision-prone bullets are detected on the bullet track, the target bullet closest to the track's starting point can be identified from among these non-collision-prone bullets. Non-collision-prone bullets refer to those already displayed on the interface, moving on the bullet track, but not yet colliding with any other bullets on the track. After identifying the target bullet, its current boundary coordinates can be obtained, and then the available distance of the corresponding bullet track can be determined based on these coordinates and the coordinates of the track's starting point.

[0061] If all bullets on the bullet track have collided, the target bullet closest to the track's starting point can be identified from the bullet pile. After identifying the target bullet, its current boundary coordinates can be obtained, and then the available distance of the corresponding bullet track can be determined based on the target bullet's current boundary coordinates and the coordinates of the track's starting point.

[0062] Since this embodiment supports the movement of bullet comments in opposite directions on the bullet comment track, there are two starting points for the bullet comment track. For example, the starting point can be determined based on the intersection of the bullet comment track and the interface boundary, plus a preset overflow margin. The overflow margin represents an additional space reserved beyond the interface boundary, which can be used to handle content overflow. For a horizontally set bullet comment track on the interface, the starting point on its right side is determined by adding the preset overflow margin to the x-coordinate of the intersection of the bullet comment track and the right boundary of the interface. The current boundary coordinates can represent the actual position of the bullet comment on the interface. For example, after obtaining the current boundary coordinates of the target bullet comment, the current boundary coordinates of the side closest to the starting point of the track can be determined, and then the distance from the side closest to the starting point to the starting point is determined as the available track distance.

[0063] If the available track distance is less than the preset minimum safe distance, the bullet screen track is considered severely cluttered. The minimum safe distance can be determined based on the initial speed of the bullet screens. For example, the bullet screen refresh rate can be set to 60fps (Frames Per Second), and the initial speed can be set to the frame rate. Therefore, the corresponding minimum safe distance can be the initial speed * 60, which is the distance the bullet screen moves in one second at its initial speed. When the available track distance is less than the preset minimum safe distance, it indicates that the bullet screen track is already full of bullet screens that have lingered after a collision, and the bullet screen track is considered severely cluttered. If the bullet screen track is determined to be severely cluttered, the bullet screen system can automatically refuse to generate new bullet screens based on a preset code file. Through the above implementation process, after the number of collisions reaches the preset collision threshold, the accumulation of bullet comments can be judged before displaying newly input bullet comments according to the bullet comment layout cycle. The accumulation of all bullet comment tracks on the interface is monitored. If the accumulation of bullet comment tracks is severe, it means that the bullet comment track can no longer display newly generated bullet comments. The bullet comment system can be guided to stop displaying undisplayed bullet comments on the bullet comment track in a timely manner based on the accumulation of bullet comment tracks. In the case that all bullet comment tracks on the interface are severely accumulated, the bullet comment pile remaining on the interface will be cleared in a timely manner.

[0064] In some embodiments of this application, removing the displayed bullet comments from the interface specifically includes: During the reciprocating motion of the barrage pile, the first or second barrage in the barrage pile is controlled to display a vibration effect according to the direction of movement of the barrage pile; When the number of reciprocations reaches a preset reciprocation threshold, the vibration effect is stopped from being displayed, and the barrage ghosting of the barrage is generated according to the preset ghosting parameters. The bullet screen stack with the bullet screen trail is controlled to move to the edge of the interface in a preset departure direction, and the bullet screen stack with the bullet screen trail that has moved to the edge of the interface is removed.

[0065] During the reciprocating motion of the bullet screen stack, the vibration effect of the first or second bullet screen within the stack can be controlled according to its direction of movement. The bullet screen stack includes a first bullet screen with an initial movement direction of one direction and a second bullet screen with an initial movement direction of another direction. Correspondingly, the reciprocating motion of the bullet screen stack is a repeated reciprocating motion in both the first and second directions. When the bullet screen stack moves in the first direction, the vibration effect of the second bullet screen can be controlled; when it moves in the second direction, the vibration effect of the first bullet screen can be controlled. For example, the vibration effect of the bullet screen can be achieved by superimposing multiple sine waves of different frequencies onto the bullet screen. The vibration function of the superimposed sine waves can be expressed by the following formula: .in, It can represent a vibration function; It can represent amplitude weight; t can represent the vibration frequency; t can represent the vibration time, calculated from the moment when the barrage begins its reciprocating motion. This can represent phase offset; i represents the number of superimposed sine waves. The vibration effect of the bullet comments can be superimposed on the pullOffsetY (horizontal offset) and pullShakeX (vertical offset) settings of the bullet comment's pulling animation. This is generated by combining multiple Math.sin() functions (mathematical functions for calculating sine values) with different frequencies and phases in updatePulling() (pulling animation update). Then, it is applied to the bullet comment stack via Canvas displacement in renderBarrage() (the internal method in the bullet comment system for rendering triggered bullet comments one by one), thereby controlling the vibration effect of the first or second bullet comment in the stack. Through the above implementation process, the vibration effect of the first or second bullet comment during the reciprocating motion can mimic the force effect of reciprocating pulling on the bullet comment stack, making the bullet comment display more vivid and improving its visual expressiveness. The alternating vibration of the first and second bullet comments can also attract the user's attention, creating a shift in visual focus and enhancing the interactive fun of the bullet comments.

[0066] Reference Figure 4This is a schematic diagram of a bullet screen display method embodiment according to this application. When the number of reciprocations reaches a preset reciprocation threshold, the vibration effect can be stopped, and a bullet screen trailing effect can be generated based on preset trailing parameters. Figure 4 The image shows the trailing effect of a barrage of comments. The reciprocating threshold represents the maximum number of reciprocating movements of the barrage in the interface, which can be set according to actual needs; this application does not impose specific restrictions on this. Trailing parameters may include the number of trailing layers, the base transparency coefficient of the trailing effect, and other related parameters, which can be set according to actual needs; this application does not impose specific restrictions on this. Barrage trailing refers to multiple layers of semi-transparent trailing drawn on the opposite side of the barrage's movement direction. The color of the barrage trailing effect can be set to the same color as the corresponding barrage. A fixed preset spacing is used between each layer of trailing, and the transparency of the trailing effect decreases as the number of layers increases. For example, the trailing parameters can be set in the `renderBarrage()` function of the barrage system. A larger trailing layer count (`trailCount`) corresponds to a longer and more layered barrage trailing effect; the number of barrage layers corresponding to the barrage trailing effect can be set to 5. A larger preset spacing (`trailSpacing`) between each layer of trailing effect corresponds to a greater distance between each layer of barrage trailing effect; the preset spacing between each layer of trailing effect can be set to 15 pixels. The transparency of the trailing effect (`trailAlpha`) can be determined according to the following formula: α i = (i + 1) / (n + 1) × k. Among them, α i This can represent the transparency of the i-th layer of the trailing shadow, where i is the layer index of the trailing shadow, n represents the total number of layers of the trailing shadow, and k represents the base transparency coefficient. The larger the transparency coefficient, the more obvious the trailing shadow. The trailing shadow position *trailOffsetX* corresponding to the right removal of the comment from the screen can be determined by the following formula: *trailOffsetX* = -i * trailSpacing*, which means that each layer of the trailing shadow is offset to the left by a preset distance relative to the current comment.

[0067] After adding a barrage of barrage comments, you can control the barrage with the barrage to move to the edge of the screen in a preset exit direction, and then remove the barrage with the barrage that has moved to the edge of the screen. This process can be represented on the screen as the barrage with the barrage moving out of the current screen in the exit direction. Through the above implementation process, after the barrage track is filled with colliding barrages, the barrage pile can be controlled to reciprocate to simulate being repeatedly pulled. By displaying vibration effects on the first or second barrage, the strength of the pulling forces can be simulated. Finally, the barrage pile with barrage trails is removed from the interface according to the preset departure direction. This simulates the victor suppressing the opponent and squeezing the barrage pile, which then drifts away from the interface with barrage trails from the preset departure direction. Thus, the barrage pile can be cleared from the interface through collective animation of the barrage pile. On the one hand, this can alleviate the overload of information on the interface and make room for the display of the next round of barrage, ensuring the long-term operation of the barrage system. On the other hand, it can make the barrage display more vivid and improve the visual expressiveness and interactive fun of the barrage.

[0068] In some embodiments of this application, removing the displayed bullet comments from the interface further includes: The reciprocating motion range of the bullet barrage on the bullet barrage track is determined according to the preset movement range; The projectile stack is controlled to reciprocate along the projectile track within the boundary of the reciprocating motion range, and the corresponding number of reciprocations is counted.

[0069] When the bullet screen pile is severely piled up on each bullet screen track in the interface, the reciprocating motion range of the bullet screen pile on the bullet screen track can be determined according to a preset movement range. Then, the bullet screen pile can be controlled to reciprocate within the boundary of the reciprocating motion range along the bullet screen track according to a preset reciprocating motion speed, and the corresponding number of reciprocations can be counted. The preset movement range can be set to one-third of the interface width, or it can be set according to actual needs; this application does not impose specific restrictions on it. After determining that the preset movement range is one-third of the interface width, the outer boundary of the bullet screen pile on each bullet screen track can be moved to both sides of the bullet screen track by a distance equal to one-third of the interface width, thus obtaining the reciprocating motion range of the bullet screen pile on the bullet screen track. Then, the bullet screen pile can be controlled to move in one direction along the bullet screen track until its boundary on the side in the same direction of movement reaches one boundary of the reciprocating motion range. Then, the bullet screen pile can be controlled to move in the opposite direction along the bullet screen track until its boundary on the side in the same direction of movement reaches the other boundary of the reciprocating motion range. Finally, the bullet screen pile can be controlled to return to its original position before the reciprocating motion. This process can be counted as one reciprocating motion. Repeating this process allows the bullet screen pile to reciprocate along the bullet screen track within the boundaries of the reciprocating motion range. Each time the bullet screen pile performs a reciprocating motion on the bullet screen track, the corresponding reciprocating motion count is incremented by 1. Through this implementation process, the bullet screen pile can be controlled to reciprocate along the bullet screen track within the boundaries of the reciprocating motion range, thus displaying an animation effect of the bullet screen pile being pulled along the bullet screen track on the interface. This makes the bullet screen display more attractive and interesting, thereby enhancing the interactive fun of the bullet screen.

[0070] In some embodiments of this application, when the number of collisions reaches a preset collision threshold, the method further includes: Adjust the preset bullet screen layout cycle to the target bullet screen layout cycle; the bullet screen layout cycle is used to represent the time interval for adding bullet screens on the interface; Adjust the initial velocity of the bullets to the target initial velocity to increase or decrease the movement speed of the bullets. Maintain the acceleration of the barrage; The bullet comments are displayed on the interface according to the target bullet comment layout cycle, the target initial velocity, and the acceleration.

[0071] In this embodiment, when the number of collisions of bullet comments on the interface reaches a preset collision threshold, the parameters of the bullet comment system can be automatically adjusted. The current preset bullet comment layout cycle is adjusted to the target bullet comment layout cycle, the initial speed of the bullet comments is adjusted to the target initial speed, and the acceleration of the bullet comments remains constant. Then, the bullet comments are displayed on the interface based on the adjusted target bullet comment layout cycle, target initial speed, and acceleration. The bullet comment layout cycle represents the time interval at which the bullet comment system adds bullet comments to the interface. The target bullet comment layout cycle can be greater than or less than the preset bullet comment layout cycle. By adjusting the bullet comment layout cycle, the time interval for adding new bullet comments on the interface can be extended or shortened. The target initial speed can be greater than or less than the initial speed of the bullet comments. By adjusting the initial speed of the bullet comments, the movement speed of the bullet comments on the interface can be increased or decreased. Shorter bullet comment layout cycles and faster movement speeds can enhance the real-time interactivity and lively atmosphere of the bullet comment display, while longer bullet comment layout cycles and slower movement speeds can improve the readability and viewing comfort of the bullet comment content. Specific target bullet comment layout cycles and target initial speeds can be set according to actual needs. For example, the preset bullet comment layout cycle can be 700ms, the target bullet comment layout cycle can be 300ms, the initial speed of the bullet comments can be 12 pixels / second, the target initial speed can be 14 pixels / second, and the acceleration of the bullet comments can be kept constant at 0.3 pixels / second. The above implementation process can shorten the bullet comment collision cycle and accelerate the initial speed of the bullet comments, making the subsequent display of the bullet comments according to the preset second bullet comment exit animation effect more compact compared to the first bullet comment exit animation effect executed when the number of collisions has not reached the preset collision threshold.

[0072] Through the above implementation process, when the number of collisions of the bullet comments in the interface reaches a preset collision threshold, the display rhythm of the subsequent bullet comments can be changed, making the display process of the second bullet comment exit animation effect more compact or more relaxed compared to the first bullet comment exit animation effect. The compact bullet comment display rhythm can enhance the attractiveness of the bullet comments, while the relaxed bullet comment display rhythm can alleviate visual fatigue and help improve the visual display effect of the bullet comments.

[0073] Reference Figure 5 This is a schematic diagram of the timing state machine for a collision-based bullet screen display method according to an embodiment of this application. The timing state machine can represent the state changes of the collision-based bullet screen over time. It includes five states: accelerated scrolling mode, collision animation, bullet screen stacking mode, left / right pulling mode, and push-out mode.

[0074] Each time a new set of bullet comments is added to the interface, the bullet comments displayed on the interface will enter an accelerated scrolling mode. In the accelerated scrolling mode, the bullet comments will accelerate from both ends of the bullet comment track towards the center of the interface and collide. When the number of collisions of the bullet comments on the interface does not reach the collision threshold, for example, when the number of collisions of the bullet comments is less than 10, the bullet comments that collide will construct a collision animation on the interface (i.e., the preset first bullet comment exit animation effect). After the collision animation disappears, the bullet comments can be rearranged and a new round of bullet comments can be added. When the number of collisions of the bullet comments on the interface reaches the collision threshold, for example, when the number of collisions of the bullet comments is greater than or equal to 10, the bullet comment accumulation mode is entered. The bullet comments that collide no longer disappear, but accumulate in the interface to form a bullet comment pile. Once the barrage track on the screen is full of barrages, it enters a left-right pulling mode. The barrages move back and forth on the screen, and the vibration effect is used to simulate the changes in the strength of the pulling forces. Finally, when the number of reciprocating movements reaches the preset reciprocating threshold, the game enters the trailing exit state. The winning side suppresses the opponent and squeezes the barrage, which then drifts off the screen in the preset exit direction with a trailing effect.

[0075] Through such Figure 5 The collision barrage state machine shown uniformly manages the lifecycle of the barrage. Based on the dynamic judgment of the number of collisions of the barrage on the interface, it can execute a coherent state transition of multiple stages from accelerated scrolling, collision, accumulation, left and right pulling to the collective exit of the trailing shadow, forming a narrative visual effect and realizing the automatic switching of barrage behavior mode, so that the system can adapt to barrage scenes with different densities.

[0076] Reference Figure 6 This is a block diagram of a bullet screen system according to an embodiment of the bullet screen display method of this application. The bullet screen system may include: a bullet screen management module, a state machine management module, a layout management module, a parameter scheduling module, a collision detection module, an animation rendering module, and an on-screen display module.

[0077] The bullet screen management module is configured to download bullet screens, as well as create, update, and destroy bullet screen materials. It is the pre-module of the entire bullet screen collision activity. The collision detection module is configured to detect bullet screen collisions in real time and trigger animations. This module can detect whether bullet screens on the interface collide based on the AABB (Axis-Aligned Bounding Box) algorithm and in combination with collision margin, and then trigger the corresponding animation effects according to the number of collisions. The animation rendering module is configured to control the corresponding bullet screen to perform animation effects such as accelerated scrolling, collision, bullet screen stacking, left and right pulling, and shadow leaving the scene based on the animation effects triggered by the collision detection module. The state machine management module is configured to switch the behavior mode of the bullet comments based on the number of collisions on the screen. The behavior mode of the bullet comments can include at least the collision mode, the stacking mode, and the trailing departure mode. The layout management module is configured to manage the distribution of bullet comments corresponding to multiple bullet comment tracks and to determine the stacking status of bullet comment tracks; The parameter scheduling module is configured to dynamically adjust the bullet screen layout cycle and bullet screen speed. After the number of collisions reaches the preset collision threshold, the parameter scheduling module can automatically adjust the bullet screen parameters, including shortening the bullet screen layout cycle, increasing the initial speed of newly generated bullet screens and keeping the acceleration constant. As a result, when the number of collisions in the early stage of the event has not reached the collision threshold, the display process from the generation of the bullet screen to the disappearance of the collision is longer and the cycle is larger. After the number of collisions in the later stage reaches the collision threshold, the bullet screen travel becomes shorter, the display interval decreases, and the bullet screen activity rhythm becomes more compact.

[0078] The on-screen display module is configured to display bullet comments and corresponding animation effects on the interface.

[0079] In the bullet screen system, the state machine management module, layout management module, parameter scheduling module, and collision detection module work together to render the animation of the bullet screen display and the logic of bullet screen movement, ultimately triggering the display of the bullet screen and realizing a coherent narrative of bullet screen from collision to accumulation to clearing.

[0080] It should be noted that the execution entity of the bullet screen display method provided in this application embodiment can be a bullet screen display device, or a control module in the bullet screen display device for executing the method of loading bullet screen display. This application embodiment uses the execution of the method of loading bullet screen display by a bullet screen display device as an example to illustrate the bullet screen display method provided in this application embodiment.

[0081] Reference Figure 7 This is a structural block diagram of an embodiment of a bullet screen display device according to this application. The bullet screen is displayed through an interface, which has at least one bullet screen track. The bullet screen includes a first bullet screen and a second bullet screen that move in opposite directions on the bullet screen track. Specifically, it may include the following modules: The bullet screen parameter acquisition module 701 is used to acquire the bullet screen parameters of the bullet screen; The collision count module 702 is used to count the number of collisions between bullets moving in opposite directions on the bullet track according to the bullet parameters. The first bullet screen exit animation effect display module 703 is used to display the bullet screen according to the preset first bullet screen exit animation effect to clear the bullet screen from the interface when the number of collisions has not reached the preset collision threshold. The second bullet screen exit animation effect display module 704 is used to display the bullet screen according to the preset second bullet screen exit animation effect to remove the bullet screen from the interface when the number of collisions reaches the preset collision threshold.

[0082] The bullet screen parameters include at least initial velocity, acceleration, and initial boundary coordinates; the collision count module 702 includes: The per-frame movement distance determination submodule is used to determine the per-frame movement distance of the bullet screen based on the initial velocity and the acceleration. The collision margin determination submodule is used to determine the collision margin corresponding to the barrage based on the movement distance of each frame and a preset coefficient. The first and second barrage determination submodule is used to determine the barrages that are displayed simultaneously on the same barrage track and have opposite directions of movement as the first barrage and the second barrage. The collision count submodule is used to count the number of collisions between the first bullet screen and the second bullet screen on the bullet screen track based on the movement distance per frame and the collision margin.

[0083] The collision count submodule specifically includes: A movement distance determination unit is used to determine, based on the collision margin, a first movement distance of the first bullet screen and a second movement distance of the second bullet screen when the first bullet screen and the second bullet screen move one frame in the interface; The current boundary prediction coordinate determination unit is used to determine the current boundary prediction coordinates of the first bullet screen based on the first moving distance and the initial boundary coordinates of the first bullet screen; and to determine the current boundary prediction coordinates of the second bullet screen based on the second moving distance and the initial boundary coordinates of the second bullet screen. The collision prediction unit is used to determine that the first barrage and the second barrage collide when the current boundary prediction coordinates of the first barrage and the current boundary prediction coordinates of the second barrage overlap. The collision count unit is used to count the number of times the first bullet screen and the second bullet screen collide in the interface to obtain the collision count.

[0084] The first bullet screen exit animation effect includes a shockwave effect and a clearing effect. The first bullet screen exit animation effect display module 703 includes: The collision barrage determination submodule is used to determine the barrages that collide on the barrage track as collision barrages; The collision point determination submodule is used to determine the collision point corresponding to the colliding bullet screen based on the bullet screen parameters; The first display submodule is used to display the shock wave effect at the collision point and to display the collision barrage according to the clearing effect; the clearing effect includes speed decay, random rotation, bounce, scaling and fading.

[0085] The first display submodule is further configured to: A concentric energy ring of a preset size is displayed at the collision point; the concentric energy ring is used to simulate the shock wave effect. The concentric energy rings are controlled to expand to a preset radius according to a preset energy ring expansion speed, and the transparency of the concentric energy rings is controlled to decrease to a preset transparency value according to a preset energy ring fading speed.

[0086] The second bullet screen exit animation effect display module 704 includes: A bullet pile generation submodule is used to keep the colliding bullets on the bullet track to form a bullet pile; The stacking status determination submodule is used to determine the stacking status of each barrage track based on the barrage stack or the barrage parameters corresponding to the barrage that has not collided. The second display submodule is used to stop displaying the undisplayed bullet comments and remove the displayed bullet comments from the interface when the accumulation of bullet comments on each of the bullet comment tracks is severe.

[0087] The stacking condition determination submodule is further used for: The system detects whether there are any bullet comments that have not collided on the bullet comment track according to a preset bullet comment layout cycle. If it is detected that there are bullets on the bullet track that have not collided, the target bullet closest to the starting point of the bullet track is determined from the bullets that have not collided, the current boundary coordinates of the target bullet are obtained, and the available distance of the bullet track corresponding to the bullet track is determined based on the current boundary coordinates of the target bullet and the coordinates of the starting point of the track. If all the bullets on the bullet track have collided, the target bullet closest to the starting point of the bullet track is determined from the bullet pile, the current boundary coordinates of the target bullet are obtained, and the available distance of the corresponding bullet track is determined based on the current boundary coordinates of the target bullet and the coordinates of the starting point of the track. If the available distance of the track is less than the preset minimum safe distance, the accumulation of the barrage track is determined to be severe accumulation.

[0088] The second display submodule is further configured to: During the reciprocating motion of the barrage pile, the first or second barrage in the barrage pile is controlled to display a vibration effect according to the direction of movement of the barrage pile; When the number of reciprocations reaches a preset reciprocation threshold, the vibration effect is stopped from being displayed, and the barrage ghosting of the barrage is generated according to the preset ghosting parameters. The bullet screen stack with the bullet screen trail is controlled to move to the edge of the interface in a preset departure direction, and the bullet screen stack with the bullet screen trail that has moved to the edge of the interface is removed.

[0089] The second display submodule is also used for: The reciprocating motion range of the bullet barrage on the bullet barrage track is determined according to the preset movement range; Control the barrage stack to reciprocate along the barrage track within the boundary of the reciprocating motion interval and count the corresponding number of reciprocations; The bullet screen display device also includes: The parameter adjustment module is used to adjust the preset bullet screen layout cycle to the target bullet screen layout cycle when the number of collisions reaches a preset collision threshold; the bullet screen layout cycle is used to represent the time interval for adding bullet screens on the interface; adjust the initial speed of the bullet screen to the target initial speed so that the movement speed of the bullet screen is increased or decreased; and maintain the acceleration of the bullet screen. The bullet screen display module is used to display the bullet screen on the interface according to the target bullet screen layout cycle, the target initial velocity, and the acceleration.

[0090] The bullet screen display device in this application embodiment can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not impose specific limitations.

[0091] The bullet screen display device in this application embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems, and this application embodiment does not specifically limit it.

[0092] The bullet screen display device provided in this application embodiment can achieve... Figures 1 to 6 The various processes implemented by the bullet screen display device in the method embodiment will not be described again here to avoid repetition.

[0093] The bullet screen display device provided in this application embodiment can display bullet screens through an interface. The interface is provided with at least one bullet screen track, and the bullet screens include bullet screens moving in opposite directions on the bullet screen track. By acquiring the bullet screen parameters, the number of collisions between bullet screens moving in opposite directions on the bullet screen track can be counted based on the bullet screen parameters. If the number of collisions does not reach a preset collision threshold, the bullet screen is displayed according to a preset first bullet screen exit animation effect to clear the bullet screen from the interface. If the number of collisions reaches the preset collision threshold, the bullet screen is displayed according to a preset second bullet screen exit animation effect to clear the bullet screen from the interface. Through the above implementation process, setting bullet comments with opposite movement directions on the bullet comment track of the interface can create conditions for bullet comments to collide in the interface, thereby forming a visual focus. By statistically analyzing the number of collisions obtained from the bullet comment parameters, the display method of the bullet comments can be adaptively adjusted according to the number of collisions in the interface. When the number of collisions has not reached the preset collision threshold, the bullet comments are displayed according to the preset first bullet comment exit animation effect. After the number of collisions reaches the preset collision threshold, the display of the bullet comments is automatically adjusted to the preset second bullet comment exit animation effect to clear the bullet comments from the interface. This achieves adaptive adjustment of bullet comment behavior, allowing the bullet comment system to perform multi-stage bullet comment display arrangement, which can effectively improve the visual expressiveness of the bullet comment display, making the bullet comment display more attractive and interesting, thereby enhancing the interactive fun of the bullet comments.

[0094] This application also provides an electronic device, such as... Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804. The processor 801, communication interface 802, and memory 803 communicate with each other via the communication bus 804. Memory 803 is used to store computer programs; When processor 801 executes a program stored in memory 803, it performs the following steps: Obtain the bullet screen parameters; The number of collisions between bullets moving in opposite directions on the bullet track is counted based on the bullet parameters. If the number of collisions does not reach the preset collision threshold, the bullet screen is displayed according to the preset first bullet screen exit animation effect to clear the bullet screen from the interface; When the number of collisions reaches a preset collision threshold, the bullet comments are displayed according to a preset second bullet comment exit animation effect to clear the bullet comments from the interface.

[0095] Optionally, the bullet screen parameters include at least initial velocity, acceleration, and initial boundary coordinates; the step of counting the number of collisions between bullets moving in opposite directions on the bullet screen trajectory based on the bullet screen parameters includes: The movement distance of the bullet screen per frame is determined based on the initial velocity and the acceleration. The collision margin corresponding to the bullet screen is determined based on the movement distance of each frame and a preset coefficient. The bullets that are displayed simultaneously on the same bullet track and move in opposite directions are defined as the first bullet and the second bullet. The number of collisions between the first and second bullet comments on the bullet comment track is calculated based on the movement distance per frame and the collision margin.

[0096] The step of counting the number of collisions between the first and second bullet comments on the bullet comment track based on the movement distance per frame and the collision margin includes: As the first bullet screen and the second bullet screen move one frame in the interface, the first moving distance of the first bullet screen and the second moving distance of the second bullet screen are determined according to the collision margin. Based on the first movement distance and initial boundary coordinates of the first barrage, determine the current boundary prediction coordinates of the first barrage; Based on the second movement distance and initial boundary coordinates of the second barrage, determine the current boundary prediction coordinates of the second barrage; When the current boundary prediction coordinates of the first bullet screen and the current boundary prediction coordinates of the second bullet screen overlap, it is determined that the first bullet screen and the second bullet screen have collided. The number of collisions is obtained by counting the number of times the first bullet screen and the second bullet screen collide in the interface.

[0097] Optionally, the first bullet screen exit animation effect includes a shockwave effect and a clearing effect. The step of displaying the bullet screen according to the preset first bullet screen exit animation effect to clear the bullet screen from the interface includes: The bullet patterns that collide on the bullet pattern track are identified as collision bullet patterns; The collision point corresponding to the collision barrage is determined based on the barrage parameters; The impact wave effect is displayed at the collision point, and the collision barrage is displayed according to the clearing effect; the clearing effect includes speed decay, random rotation, bounce, scaling and fading.

[0098] Optionally, displaying the shockwave effect at the collision point includes: A concentric energy ring of a preset size is displayed at the collision point; the concentric energy ring is used to simulate the shock wave effect. The concentric energy rings are controlled to expand to a preset radius according to a preset energy ring expansion speed, and the transparency of the concentric energy rings is controlled to decrease to a preset transparency value according to a preset energy ring fading speed.

[0099] Optionally, displaying the bullet comment according to a preset second bullet comment exit animation effect to remove the bullet comment from the interface includes: The bullets that collide are held in place on the bullet track to form a bullet pile; The stacking status of each bullet track is determined based on the bullet parameters corresponding to the bullet stack or the bullets that have not collided. If the stacking of bullet comments on each of the bullet comment tracks is severely stacked, stop displaying the undisplayed bullet comments and remove the displayed bullet comments from the interface.

[0100] Optionally, determining the stacking status of each bullet track based on the bullet parameters corresponding to the bullet stack and the bullets that did not collide includes: The system detects whether there are any bullet comments that have not collided on the bullet comment track according to a preset bullet comment layout cycle. If it is detected that there are bullets on the bullet track that have not collided, the target bullet closest to the starting point of the bullet track is determined from the bullets that have not collided, the current boundary coordinates of the target bullet are obtained, and the available distance of the bullet track corresponding to the bullet track is determined based on the current boundary coordinates of the target bullet and the coordinates of the starting point of the track. If all the bullets on the bullet track have collided, the target bullet closest to the starting point of the bullet track is determined from the bullet pile, the current boundary coordinates of the target bullet are obtained, and the available distance of the bullet track corresponding to the bullet track is determined based on the current boundary coordinates of the target bullet and the coordinates of the starting point of the track. If the available distance of the track is less than the preset minimum safe distance, the accumulation of the barrage track is determined to be severe accumulation.

[0101] Optionally, removing the displayed bullet comments from the interface includes: During the reciprocating motion of the barrage pile, the first or second barrage in the barrage pile is controlled to display a vibration effect according to the direction of movement of the barrage pile; When the number of reciprocations reaches a preset reciprocation threshold, the vibration effect is stopped from being displayed, and the barrage ghosting of the barrage is generated according to the preset ghosting parameters. The bullet screen stack with the bullet screen trail is controlled to move to the edge of the interface in a preset departure direction, and the bullet screen stack with the bullet screen trail that has moved to the edge of the interface is removed.

[0102] Optionally, removing the displayed bullet comments from the interface includes: The reciprocating motion range of the bullet barrage on the bullet barrage track is determined according to the preset movement range; The projectile stack is controlled to reciprocate along the projectile track within the boundary of the reciprocating motion range, and the corresponding number of reciprocations is counted.

[0103] Optionally, if the number of collisions reaches a preset collision threshold, the method further includes: Adjust the preset bullet screen layout cycle to the target bullet screen layout cycle; the bullet screen layout cycle is used to represent the time interval for adding bullet screens on the interface; Adjust the initial speed of the bullets to the target initial speed to increase or decrease the movement speed of the bullets; Maintain the acceleration of the barrage; The bullet comments are displayed on the interface according to the target bullet comment layout cycle, the target initial velocity, and the acceleration.

[0104] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0105] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0106] The communication interface is used for communication between the aforementioned terminal and other devices.

[0107] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0108] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0109] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described bullet screen display method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0110] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0111] This application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the various processes of the above-described bullet screen display method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0112] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0113] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0114] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for displaying bullet comments, characterized in that, The method involves displaying the bullet comments through an interface, wherein the interface has at least one bullet comment track, and the bullet comments include bullet comments that move in opposite directions on the bullet comment track. Obtain the bullet screen parameters; The number of collisions between bullets moving in opposite directions on the bullet track is counted based on the bullet parameters. If the number of collisions does not reach the preset collision threshold, the bullet screen is displayed according to the preset first bullet screen exit animation effect to clear the bullet screen from the interface; When the number of collisions reaches a preset collision threshold, the bullet screen is displayed according to a preset second bullet screen exit animation effect to remove the bullet screen from the interface.

2. The method according to claim 1, characterized in that, The bullet screen parameters include at least initial velocity, acceleration, and initial boundary coordinates; the step of counting the number of collisions between bullets moving in opposite directions on the bullet screen trajectory based on the bullet screen parameters includes: The movement distance of the bullet screen per frame is determined based on the initial velocity and the acceleration. The collision margin corresponding to the bullet screen is determined based on the movement distance of each frame and a preset coefficient. The bullets that are displayed simultaneously on the same bullet track and move in opposite directions are defined as the first bullet and the second bullet. The number of collisions between the first and second bullet comments on the bullet comment track is calculated based on the movement distance per frame and the collision margin.

3. The method according to claim 2, characterized in that, The step of counting the number of collisions between the first and second bullet comments on the bullet comment track based on the movement distance per frame and the collision margin includes: As the first bullet screen and the second bullet screen move one frame in the interface, the first moving distance of the first bullet screen and the second moving distance of the second bullet screen are determined according to the collision margin. Based on the first movement distance and initial boundary coordinates of the first barrage, determine the current boundary prediction coordinates of the first barrage; Based on the second movement distance and initial boundary coordinates of the second barrage, determine the current boundary prediction coordinates of the second barrage; When the current boundary prediction coordinates of the first bullet screen and the current boundary prediction coordinates of the second bullet screen overlap, it is determined that the first bullet screen and the second bullet screen have collided. The number of collisions is obtained by counting the number of times the first bullet screen and the second bullet screen collide in the interface.

4. The method according to claim 1, characterized in that, The first bullet screen exit animation effect includes a shockwave effect and a clearing effect. Displaying the bullet screen according to the preset first bullet screen exit animation effect to clear the bullet screen from the interface includes: The bullet patterns that collide on the bullet pattern track are identified as collision bullet patterns; The collision point corresponding to the collision barrage is determined based on the barrage parameters; The impact wave effect is displayed at the collision point, and the collision barrage is displayed according to the clearing effect; the clearing effect includes speed decay, random rotation, bounce, scaling and fading.

5. The method according to claim 4, characterized in that, The display of the shock wave effect at the collision point includes: A concentric energy ring of a preset size is displayed at the collision point; the concentric energy ring is used to simulate the shock wave effect. The concentric energy rings are controlled to expand to a preset radius according to a preset energy ring expansion speed, and the transparency of the concentric energy rings is controlled to decrease to a preset transparency value according to a preset energy ring fading speed.

6. The method according to claim 1, characterized in that, The step of displaying the bullet comments according to a preset second bullet comment exit animation effect to remove the bullet comments from the interface includes: The bullets that collide are held in place on the bullet track to form a bullet pile; The stacking status of each bullet track is determined based on the bullet parameters corresponding to the bullet stack or the bullets that have not collided. If the stacking of bullet comments on each of the bullet comment tracks is severely stacked, stop displaying the undisplayed bullet comments and remove the displayed bullet comments from the interface.

7. The method according to claim 6, characterized in that, The step of determining the stacking status of each bullet track based on the bullet parameters corresponding to the bullet stack and the bullets that have not collided includes: The system detects whether there are any bullet comments that have not collided on the bullet comment track according to a preset bullet comment layout cycle. If it is detected that there are bullets on the bullet track that have not collided, the target bullet closest to the starting point of the bullet track is determined from the bullets that have not collided, the current boundary coordinates of the target bullet are obtained, and the available distance of the bullet track corresponding to the bullet track is determined based on the current boundary coordinates of the target bullet and the coordinates of the starting point of the track. If all the bullets on the bullet track have collided, the target bullet closest to the starting point of the bullet track is determined from the bullet pile, the current boundary coordinates of the target bullet are obtained, and the available distance of the bullet track corresponding to the bullet track is determined based on the current boundary coordinates of the target bullet and the coordinates of the starting point of the track. If the available distance of the track is less than the preset minimum safe distance, the accumulation of the barrage track is determined to be severe accumulation.

8. The method according to claim 6, characterized in that, Removing the displayed bullet comments from the interface includes: During the reciprocating motion of the barrage pile, the first or second barrage in the barrage pile is controlled to display a vibration effect according to the direction of movement of the barrage pile; When the number of reciprocations reaches a preset reciprocation threshold, the vibration effect is stopped from being displayed, and the barrage ghosting of the barrage is generated according to the preset ghosting parameters. The bullet screen stack with the bullet screen trail is controlled to move to the edge of the interface in a preset departure direction, and the bullet screen stack with the bullet screen trail that has moved to the edge of the interface is removed.

9. The method according to claim 8, characterized in that, Removing the displayed bullet comments from the interface further includes: The reciprocating motion range of the bullet barrage on the bullet barrage track is determined according to the preset movement range; The projectile stack is controlled to reciprocate along the projectile track within the boundary of the reciprocating motion range, and the corresponding number of reciprocations is counted.

10. The method according to claim 1, characterized in that, If the number of collisions reaches a preset collision threshold, the method further includes: Adjust the preset bullet screen layout cycle to the target bullet screen layout cycle; the bullet screen layout cycle is used to represent the time interval for adding bullet screens on the interface; Adjust the initial speed of the bullets to the target initial speed to increase or decrease the movement speed of the bullets; Maintain the acceleration of the barrage; The bullet comments are displayed on the interface according to the target bullet comment layout cycle, the target initial velocity, and the acceleration.

11. A bullet screen display device, characterized in that, The device displays the bullet comments via an interface, which includes at least one bullet comment track. The bullet comments include a first bullet comment and a second bullet comment that move in opposite directions on the bullet comment track. A bullet screen parameter acquisition module is used to acquire the bullet screen parameters of the bullet screen. The collision count module is used to count the number of collisions between bullets moving in opposite directions on the bullet track based on the bullet parameters. The first bullet screen exit animation effect display module is used to display the bullet screen according to the preset first bullet screen exit animation effect to clear the bullet screen from the interface when the number of collisions does not reach the preset collision threshold. The second bullet screen exit animation effect display module is used to display the bullet screen according to the preset second bullet screen exit animation effect to remove the bullet screen from the interface when the number of collisions reaches the preset collision threshold.

12. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of the bullet screen display method as described in claims 1-10.

13. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions, which, when executed by a processor, implement the steps of the bullet screen display method as described in claims 1-10.