Danmaku Display Method and Device

By configuring the direction of the barrage movement in multiple barrage layers, the problem that existing barrage cannot present 3D spatial effects is solved, and a richer barrage display form and a better user experience are achieved.

CN115988231BActive Publication Date: 2025-06-24SHANGHAI BILIBILI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211654601.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2025-06-24
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

The existing barrage cannot present the 3D spatial effect, affecting the user experience.

Method used

By obtaining the barrage to be displayed and when the preset placement conditions are met, it is placed into the target barrage track in multiple barrage layers, and the barrage movement direction is configured according to the preset angle to realize 3D display of barrage in multi-layer tracks.

Benefits of technology

This allows the barrage to present a 3D spatial effect, enriches the barrage expression form and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115988231B_ABST
    Figure CN115988231B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a method for displaying bullet screens. The method includes: obtaining a bullet screen to be displayed; when the bullet screen to be displayed meets a preset placement condition, placing the bullet screen to be displayed into a target bullet screen track of a target bullet screen layer, where the target bullet screen layer is one of several bullet screen layers, and the target bullet screen track is one of the bullet screen tracks in the target bullet screen layer; displaying the bullet screen to be displayed in the target bullet screen track according to bullet screen configuration, where the bullet screen configuration at least includes that the movement direction of the bullet screen to be displayed forms a preset angle with the horizontal direction or the vertical direction. The bullet screen display method provided by the embodiment of the present application can make the bullet screens present a 3D spatial effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a bullet screen display method, device, computer device, and storage medium. Background Art

[0002] Video bullet screen (also known as video marquee) is an instant caption comment function. With the rapid development of the Internet, the video industry (such as live streaming) has become increasingly popular. When users watch videos on video sharing websites, they usually use bullet screens to express personal opinions or increase the fun of watching videos by viewing the bullet screens sent by other users. Since the display effect of bullet screens directly affects the user experience, how to improve the display effect of bullet screens has become a key issue.

[0003] Currently, most existing bullet screens are single-layer bullet screens, and most of them move along the horizontal or vertical direction, unable to present a 3D spatial effect of bullet screens. Summary of the Invention

[0004] The purpose of this application is to provide a bullet screen display method, device, computer device, and storage medium, which are used to solve the technical problem that the current bullet screens cannot present a 3D spatial effect.

[0005] An aspect of an embodiment of this application provides a bullet screen display method, including: obtaining a bullet screen to be displayed; when the bullet screen to be displayed meets a preset placement condition, placing the bullet screen to be displayed into a target bullet screen track of a target bullet screen layer, where the target bullet screen layer is one of several bullet screen layers, and the target bullet screen track is one of the bullet screen tracks in the target bullet screen layer; displaying the bullet screen to be displayed in the target bullet screen track according to the bullet screen configuration, where the bullet screen configuration at least includes that the movement direction of the bullet screen to be displayed forms a preset angle with the horizontal direction or the vertical direction.

[0006] Optionally, the bullet screen configuration further includes the bullet screen movement speed, bullet screen transparency, and bullet screen font size.

[0007] Optionally, the bullet screen configurations of different bullet screen layers are at least partially different. Displaying the bullet screen to be displayed in the target bullet screen track according to the bullet screen configuration includes: displaying the bullet screen to be displayed in the target bullet screen track according to the bullet screen configuration of the target bullet screen layer.

[0008] Optionally, before obtaining the bullet screen to be displayed, it further includes: determining the width of the bullet screen track of each bullet screen layer according to a preset angle, and determining the starting coordinates of each bullet screen track according to the width of the bullet screen track; placing the bullet screen to be displayed into the target bullet screen track of the target bullet screen layer includes: placing the bullet screen to be displayed into the target bullet screen track according to the starting coordinates of the target bullet screen track.

[0009] Optionally, determine the barrage track width of each barrage layer according to a preset angle, and determine the starting coordinate of each barrage track according to the barrage track width, including: determining the minimum barrage track width of each barrage layer according to the preset angle; obtaining the number of barrage tracks of the barrage layer and the size of the barrage display area, and determining the target barrage track width according to the number of barrage tracks and the size of the barrage display area; in the case where the target barrage track width is greater than the minimum barrage track width, determining the starting coordinate of each barrage track according to the target barrage track width.

[0010] Optionally, the method further includes: in the case where the target barrage track width is less than or equal to the minimum barrage track width, determining the starting coordinate of each barrage track according to the minimum barrage track width.

[0011] Optionally, put the barrage to be displayed into the target barrage track according to the starting coordinate of the target barrage track, including: determining the remaining space of the target barrage track according to the minimum barrage track width; determining the starting coordinate of the barrage to be displayed according to the remaining space and the starting coordinate; putting the barrage to be displayed into the target barrage track according to the starting coordinate of the barrage.

[0012] Optionally, determining the minimum barrage track width of each barrage layer according to a preset angle includes: determining the maximum size of the barrage and the size of the barrage display area; determining the minimum barrage track width according to the preset angle, the maximum size of the barrage and the size of the barrage display area.

[0013] Optionally, the preset putting condition includes that there is an empty barrage track or the target distance is not less than the minimum entry distance, and the target distance is the distance between the last barrage in the barrage track and the barrage starting position.

[0014] Optionally, before putting the barrage to be displayed into the target barrage track of the target barrage layer, it further includes: in the case where there are multiple barrage tracks in the target barrage layer that satisfy the condition that the target distance is not less than the minimum distance, determining the barrage track with the maximum target distance as the target barrage track.

[0015] An aspect of the embodiment of the present application further provides a barrage display device, including: an acquisition module, configured to acquire the barrage to be displayed; a putting module, configured to put the barrage to be displayed into the target barrage track of the target barrage layer when the barrage to be displayed meets the preset putting condition, the target barrage layer is one of several barrage layers, and the target barrage track is one of the barrage tracks in the target barrage layer; a display module, configured to display the barrage to be displayed in the target barrage track according to the barrage configuration, and the barrage configuration at least includes that the movement direction of the barrage to be displayed forms a preset angle with the horizontal direction or the vertical direction.

[0016] Another aspect of the embodiments of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it is used to implement the steps of the above-mentioned bullet screen display method.

[0017] Another aspect of the embodiments of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program can be executed by at least one processor, so that at least one processor executes the steps of the above-mentioned bullet screen display method.

[0018] The bullet screen display method, device, computer device and storage medium provided by the embodiments of the present application have the following advantages:

[0019] By obtaining the bullet screen to be displayed, when the bullet screen to be displayed meets the preset placement conditions, the bullet screen to be displayed is placed in the target bullet screen track of the target bullet screen layer, and the bullet screen to be displayed is displayed in the target bullet screen track according to the bullet screen configuration. Since the bullet screens are placed in multiple bullet screen layers, and when the bullet screens are moving, the moving direction forms a preset angle with the horizontal direction or the vertical direction, the bullet screens can present a 3D spatial effect, enriching the expression form of the bullet screens and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 Schematically shows the environmental architecture diagram of the embodiments of the present application;

[0021] Figure 2 Schematically shows the flowchart of the bullet screen display method according to Embodiment 1 of the present application;

[0022] Figure 3 Is an example diagram of bullet screen display;

[0023] Figure 4 Is the flowchart for determining the starting coordinates of the bullet screen track in the bullet screen display method;

[0024] Figure 5 Is a schematic diagram of the principle for determining the minimum bullet screen track width;

[0025] Figure 6 Is an example diagram for determining the starting coordinates of the bullet screen track according to the target bullet screen track width;

[0026] Figure 7 Is an example diagram for determining the starting coordinates of the bullet screen track according to the minimum bullet screen track width;

[0027] Figure 8 Is the flowchart for placing the bullet screen to be displayed into the target bullet screen track in the bullet screen display method;

[0028] Figure 9Schematic diagram of the principle for determining the remaining space of the target bullet screen track;

[0029] Figure 10 Schematic diagram of the principle and process example for putting a new bullet screen into the bullet screen track;

[0030] Figure 11 Schematic diagram of the process example for the bullet screen layer to draw bullet screens;

[0031] Figure 12 Schematically shows the block diagram of the bullet screen display device according to the second embodiment of the present application;

[0032] Figure 13 Schematically shows the hardware architecture diagram of the computer device according to the third embodiment of the present application. Detailed implementation manners

[0033] In order to make the purpose, technical solutions and advantages of the present application clearer, the following further details the present application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the scope of protection of the present application.

[0034] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of technical solutions appears to be contradictory or unable to be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0035] In the description of the present application, it should be understood that the numerical labels before the steps do not identify the order of execution of the steps, but are only used to facilitate the description of the present application and distinguish each step, and thus cannot be understood as a limitation to the present application.

[0036] The following are the term explanations related to the present application:

[0037] Bullet screen layer. To create a real 3D wish bullet screen atmosphere, the bullet screens are drawn in multiple layers, and each layer of bullet screen can have different movement speeds, movement angles, sizes or transparencies, etc.

[0038] Figure 1 Schematically shows the environmental architecture diagram of the embodiments of the present application, as shown in the figure:

[0039] The client 300 is connected to the server 100 via the network 200. The client 300 obtains the bullet screens to be displayed from the server 100, then judges the bullet screens to be displayed, determines whether the bullet screens to be displayed meet the preset placement conditions, and if the bullet screens to be displayed meet the preset conditions, places the bullet screens to be displayed into one of the bullet screen tracks in one of several bullet screen layers, and then displays the bullet screens to be displayed in the bullet screen track according to the bullet screen configuration including at least the bullet screens to be displayed moving at a preset angle with respect to the horizontal or vertical direction, so as to make the multi-layer bullet screens present a 3D spatial effect.

[0040] In an exemplary embodiment, the server 100 may refer to a data center, such as a single house, or distributed in different geographical locations (e.g., in several houses). The server 100 can provide services through one or more networks 200.

[0041] The network 200 includes various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and / or the like. The network 200 can include physical links, such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and / or the like. The network 200 can include wireless links, such as cellular links, satellite links, Wi-Fi links, and / or the like.

[0042] The client 300 can include devices such as mobile devices, tablet devices, laptop computers, smart devices (e.g., smart clothing, smart watches, smart glasses), virtual reality headsets, gaming devices, set-top boxes, digital streaming devices, robots, in-vehicle terminals, smart TVs, TV boxes, or e-book readers.

[0043] In the related art, the bullet screens are single-layer bullet screens and mostly move along the horizontal or vertical direction, and cannot make the bullet screens present a 3D spatial effect.

[0044] The bullet screen display method of the embodiments of the present application can make the bullet screens present a 3D spatial effect, thereby enriching the presentation forms of the bullet screens and improving the user experience.

[0045] The following will introduce the bullet screen display solution through several embodiments. For ease of understanding, the following will take the Figure 1 client 300 therein as the execution subject for exemplary description.

[0046] Embodiment 1

[0047] Figure 2 Schematically shows a flowchart of the bullet screen display method according to Embodiment 1 of the present application, which may include steps S410 to S430, and the specific description is as follows:

[0048] Step S410, obtain the bullet screens to be displayed.

[0049] Step S420, when the bullet screen to be displayed meets the preset placement conditions, place the bullet screen to be displayed into the target bullet screen track of the target bullet screen layer. The target bullet screen layer is one of several bullet screen layers, and the target bullet screen track is one of the bullet screen tracks in the target bullet screen layer.

[0050] Among them, the preset placement conditions can be set according to actual needs and are not specifically limited here. For example, there is an empty bullet screen track in the current bullet screen layer, and there is enough space in the bullet screen track, etc. The number of bullet screen layers and the number of bullet screen tracks can also be set according to actual needs and are not specifically limited here. For example, 3 bullet screen layers can be set, where the number of tracks in the first layer is 2, the number of tracks in the second layer is 3, and the number of track data in the third layer is 6, etc.

[0051] Optionally, each bullet screen layer can separately obtain the bullet screen to be displayed, and then judge the bullet screen to be displayed in the current bullet screen layer. When the bullet screen to be displayed meets the preset placement conditions, place the bullet screen to be displayed into a certain bullet screen track in the current bullet screen layer. Of course, the placement of the bullet screen can also be implemented in other ways, and how to place it specifically can be set according to actual needs and is not specifically limited here.

[0052] Step S430, display the bullet screen to be displayed in the target bullet screen track according to the bullet screen configuration. The bullet screen configuration at least includes that the movement direction of the bullet screen to be displayed forms a preset angle with the horizontal direction or the vertical direction.

[0053] Among them, the preset angle can be set according to actual needs. For example, the movement direction of the bullet screen to be displayed forms an angle of 20 degrees with the vertical direction, and it is not specifically limited here. Optionally, the bullet screen configuration can also include other configurations, such as transparency and other configurations, which are not specifically limited here.

[0054] In an exemplary embodiment, the bullet screen configuration may further include but is not limited to the bullet screen movement speed, bullet screen transparency, and bullet screen font size. It can be understood that by configuring the movement speed, transparency, and font size of the bullet screen to be displayed, the presentation form of the bullet screen to be displayed can be further enriched, improving the user experience.

[0055] In the bullet screen display method of the embodiment of the present application, by obtaining the bullet screen to be displayed, when the bullet screen to be displayed meets the preset placement conditions, placing the bullet screen to be displayed into the target bullet screen track of the target bullet screen layer, and displaying the bullet screen to be displayed in the target bullet screen track according to the bullet screen configuration. Since the bullet screen is placed in multiple bullet screen layers and when the bullet screen moves, the movement direction forms a preset angle with the horizontal direction or the vertical direction, the bullet screen can present a 3D spatial effect, enriching the presentation form of the bullet screen and improving the user experience.

[0056] In an exemplary embodiment, the bullet screen configurations of different bullet screen layers are at least partially different. In step S430, displaying the bullet screen to be displayed in the target bullet screen track according to the bullet screen configuration may include: displaying the bullet screen to be displayed in the target bullet screen track according to the bullet screen configuration of the target bullet screen layer.

[0057] That is, when the client 300 displays the bullet screen to be displayed, it displays according to the bullet screen configuration of the bullet screen layer (target bullet screen layer) corresponding to the bullet screen to be displayed. For example, if the bullet screen transparency in the bullet screen configuration of the target bullet screen layer is 50%, the transparency of the bullet screen to be displayed is set to 50% for display.

[0058] It can be understood that starting from the 3D visual effect, different bullet screen configurations corresponding to different bullet screen layers will result in a better 3D space effect when the bullet screens are displayed. For example, in terms of the visual effect, the "farther" bullet screens should appear smaller. Therefore, setting the font sizes of different bullet screen layers from largest to smallest will make the displayed bullet screens closer to the real 3D space effect. Therefore, preferably, the bullet screen configurations of different bullet screen layers can be all different.

[0059] Please refer to Figure 3 , which is an example diagram of bullet screen display. As shown in the figure, the bullet screen is a wish bullet screen. Different bullet screen configurations such as font size and transparency can be set for different bullet screen layers, so as to make the bullet screen display present a better 3D space effect.

[0060] In this embodiment, the bullet screen configurations of different bullet screen layers are at least partially different. Displaying the bullet screen to be displayed in the target bullet screen track according to the bullet screen configuration of the target bullet screen layer can use different bullet screen configurations to display the bullet screens of different bullet screen layers, so as to make the bullet screen display present a 3D space effect.

[0061] In an exemplary embodiment, before step S410, that is, before obtaining the bullet screen to be displayed, it may further include: determining the bullet screen track width of each bullet screen layer according to a preset angle, and determining the starting coordinates of each bullet screen track according to the bullet screen track width; correspondingly, in step S420, putting the bullet screen to be displayed into the target bullet screen track of the target bullet screen layer includes: putting the bullet screen to be displayed into the target bullet screen track according to the starting coordinates of the target bullet screen track.

[0062] It can be understood that the bullet screens in each bullet screen track move at a preset angle, and it is possible that the bullet screens in one bullet screen track move into other bullet screen tracks and overlap with the bullet screens in other bullet screen tracks. Therefore, the width of the bullet screen tracks of the bullet screen layer is determined according to the preset angle, and the starting coordinates of each bullet screen track are determined according to the width of the bullet screen track. Then, the bullet screen to be displayed is placed into the target bullet screen track according to the starting coordinates of the target bullet screen track, which can reduce the situation where the bullet screens in one bullet screen track move into another bullet screen track, thereby further improving the presentation effect of the bullet screen display.

[0063] In an exemplary embodiment, determining the width of the bullet screen tracks of each bullet screen layer according to the preset angle and determining the starting coordinates of each bullet screen track according to the width of the bullet screen track, as Figure 4 shown, may include steps S510 to S530, specifically as follows:

[0064] Step S510, determining the minimum bullet screen track width of each bullet screen layer according to the preset angle.

[0065] When determining the minimum bullet screen track width of each bullet screen layer, it can be determined according to the movement track of the bullet screen starting from the initial coordinates of the bullet screen track and finally moving out of the bullet screen display area along the preset angle.

[0066] In an exemplary embodiment, step S510 may further include: determining the maximum size of the bullet screen and the size of the bullet screen display area; determining the minimum bullet screen track width according to the preset angle, the maximum size of the bullet screen, and the size of the bullet screen display area.

[0067] Among them, the size of the bullet screen includes the sizes in two directions. One is the size in the text arrangement direction of the bullet screen, such as the vertical direction or the horizontal direction, and the other is the size in the direction perpendicular to the text arrangement direction. The maximum size of the bullet screen corresponds to the maximum size in the text arrangement direction, which can be determined according to the longest input length restricted by the bullet screen. For example, if the bullet screen restricts a maximum of 15 characters to be input, then the maximum size in the text arrangement direction is the size corresponding to inputting 15 characters. At this time, the corresponding size of the bullet screen is the maximum size of the bullet screen. Correspondingly, the size in the direction perpendicular to the text arrangement direction is the height or width corresponding to one character. Taking the bullet screen moving from bottom to top as an example, the text arrangement direction is the vertical direction, and the direction perpendicular to the text arrangement direction is the horizontal direction, corresponding to the width of one character.

[0068] Please refer to Figure 5, which is a schematic diagram of the principle for determining the minimum barrage orbit width. As shown in the figure, the preset angle is θ. The longest barrage starts from the initial coordinate (the leftmost) of the barrage orbit and finally moves outside the barrage display area. At this time, "the minimum barrage orbit width = (the maximum height of the barrage + the height of the barrage display area) * tanθ + the width of the barrage", where the width of the barrage is determined according to the width of the text and is a fixed value.

[0069] It can be understood that Figure 5 in the figure is the case where the barrage moves from bottom to top. If the barrage moves in the left - right direction, then "the minimum barrage orbit width = (the maximum height of the barrage + the width of the barrage display area) * tanθ + the width of the barrage", that is, the width of the barrage display area in the equation replaces the height of the barrage display area. In addition, when determining the minimum barrage orbit width, the height or width in the size of the barrage display area is used.

[0070] In this embodiment, by determining the maximum size of the barrage and the size of the barrage display area, and determining the minimum barrage orbit width according to the preset angle, the maximum size of the barrage and the size of the barrage display area, the critical condition that the barrages in the same barrage layer do not overlap can be determined when the barrages move at the preset angle.

[0071] Step S520: Obtain the number of barrage orbits in the barrage layer and the size of the barrage display area, and determine the target barrage orbit width according to the number of barrage orbits and the size of the barrage display area.

[0072] Among them, the number of barrage orbits in each barrage layer can be set in advance. For example, the number of orbits in the first layer mentioned above is 2, the number of orbits in the second layer is 3, and the number of orbital data in the third layer is 6, etc.

[0073] After obtaining the number of barrage orbits in each barrage layer and the size of the barrage display area, the target barrage orbit width can be determined according to "the target barrage orbit width = the width (or height) of the barrage display area / the number of barrage orbits".

[0074] Step S530: When the target barrage orbit width is greater than the minimum barrage orbit width, determine the starting coordinate of each barrage orbit according to the target barrage orbit width.

[0075] When the target barrage orbit width is greater than the minimum barrage orbit width, it indicates that dividing the barrage orbit according to the target barrage orbit width can ensure that the barrages have enough display space and will not move to other barrage orbits. Therefore, the barrage orbit can be divided according to the target barrage orbit width, and then the starting coordinate of each barrage orbit can be determined on this basis.

[0076] Please refer to Figure 6, which is an example diagram for determining the starting coordinates of the bullet screen track based on the target bullet screen track width. As shown in the figure, when the target bullet screen track width is greater than the minimum bullet screen track width, the bullet screen display area can be directly divided into 3 bullet screen tracks according to the target bullet screen track width, and then on this basis, the starting coordinates of each bullet screen are determined to be (0, 0), (W / 3, 0), and (2W / 3, 0) respectively, and the width ranges of each bullet screen track are (0, W / 3), (W / 3, 2W / 3), and (2W / 3, W).

[0077] In an exemplary embodiment, when the target bullet screen track width is less than or equal to the minimum bullet screen track width, the starting coordinates of each bullet screen track are determined according to the minimum bullet screen track width.

[0078] Please refer to Figure 7 , which is an example diagram for determining the starting coordinates of the bullet screen track based on the minimum bullet screen track width. As shown in the figure, when the target bullet screen track width is less than the minimum bullet screen track width, the width of the drawing area of the bullet screen can be obtained by multiplying the minimum bullet screen track width by the number of bullet screen tracks, and then the starting coordinates of each bullet screen track are determined according to the width of the drawing area. At this time, the abscissa of the starting coordinates of the first bullet screen track will be negative (with the lower left corner of the bullet screen display area as the origin).

[0079] In this embodiment, the minimum bullet screen track width of each bullet screen layer is determined according to a preset angle, the number of bullet screen tracks of the bullet screen layer and the size of the bullet screen display area are obtained, and the target bullet screen track width is determined according to the number of bullet screen tracks and the size of the bullet screen display area. When the target bullet screen track width is greater than the minimum bullet screen track width, determining the starting coordinates of each bullet screen track according to the target bullet screen track width can ensure that when the bullet screens move in the same bullet screen layer, they will not move to other bullet screen tracks and overlap with other bullet screens, thereby further improving the spatial presentation effect of the bullet screens.

[0080] In an exemplary embodiment, putting the bullet screen to be displayed into the target bullet screen track according to the starting coordinates of the target bullet screen track, as Figure 8 shown, may include steps S610 to S630, specifically as follows:

[0081] Step S610, determining the remaining space of the target bullet screen track according to the minimum bullet screen track width.

[0082] Please refer to Figure 9, which is a schematic diagram of the principle for determining the remaining space of the target bullet screen track. As shown in the figure, there are two bullet screen tracks in the current bullet screen layer. Since the bullet screen just won't enter the second bullet screen track when starting from point A, the bullet screen can start from any point between points O and A. The space corresponding to OA is the remaining space. And the distance from point A to point B is actually the minimum bullet screen track width. Correspondingly, the remaining space = bullet screen track width - minimum bullet screen track width. When the bullet screen track width is equal to the minimum bullet screen track width, the remaining space is zero, and the bullet screen can only start from the starting coordinate of the bullet screen track so as not to move into other bullet screen tracks.

[0083] Step S620, determine the bullet screen starting coordinate of the bullet screen to be displayed according to the remaining space and the starting coordinate.

[0084] According to Figure 9 the example, the bullet screen can start from any point between O and A. Therefore, the bullet screen starting coordinate can be the coordinate of any point between O and A. The bullet screen starting coordinate of the bullet screen to be displayed can be determined according to "bullet screen starting coordinate = remaining space * random number + starting coordinate of the bullet screen track", where the value range of the random number is from 0 to 1.

[0085] Step S630, place the bullet screen to be displayed into the target bullet screen track according to the bullet screen starting coordinate.

[0086] In this embodiment, determining the remaining space of the target bullet screen track according to the minimum bullet screen track width, determining the bullet screen starting coordinate of the bullet screen to be displayed according to the remaining space and the starting coordinate, and placing the bullet screen to be displayed into the target bullet screen track according to the bullet screen starting coordinate can make the bullet screen start from any point in the remaining space for display, which has a better bullet screen presentation effect than starting from the same starting point and further improves the user experience.

[0087] In an exemplary embodiment, the preset placement condition includes that there is an empty bullet screen track or the target distance is not less than the minimum entry distance, and the target distance is the distance between the last bullet screen in the bullet screen track and the bullet screen starting position.

[0088] Among them, the minimum entry distance can be the minimum distance between two bullet screens set in advance. The target distance can be determined according to "target distance = (current time - appearance time of A) * bullet screen movement speed - size of A", where A is the last bullet screen, and the size of A can be the height or width of the bullet screen.

[0089] Please refer to Figure 10, which is an example diagram of the principle and process of putting new bullet screens into the bullet screen track. As shown in the figure, if there is an empty bullet screen track in the current bullet screen layer, it enters the empty bullet screen track; if there is no empty bullet screen track, it is determined whether the target distance of the X bullet screen track is greater than or equal to the minimum entry distance, which can also be the judgment in the figure "the moving distance of the last bullet in the X bullet screen track > bullet screen height + minimum distance between bullet screens"; if there is a condition that the bullet screen track is full, it is put into the corresponding bullet screen track; if all bullet screen tracks do not meet the conditions, the bullet screen is skipped.

[0090] In an exemplary embodiment, when there are multiple bullet screen tracks in the target bullet screen layer that satisfy the condition that the target distance is not less than the minimum distance, the bullet screen track with the largest target distance is determined as the target bullet screen track. Of course, when there are multiple bullet screen tracks in the target bullet screen layer that satisfy the condition that the target distance is not less than the minimum distance, one of the bullet screen tracks that meet the conditions can be randomly selected as the target bullet screen track; and determining the bullet screen track with the largest target distance as the target bullet screen track can make the display of the bullet screen more reasonable and is conducive to improving the display effect of the bullet screen.

[0091] The following uses a specific example to illustrate the process of drawing bullet screens in multiple bullet screen layers, as Figure 11 shown, and its process is roughly as follows:

[0092] 1. Start;

[0093] 2. Obtain the width w, height h of the bullet screen display area and the number of bullet screen layers n;

[0094] 3. Determine whether the number of bullet screen layers i is less than n. If so, enter 4; otherwise, enter 6;

[0095] 4. Calculate the starting coordinates of each bullet screen track in this bullet screen layer according to the number of bullet screen tracks and the bullet screen movement angle (i.e., the preset angle);

[0096] 5. i++, return to 3;

[0097] 6. Start rendering each bullet screen layer;

[0098] 7. Take out j bullet screens, starting from the first bullet screen, index = 0;

[0099] 8. Determine whether index is less than j. If so, enter 9; otherwise, enter 12;

[0100] 9. Calculate whether this bullet screen can enter the bullet screen track. If so, enter 10; otherwise, skip this bullet screen and enter 11;

[0101] 10. Calculate the X coordinate (i.e., the starting coordinate of the bullet screen) when this bullet screen is added;

[0102] 11. index++, return to 8;

[0103] 12. End.

[0104] Among them, 6 - 11 are the drawing processes of a single bullet screen layer. When taking out j bullet screens, it can be carried out according to the process on the right side of the figure, that is:

[0105] 1. Start;

[0106] 2. Determine whether the last page of bullet screens has been obtained. If so, enter 5; otherwise, enter 3;

[0107] 3. Obtain the latest page of bullet screens from the server;

[0108] 4. Wait for 1S and return to 2;

[0109] 5. End.

[0110] Among them, the 1S interval in 4 is to reduce the pressure on the server, and it can also be set to other seconds. The 1S in the figure is only an example.

[0111] Embodiment 2

[0112] Figure 12 The block diagram of the bullet screen display device 700 according to Embodiment 2 of the present application is schematically shown. The bullet screen display device 700 can be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can complete specific functions. The functions of each program module in this embodiment will be specifically introduced below.

[0113] As Figure 12 shown, the bullet screen display device 700 may include an acquisition module 710, a placement module 720, and a display module 730.

[0114] The acquisition module 710 is used to acquire the bullet screens to be displayed;

[0115] The placement module 720 is used to place the bullet screens to be displayed into the target bullet screen track of the target bullet screen layer when the bullet screens to be displayed meet the preset placement conditions. The target bullet screen layer is one of several bullet screen layers, and the target bullet screen track is one of the bullet screen tracks in the target bullet screen layer;

[0116] The display module 730 is used to display the bullet screens to be displayed in the target bullet screen track according to the bullet screen configuration. The bullet screen configuration at least includes that the movement direction of the bullet screens to be displayed forms a preset angle with the horizontal direction or the vertical direction.

[0117] In an exemplary embodiment, the bullet screen configuration further includes the bullet screen movement speed, bullet screen transparency, and bullet screen font size.

[0118] In an exemplary embodiment, the bullet screen configurations of different bullet screen layers are at least partially different, and the display module 730 is further configured to: display the bullet screens to be displayed in the target bullet screen track according to the bullet screen configuration of the target bullet screen layer.

[0119] In an exemplary embodiment, the placing module 720 is further configured to: determine the width of the bullet screen track of each bullet screen layer according to a preset angle, and determine the starting coordinate of each bullet screen track according to the width of the bullet screen track; place the bullet screens to be displayed into the target bullet screen track according to the starting coordinate of the target bullet screen track.

[0120] In an exemplary embodiment, the placing module 720 is further configured to: determine the minimum bullet screen track width of each bullet screen layer according to a preset angle; obtain the number of bullet screen tracks of the bullet screen layer and the size of the bullet screen display area, and determine the target bullet screen track width according to the number of bullet screen tracks and the size of the bullet screen display area; when the target bullet screen track width is greater than the minimum bullet screen track width, determine the starting coordinate of each bullet screen track according to the target bullet screen track width.

[0121] In an exemplary embodiment, the placing module 720 is further configured to: when the target bullet screen track width is less than or equal to the minimum bullet screen track width, determine the starting coordinate of each bullet screen track according to the minimum bullet screen track width.

[0122] In an exemplary embodiment, the placing module 720 is further configured to: determine the remaining space of the target bullet screen track according to the minimum bullet screen track width; determine the bullet screen starting coordinate of the bullet screens to be displayed according to the remaining space and the starting coordinate; place the bullet screens to be displayed into the target bullet screen track according to the bullet screen starting coordinate.

[0123] In an exemplary embodiment, the placing module 720 is further configured to: determine the maximum size of the bullet screens and the size of the bullet screen display area; determine the minimum bullet screen track width according to a preset angle, the maximum size of the bullet screens, and the size of the bullet screen display area.

[0124] In an exemplary embodiment, the preset placing condition includes that there is an empty bullet screen track or the target distance is not less than the minimum entry distance, where the target distance is the distance between the last bullet screen in the bullet screen track and the bullet screen starting position.

[0125] In an exemplary embodiment, the placing module 720 is further configured to: when there are multiple bullet screen tracks in the target bullet screen layer that satisfy the condition that the target distance is not less than the minimum distance, determine the bullet screen track with the maximum target distance as the target bullet screen track.

[0126] Embodiment III

[0127] Figure 13FIG. schematically shows a hardware architecture diagram of a computer device 800 suitable for a bullet screen display method according to Embodiment 3 of the present application. The computer device 800 can be a device capable of automatically performing numerical calculations and / or data processing according to pre-set or stored instructions. For example, it can be a rack server, a blade server, a tower server, or a cabinet server (including an independent server or a server cluster composed of multiple servers), a gateway, etc. As Figure 13 shown, the computer device 800 at least includes, but is not limited to: a memory 810, a processor 820, and a network interface 830 that can be communicatively linked to each other through a system bus. Among them:

[0128] The memory 810 at least includes one type of computer-readable storage medium. The readable storage medium includes flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 810 can be an internal storage module of the computer device 800, such as the hard disk or memory of the computer device 800. In other embodiments, the memory 810 can also be an external storage device of the computer device 800, such as a plug-in hard disk equipped on the computer device 800, a smart media card (abbreviated as SMC), a secure digital (abbreviated as SD) card, a flash card, etc. Of course, the memory 810 can also include both the internal storage module and the external storage device of the computer device 800. In this embodiment, the memory 810 is generally used to store the operating system and various application software installed on the computer device 800, such as the program code of the bullet screen display method. In addition, the memory 810 can also be used to temporarily store various data that have been output or will be output.

[0129] In some embodiments, the processor 820 can be a central processing unit (abbreviated as CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 820 is generally used to control the overall operation of the computer device 800, such as performing control and processing related to data interaction or communication with the computer device 800. In this embodiment, the processor 820 is used to run the program code stored in the memory 810 or process data.

[0130] The network interface 830 may include a wireless network interface or a wired network interface, which is generally used to establish a communication link between the computer device 800 and other computer devices. For example, the network interface 830 is used to connect the computer device 800 to an external terminal through a network, and establish a data transmission channel and a communication link between the computer device 800 and the external terminal. The network may be a wireless or wired network such as an enterprise intranet (Intranet), the Internet, Global System of Mobile communication (abbreviated as GSM), Wideband Code Division Multiple Access (abbreviated as WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.

[0131] It should be noted that Figure 13 Only the computer device with components 810 - 830 is shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively.

[0132] In this embodiment, the bullet screen display method stored in the memory 810 can also be divided into one or more program modules and executed by one or more processors (processor 820 in this embodiment) to complete the embodiments of the present application.

[0133] Embodiment 4

[0134] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the bullet screen display method in the embodiments are implemented.

[0135] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the computer-readable storage medium may be an internal storage unit of the computer device, such as the hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a Smart Media Card (SMC for short), a Secure Digital (SD for short) card, a Flash Card, etc. Of course, the computer-readable storage medium may also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer-readable storage medium is generally used to store the operating system and various application software installed on the computer device, such as the program code of the barrage display method in the embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various data that have been output or will be output.

[0136] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the embodiments of the present application can be implemented by a general computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device, so that they can be stored in the storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0137] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.

Claims

1. A bullet screen display method, characterized in that, Including: Obtain the bullet screens to be displayed; When the bullet screens to be displayed meet the preset placement conditions, put the bullet screens to be displayed into the target bullet screen track of the target bullet screen layer, where the target bullet screen layer is one of several bullet screen layers, and the target bullet screen track is one of the bullet screen tracks in the target bullet screen layer; Display the bullet screens to be displayed in the target bullet screen track according to the bullet screen configuration, and the bullet screen configuration at least includes that the moving direction of the bullet screens to be displayed forms a preset angle with the horizontal direction or the vertical direction; Wherein, before obtaining the bullet screens to be displayed, it further includes: Determine the bullet screen track width of each bullet screen layer according to the preset angle, and determine the starting coordinates of each bullet screen track according to the bullet screen track width; The step of putting the bullet screens to be displayed into the target bullet screen track of the target bullet screen layer includes: Put the bullet screens to be displayed into the target bullet screen track according to the starting coordinates of the target bullet screen track.

2. The bullet screen display method according to claim 1, wherein The bullet screen configuration further includes the bullet screen moving speed, bullet screen transparency, and bullet screen font size.

3. The bullet screen display method according to claim 2, wherein The bullet screen configurations of different bullet screen layers are at least partially different. The step of displaying the bullet screens to be displayed in the target bullet screen track according to the bullet screen configuration includes: Display the bullet screens to be displayed in the target bullet screen track according to the bullet screen configuration of the target bullet screen layer.

4. The bullet screen display method according to claim 1, characterized in that The step of determining the bullet screen track width of each bullet screen layer according to the preset angle and determining the starting coordinates of each bullet screen track according to the bullet screen track width includes: Determine the minimum bullet screen track width of each bullet screen layer according to the preset angle; Obtain the number of bullet screen tracks of the bullet screen layer and the size of the bullet screen display area, and determine the target bullet screen track width according to the number of bullet screen tracks and the size of the bullet screen display area; When the target bullet screen track width is greater than the minimum bullet screen track width, determine the starting coordinates of each bullet screen track according to the target bullet screen track width.

5. The bullet screen display method according to claim 4, wherein It further includes: When the target bullet screen track width is less than or equal to the minimum bullet screen track width, determine the starting coordinates of each bullet screen track according to the minimum bullet screen track width.

6. The bullet screen display method according to claim 4, wherein The step of putting the bullet screens to be displayed into the target bullet screen track according to the starting coordinates of the target bullet screen track includes: Determine the remaining space of the target bullet screen track according to the minimum bullet screen track width; Determine the bullet screen starting coordinates of the bullet screens to be displayed according to the remaining space and the starting coordinates; Put the bullet screens to be displayed into the target bullet screen track according to the bullet screen starting coordinates.

7. The bullet screen display method according to claim 4, wherein The step of determining the minimum bullet screen track width of each bullet screen layer according to the preset angle includes: Determine the maximum size of the bullet screen and the size of the bullet screen display area; Determine the minimum bullet screen track width according to the preset angle, the maximum size of the bullet screen, and the size of the bullet screen display area.

8. The bullet screen display method according to any one of claims 1-7, characterized in that The preset placement conditions include that there is an empty bullet screen track or the target distance is not less than the minimum entry distance, and the target distance is the distance between the last bullet screen in the bullet screen track and the bullet screen starting position.

9. The bullet screen display method according to claim 8, wherein Before putting the to-be-displayed bullet screen into the target bullet screen track of the target bullet screen layer, it further includes: When there are multiple bullet screen tracks in the target bullet screen layer that satisfy the condition that the target distance is not less than the minimum entry distance, determine the bullet screen track with the maximum target distance as the target bullet screen track.

10. A bullet screen display device, characterized in that, It includes: An acquisition module, configured to acquire the to-be-displayed bullet screen; A putting module, configured to put the to-be-displayed bullet screen into the target bullet screen track of the target bullet screen layer when the to-be-displayed bullet screen meets the preset putting conditions, where the target bullet screen layer is one of several bullet screen layers, and the target bullet screen track is one of the bullet screen tracks in the target bullet screen layer; A display module, configured to display the to-be-displayed bullet screen in the target bullet screen track according to the bullet screen configuration, where the bullet screen configuration at least includes that the moving direction of the to-be-displayed bullet screen forms a preset angle with the horizontal direction or the vertical direction; Among them, before acquiring the to-be-displayed bullet screen, it further includes: Determine the bullet screen track width of each bullet screen layer according to the preset angle, and determine the starting coordinates of each bullet screen track according to the bullet screen track width; The putting the to-be-displayed bullet screen into the target bullet screen track of the target bullet screen layer includes: Put the to-be-displayed bullet screen into the target bullet screen track according to the starting coordinates of the target bullet screen track.

11. A computer device, the computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it is used to implement the steps of the bullet screen display method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the computer program can be executed by at least one processor, so that the at least one processor executes the steps of the bullet screen display method according to any one of claims 1 to 9.

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

Citation Information

Patent Citations

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

    CN111796825A