Method and apparatus for processing barrage in game

By encapsulating the barrage function into a barrage toolkit and calling the toolkit on the game terminal, the problems of high cost and low efficiency of the barrage system in the prior art are solved, and the barrage function of fast access and efficient use is realized.

WO2025123757A1PCT designated stage expired Publication Date: 2025-06-19SHANGHAI HODE INFORMATION TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/113544
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-15
Filing Date
2024-08-21
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

In existing games, since the barrage system involves multi-terminal services, the construction and configuration costs are high, and the access time of a single game is high, resulting in inefficient development and use of game-based barrage functions.

Method used

Encapsulate the barrage function into a barrage toolkit, and call the toolkit on the target game terminal, receive and render barrage data from the barrage server, draw barrage view layer, and display it in the specified area of ​​the game interface.

Benefits of technology

It realizes the call of the barrage function without sensing the internal process, and quickly access the barrage function, which improves the development and use efficiency and effectively saves costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024113544_19062025_PF_FP_ABST
    Figure CN2024113544_19062025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present application is a method for processing a barrage in a game, which method is used in a target game terminal configured with a barrage toolkit. The method comprises: when a barrage toolkit is in a called state, receiving, by means of the barrage toolkit, barrage data distributed by a barrage server; rendering the barrage data in the barrage toolkit, so as to draw a barrage view layer; and presenting the barrage view layer on a game interface, so as to display barrage content in a specified area on the game interface. The technical solution in the embodiments of the present application can facilitate a game in quickly accessing a barrage function by means of directly calling a barrage toolkit, thereby improving the development and usage efficiency of the game-based barrage function, and thus saving on the cost.
Need to check novelty before this filing date? Find Prior Art

Description

Method and device for processing barrage in games

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on December 15, 2023, with application number 202311741229.6, and invention name “Method and device for processing barrage in games”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of barrage technology, and in particular, to a method, apparatus, computer device, and computer-readable storage medium for processing barrage in a game. Background Art

[0003] With the rapid development of video technology, more and more users can watch various video programs through the Internet. In the process of watching video programs, users can interact with the host or other users by sending barrages. The barrage refers to the subtitles that pop up and move in a predetermined direction when watching videos through the Internet. It is a form of communication information. There is no fixed word for barrage in English. It is usually called: comment, danmaku, barrage, bullet screen, bullet-screen comment, etc. Barrage allows users to post comments or thoughts, but unlike ordinary video sharing websites that only display them in a dedicated comment area under the player, it will appear in real time on the video screen in the form of sliding subtitles to ensure that all viewers can notice it.

[0004] In existing games, the barrage system involves multi-terminal services, and the cost of building the barrage system and configuring the barrage server is high, and the time cost of accessing a single game is high, which makes the development and use of the game-based barrage function inefficient.

[0005] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a method, apparatus, computer device, and computer-readable storage medium for processing bullet comments in a game to solve or alleviate one or more of the technical problems raised above.

[0008] One aspect of an embodiment of the present application provides a method for processing bullet comments in a game, the method being used for a target game terminal configured with a bullet comment toolkit; the method comprising:

[0009] When the bullet chat toolkit is in the calling state, the bullet chat data distributed by the bullet chat server is received through the bullet chat toolkit;

[0010] Rendering the bullet chat data in the bullet chat toolkit to draw the bullet chat view layer;

[0011] The bullet screen view layer is displayed on the game interface to display the bullet screen content in a designated area of ​​the game interface.

[0012] Optionally, rendering the barrage data in a barrage toolkit includes:

[0013] Parsing the barrage data using a barrage toolkit to obtain a target barrage type;

[0014] According to the target barrage type, create a barrage parser corresponding to the target barrage type;

[0015] The barrage data is parsed by a corresponding barrage parser to obtain barrage data of the target type to be rendered for rendering.

[0016] Optionally, the number of the barrage data is multiple;

[0017] Correspondingly, the distributed bullet chat data is rendered in the bullet chat toolkit to draw the bullet chat view layer, including:

[0018] Get the preset display quantity of the bullet screen view layer;

[0019] Determining, from the plurality of barrage data, a plurality of barrage data whose display time is within a target time period;

[0020] Merging at least part of the plurality of bullet chat data into one view layer according to the preset display quantity;

[0021] Based on the same view layer, at least part of the bullet comment data is rendered to be drawn on the same bullet comment view layer.

[0022] Optionally, the method further includes:

[0023] When the bullet comment toolkit is in a calling state, the bullet comment content is transmitted to the bullet comment toolkit;

[0024] Get the target barrage data by encapsulating the barrage content through the barrage toolkit;

[0025] The target bullet screen data is sent to the bullet screen server through the bullet screen toolkit, so that the bullet screen server processes the target bullet screen data and distributes it.

[0026] Optionally, the barrage toolkit is configured with barrage configuration data; correspondingly, the step of obtaining target barrage data by encapsulating the barrage content through the barrage toolkit includes:

[0027] The barrage toolkit is used to encapsulate the barrage content according to the barrage configuration data to obtain target barrage data.

[0028] Optionally, the barrage configuration data is obtained in advance from the barrage server;

[0029] The method also includes an initialization operation:

[0030] Create a bullet screen view layer and generate a bullet screen parameter configuration request through the bullet screen toolkit;

[0031] When the bullet screen toolkit establishes a connection with the bullet screen server, a bullet screen parameter configuration request is sent to the bullet screen server, so that the bullet screen server returns the bullet screen configuration data according to the bullet screen parameter configuration request.

[0032] Optionally, the bullet screen configuration data is obtained by the bullet screen server through the following operations:

[0033] Obtain object data of a target object associated with a target game terminal from a game server;

[0034] Generate the corresponding bullet screen configuration data for the target object according to the object data of the target object.

[0035] Optionally, the bullet screen configuration data is obtained through input from the target game terminal.

[0036] Optionally, the target barrage data carries a group identifier;

[0037] The group identifier is used to instruct the bullet screen server to send the target bullet screen data to the game terminals of the designated group.

[0038] Optionally, the barrage toolkit includes:

[0039] The barrage logic engine module includes a barrage underlying rendering module, a barrage scheduling module, and a barrage creation module; wherein the barrage underlying rendering module is responsible for the underlying rendering logic of the barrage data, the barrage scheduling module is responsible for receiving and sending the barrage data, and the barrage scheduling module is used to create the main body of the barrage data;

[0040] The bullet screen rendering module is used to render the bullet screen data; wherein, the bullet screen rendering module includes an interpreter module, a layer drawing module, and a bullet screen view layer creation and display module.

[0041] Another aspect of an embodiment of the present application provides a device for processing bullet comments in a game, the device comprising:

[0042] The receiving module is used to receive the barrage data distributed by the barrage server through the barrage toolkit when the barrage toolkit is in the calling state;

[0043] A rendering module, used to render the barrage data in the barrage toolkit to draw the barrage view layer;

[0044] The display module is used to display the bullet screen view layer on the game interface to display the bullet screen content in a designated area of ​​the game interface.

[0045] Another aspect of an embodiment of the present application provides a computer device, including:

[0046] at least one processor; and

[0047] a memory communicatively coupled to the at least one processor;

[0048] Wherein: the memory stores computer-readable instructions that can be executed by the at least one processor, and the computer-readable instructions are executed by the at least one processor to enable the at least one processor to perform the method described above.

[0049] Another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method described above is implemented.

[0050] The above technical solution adopted in the embodiments of the present application may have the following advantages:

[0051] The barrage function is encapsulated into a barrage toolkit and the barrage toolkit is set on the target game terminal. When the target game terminal needs to display the barrage, it can directly call the barrage toolkit to receive the barrage from the barrage server and complete the rendering of the barrage, thereby drawing the corresponding barrage view layer. The barrage view layer is then displayed on the game interface to display the barrage content on the game interface. That is, the call of the barrage function is completed without perceiving the internal process. It can be seen that when the game needs to display the barrage, it can directly call the barrage toolkit to help the game quickly access the barrage function. In addition, the barrage function is encapsulated in the barrage toolkit, so that the barrage function can be provided to the game development end in the form of an SDK product, providing the game development end with a ready-to-use barrage function, improving the development and use efficiency of the game-based barrage function, and effectively saving costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.

[0053] FIG1 schematically shows an operating environment diagram of a bullet comment processing method in a game according to a first embodiment of the present application;

[0054] FIG2 schematically shows a flow chart of a method for processing bullet comments in a game according to the first embodiment of the present application;

[0055] FIG3 schematically shows a flow chart of sub-steps of step S202 in FIG2 ;

[0056] FIG4 schematically shows a flowchart of another sub-step of step S202 in FIG2 ;

[0057] FIG5 schematically shows a flowchart of newly added steps of the method for processing bullet comments in a game according to the first embodiment of the present application;

[0058] FIG6 schematically shows a flowchart of newly added steps of the method for processing bullet comments in a game according to the first embodiment of the present application;

[0059] FIG7 schematically shows a flowchart of newly added steps of the method for processing bullet comments in a game according to the first embodiment of the present application;

[0060] FIG8 schematically shows a packaging structure diagram of a bullet screen toolkit.

[0061] 9 and 10 schematically illustrate application examples of the method for processing bullet comments in a game according to the first embodiment of the present application;

[0062] FIG11 schematically shows a block diagram of a bullet comment processing device in a game according to a second embodiment of the present application;

[0063] FIG12 schematically shows a hardware architecture diagram of a computer device according to the third embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of this application more clear, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0065] It should be noted that the descriptions of "first", "second", etc. in the embodiments of the present application are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0066] In the description of this application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed. They are only used to facilitate the description of this application and to distinguish each step. Therefore, they cannot be understood as limitations on this application.

[0067] First, an explanation of the terms used in this application is provided:

[0068] Danmu: Subtitles that pop up and move in a predetermined direction when watching a video online. There's no fixed term for "danmu" in English yet, but it can be called something like comment, danmaku, barrage, bullet screen, or bullet-screen comment. Danmu allows viewers to leave comments or thoughts, but unlike regular video sharing websites where comments are only displayed in a dedicated comment area below the player, it appears in real-time as sliding subtitles on the video screen, ensuring that all viewers can notice them. Danmu can be managed through a Danmu system. Some Danmu systems can use CSS (Cascading Style Sheets) or JavaScript to provide specific Danmu formats, such as allowing Danmu to appear or disappear at specific locations, controlling the speed at which Danmu pops up, and controlling Danmu's location. In addition, Danmu that appears fixed at the bottom or top of the screen can also be used as subtitles for videos without subtitles.

[0069] For example, the data structure of a bullet comment can be as follows:

[0070] {

[0071] The time of emission in the video is in seconds;

[0072] Type of barrage;

[0073] The size of the barrage text;

[0074] The color of the barrage text;

[0075] Date the comment was created;

[0076] The class name of the barrage;

[0077] The user ID that created the barrage;

[0078] Bullet chat identifier (e.g., bullet chat group identifier);

[0079] Bullet comment content (e.g., text, images, controls);

[0080] The duration of the barrage;

[0081] Whether the bullet screen has a border;

[0082] The color of the bullet screen border;

[0083] The interline style of the barrage;

[0084] }

[0085] SDK (Software Development Kit): A package that integrates a series of tools, libraries, sample codes, documentation and other resources designed to help developers create, test and deploy specific software applications, frameworks or platforms.

[0086] Game SDK: It integrates a collection of functions such as account registration, login, recharge, game announcements, gift packs, and data reporting, helping game manufacturers complete the business packaging of common functions, allowing game manufacturers to focus on game content research and development.

[0087] A layer manages the visual content of a view, including its background, borders, shadows, and the composition of its subviews. A layer is the actual drawable part of the view hierarchy and can contain drawn content and properties for animation.

[0088] Secondly, to facilitate those skilled in the art to understand the technical solutions provided in the embodiments of the present application, the following describes the relevant technologies:

[0089] With the rapid development of video technology, more and more users can watch various video programs through the Internet. During the viewing of video programs, users can interact with the host or other users by sending barrage comments.

[0090] However, in gaming, the barrage system involves multiple services, and the high cost of building and configuring the barrage server, coupled with the long time required to connect to a single game, makes the development and use of barrage features in gaming inefficient. Furthermore, in mobile games, rendering a large number of barrages simultaneously can cause them to freeze, impacting the user experience.

[0091] The embodiment of the present application provides a technical solution for processing barrage in games. In this technical solution, (1) the barrage function (such as the functions of publishing, receiving, and displaying barrage) is encapsulated into an SDK, and the SDK is provided to game developers in the form of a product, providing the game with an immediately available barrage function, so that the game can complete the call of the barrage function without being aware of the internal process. (2) By merging multiple barrage view levels in advance, multiple barrages are displayed in the same view, reducing the rendering work of the GPU (Graphics Processing Unit), thereby solving the problem of the game rendering a large number of barrages. See below for details.

[0092] Finally, for ease of understanding, an exemplary operating environment is provided below.

[0093] As shown in FIG1 , the environment application diagram includes: a bullet screen server 2 , a game terminal 4 , and a game server 6 .

[0094] The barrage server 2 can be connected to the game terminal 4 and the game server 6 via a network. The barrage server 2 can provide various content and barrage services for the game terminal. For example, the barrage data is sent to the game terminal via the network. The network may include various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices and / or the like. The network may include physical links, such as coaxial cable links, twisted pair cable links, optical fiber links, combinations thereof, etc. The network may include wireless links, such as cellular links, satellite links, Wi-Fi links, etc.

[0095] The bullet screen server 2 can be a single server, a server cluster or a cloud computing service center, which is used to provide various services. For example:

[0096] The barrage server 2 can provide content services. Among them, the content service can be configured to provide content such as video, audio, text data and combinations thereof. The content may include content streams (e.g., video streams, audio streams, information streams), content files (e.g., video files, audio files, text files) and / or other data. The barrage server 2 can be configured to manage messages for various content items. Users can browse content and access different content items to view comments on specific content, such as comments posted by other users on the specific content. Comments from users associated with a specific content item can be output to other users who view the specific content item. For example, all users who access a content item (e.g., a video) can view comments associated with the content item. The input comment content can be output in real time or near real time. The barrage server 2 can be configured to receive multiple messages. The multiple messages may include multiple barrages associated with the content.

[0097] The bullet screen server 2 can be configured to process multiple messages, for example, various processing operations such as message storage, message filtering, and message push. Message storage is used to store multiple messages in a data storage such as a database. Message filtering can include rejecting or marking messages that match filtering criteria. The filtering criteria can specify terms and / or phrases, such as profanity, hate speech, and indecent language. The filtering criteria can specify characters, such as symbols, fonts, etc. The filtering criteria can specify languages, computer-readable code patterns, etc.

[0098] The barrage server 2 can perform natural language processing, topic recognition, pattern recognition, artificial intelligence, etc. to automatically determine the characteristics of the message and / or group the messages. As an example, frequently occurring phrases or patterns can be identified as topics. As another example, a database of topics associated with the content can be maintained. Topics can include genres (e.g., action, drama, comedy), personalities (e.g., actors, actresses, directors), languages, etc. Messages can be grouped based on the characteristics of the game terminal device and / or the user sending the message. Demographics, interests, history, and / or the like can be stored for multiple users to determine potential groups of messages. For example, the barrages uploaded by each user can be screened, filtered, sorted, and personalized push notifications can be performed.

[0099] The barrage server 2 can provide a barrage distribution service, which is configured to allow users to comment and / or share comments associated with the content (i.e., barrage). The barrage is presented on the same screen as the content. The barrage can be displayed in an overlay above the content and can have animation effects. For example, the barrage can scroll (e.g., from right to left, from left to right, from top to bottom, ...), and the animation effect can be implemented based on the transition property of CSS3.

[0100] The bullet screen server 2 can also provide a bullet screen configuration parameter generation service for generating corresponding bullet screen configuration parameters for the game terminal.

[0101] The game terminal 4 can be configured to access the content and services of the barrage server 2. The game terminal 4 may include an electronic device that carries or is connected to a display panel, such as a mobile device, a tablet device, a laptop computer, a workstation, a virtual reality device, a gaming device, a digital streaming device, a vehicle gaming terminal, a smart TV, a set-top box, etc., and may also include a virtualized computing instance. The virtualized computing instance may include a virtual machine, such as a simulation of a computer system, an operating system, a server, etc. The game terminal 4 can be associated with one or more users. A single user can also use one or more of the game terminals 4 to access the barrage server 2. The game terminal 4 can travel to various locations and use different networks to access the barrage server 2.

[0102] The game terminal 4 may include a game program and a barrage toolkit that encapsulates barrage functions, etc. In this embodiment, the barrage provided by the barrage service end 2 is processed and displayed on the game interface by directly calling the barrage toolkit. In this embodiment, the game terminal 4 can obtain immediately available barrage functions such as the release, reception, and display of barrages through the barrage toolkit, and then present the barrage content in a specific manner on the game interface of the game terminal. The game terminal may include an interface, which may include a touchpad, a touch screen, a mouse, a keyboard or other sensing elements. For example, the input element may be configured to receive user instructions, which may enable the game terminal to perform various operations, such as inputting barrages, inputting configuration parameters for barrages, etc.

[0103] The game server 6 can be a single server, a server cluster, or a cloud computing service center, and is used to provide various game services, such as user management and game data management. Furthermore, the game server can interact with the bullet screen server 2, for example, providing user data of game users to the bullet screen server 2, so that the bullet screen server 2 generates corresponding bullet screen configuration data and group IDs for the game terminals.

[0104] It should be noted that the above devices are exemplary, and the number and type of devices can be adjusted in different scenarios or according to different needs.

[0105] The following describes the technical solutions of the present application using a target game terminal (game terminal 4) as the execution subject through multiple embodiments. It should be noted that these embodiments can be implemented in a variety of different forms and should not be construed as being limited to the embodiments described herein.

[0106] Example 1

[0107] FIG2 schematically shows a flow chart of a method for processing bullet screen in a game according to the first embodiment of the present application. The method for processing bullet screen in the game can be used in a target game terminal 4, which is equipped with a bullet screen toolkit. As shown in FIG2 , the method for processing bullet screen in the game may include steps S200 to S204, wherein:

[0108] Step S200: When the bullet screen toolkit is in a calling state, the bullet screen data distributed by the bullet screen server is received through the bullet screen toolkit.

[0109] Step S202: Render the bullet comment data in the bullet comment toolkit to draw a bullet comment view layer.

[0110] Step S204: display the bullet screen view layer on the game interface to display the bullet screen content in a designated area of ​​the game interface.

[0111] The barrage processing method in the game provided by this embodiment encapsulates the barrage function into a barrage toolkit and sets the barrage toolkit on the target game terminal 4. When the target game terminal 4 needs to display the barrage, it can directly call the barrage toolkit to receive the barrage from the barrage server 2 and complete the rendering of the barrage, thereby drawing the corresponding barrage view layer. The barrage view layer is then displayed on the game interface to display the barrage content on the game interface. That is, the call of the barrage function is completed without perceiving the internal process. It can be seen that when the game needs to display the barrage, it can directly help the game quickly access the barrage function by calling the barrage toolkit. In addition, the barrage function is encapsulated in the barrage toolkit, so that the barrage function can be provided to the game development end in the form of an SDK product, providing the game development end with an immediately available barrage function, improving the development and use efficiency of the game-based barrage function, and effectively saving costs.

[0112] The following describes in detail each step in steps S200 to S204 and other optional steps in conjunction with FIG. 2 .

[0113] Step S200: When the bullet screen toolkit is in a calling state, the bullet screen data distributed by the bullet screen server 2 is received through the bullet screen toolkit.

[0114] The barrage toolkit (also known as barrage SDK) can provide a call entry by opening the barrage interface and provide the barrage function for the target game terminal 4. The barrage function can include receiving, rendering, publishing, and displaying barrages.

[0115] In an exemplary application, the barrage toolkit may provide various interfaces such as an interface for opening a barrage and an interface for sending a barrage.

[0116] (1) Before the scene where the bullet screen needs to be displayed, you can call: open the bullet screen interface.

[0117] When the barrage interface is called, the barrage toolkit will be initialized to implement the personalized configuration of the barrage function.

[0118] (2) When sending a bullet screen scene, the game can call the send bullet screen interface.

[0119] When the barrage sending interface is called, the barrage toolkit will encapsulate, send, and receive receipts of the barrage.

[0120] As shown in Figure 1, the bullet chat server 2 can receive bullet chat data from various game terminals and distribute the bullet chat data. Specifically, after receiving bullet chat data sent by a game terminal, the bullet chat server 2 can send the bullet chat data to multiple game terminals. For example, after receiving bullet chat data a sent by the target game terminal 4 in chat group 1, the bullet chat server 2 can distribute the bullet chat data a to all game terminals in the chat group.

[0121] Step S202: Render the bullet comment data in the bullet comment toolkit to draw a bullet comment view layer.

[0122] Rendering is the process of converting bullet message content (such as graphics, text, or other data) into visible images.

[0123] The bullet screen view layer refers to a specific layer that displays bullet screens on the game interface. Through the bullet screen view layer, the display effects of bullet screens can be effectively controlled and managed, such as: (1) Display position: such as the bottom, top, or other specified positions of the game interface. (2) Bullet screen style: such as size, color, border, etc. (3) Bullet screen duration: the time the bullet screen stays on the game interface. (4) Bullet screen animation effects: such as the entry, movement, and exit effects of the bullet screen.

[0124] There may be many types of bullet comments. In order to efficiently and correctly parse each bullet comment and use it for rendering, an optional embodiment is provided below.

[0125] In an optional embodiment, as shown in FIG3 , step S202 may include:

[0126] Step S300: parsing the barrage data through the barrage toolkit to obtain the target barrage type.

[0127] Step S302: Create a barrage parser corresponding to the target barrage type according to the target barrage type.

[0128] Step S304: parsing the barrage data through a corresponding barrage parser to obtain barrage data of a target type to be rendered for rendering.

[0129] Danmu types can be divided and defined into different types based on the content, form, and purpose of the Danmu. It should be noted that the classification of Danmu types can be selected according to actual conditions, such as: (1) classification based on the content of the Danmu, such as Danmu can be divided into text-shaped Danmu, picture-shaped Danmu, etc.; (2) classification based on the scrolling method, such as Danmu can be divided into Danmu that scrolls from right to left and Danmu that scrolls from left to right, etc.; (3) classification based on the border of the Danmu, such as Danmu can be divided into Danmu with border and Danmu without border.

[0130] Each barrage data requires a barrage parser that corresponds to the barrage data type. The barrage parser is used to parse the barrage data to identify barrage information such as text content, display time, color, font, etc., and convert this barrage information into the corresponding format to obtain the data to be rendered for subsequent rendering operations.

[0131] In the above optional embodiment, a corresponding barrage parser is created according to the target barrage type of the barrage data, and then the barrage data can be correctly and quickly parsed by the barrage parser, so that subsequent rendering operations can be performed directly according to the parsed data to be rendered.

[0132] When the target game terminal 4 renders the barrage, a view level can be created for each barrage. If there are more barrages in a certain period of time, correspondingly, more view levels need to be created in that period. However, the more view levels there are, the more time the GPU spends rendering the UI (User Interface). If the rendering takes more than 1 / 60 second, visible freezes will occur. That is, displaying a large number of barrages takes up too many GPU resources, resulting in the GPU failing to complete the rendering work before the next refresh frame, and it is easy to freeze when displaying barrages in the game. Therefore, in order to alleviate the above-mentioned freezes, the following optional embodiments are provided.

[0133] In an optional embodiment, the number of the bullet screen data is multiple. As shown in FIG4 , the step S202 may include:

[0134] Step S400, obtaining the preset display quantity of the bullet screen view layer.

[0135] Step S402: determining a plurality of barrage data whose display time is within a target time period from the plurality of barrage data.

[0136] Step S404: Merge at least part of the plurality of bullet screen data into one viewing layer according to the preset display quantity.

[0137] Step S406: Based on the same view layer, render at least part of the bullet comment data to be drawn on the same bullet comment view layer.

[0138] The preset display number may refer to the upper limit of the number of bullet comments that can be displayed simultaneously on the game interface. By setting the preset display number, the density of the bullet comments displayed on the game interface can be controlled. The preset display number can be determined based on information such as the bullet comment type, such as 20 or 25.

[0139] In an exemplary application, assuming that there are 45 barrage data in the target time period, if a view level is created directly for each barrage data in the target time period, the barrage may become stuck during rendering due to too many view levels to be rendered. Therefore, in order to alleviate the above situation, multiple barrage view levels can be merged in advance, that is, multiple barrages can be displayed in the same barrage view layer to reduce the number of barrage view levels that need to be rendered. However, in the case of too much barrage data, if all barrage data are directly displayed in one barrage view layer, the barrage may be too dense (overlapping each other). Therefore, in order to avoid the above-mentioned situation where the barrage is too dense, at least part of the barrage data in several barrage data can be merged into one view layer according to the preset display quantity, such as 20 barrage data can be merged into one view layer A. On this basis, the above 20 barrage data are rendered based on the view layer A, so that the 20 barrage data are drawn in the same barrage view layer.

[0140] In the aforementioned optional embodiment, the CPU pre-calculates and determines which bullet comment data should be merged into the same view layer, thereby reducing the GPU's rendering workload and the time spent on GPU rendering, improving rendering efficiency, and reducing lag. Furthermore, by merging at least some bullet comment data into a single view layer based on a preset display quantity, the density of the bullet comment content displayed on the game interface can be maintained, reducing the likelihood of overcrowding.

[0141] Step S204: display the bullet screen view layer on the game interface to display the bullet screen content in a designated area of ​​the game interface.

[0142] The designated area may be a display area of ​​the bullet screen on the game interface, such as the top, right, left, and other positions of the game interface.

[0143] The barrage content may be comments, messages or interactive content sent by a game user associated with the game terminal in the form of barrage.

[0144] The above embodiment describes how the target game terminal 4 receives and renders the bullet chat data distributed by the bullet chat server 2 through the bullet chat toolkit, thereby displaying the bullet chat content in a designated area of ​​the game interface. The following describes how the target game terminal 4 sends the bullet chat to the bullet chat server 2, so that the bullet chat server 2 can process and distribute the bullet chat data.

[0145] In an optional embodiment, as shown in FIG5 , the method may further include:

[0146] Step S500: When the bullet comment toolkit is in a calling state, the bullet comment content is transmitted to the bullet comment toolkit.

[0147] Step S502: obtaining target bullet comment data by encapsulating the bullet comment content through the bullet comment toolkit.

[0148] Step S504: Send the target bullet screen data to the bullet screen server through the bullet screen toolkit, so that the bullet screen server processes the target bullet screen data and distributes it.

[0149] In an exemplary application, if the target game terminal 4 (which has called the barrage toolkit) wants to send the barrage content A in the form of barrage to all the game terminals in the chat group 1, it can be achieved through the following operations: First, the barrage content A can be transmitted to the barrage toolkit of the target game terminal 4. After the barrage toolkit receives the barrage content A, it will encapsulate the barrage content A to obtain the target barrage data a. Afterwards, the barrage toolkit can send the target barrage data a to the barrage server 2, so that the barrage server 2 can process the target barrage data a (such as adding a user identifier to the barrage data). After the barrage server 2 processes the target barrage data a, it can distribute the target barrage data a to all the game terminals in the chat group 1 to display the barrage content A on the game interface.

[0150] In an exemplary application, the target game terminal 4 invokes the Barrage API (barrage API). The barrage toolkit then encapsulates the input barrage content and sends the encapsulated target barrage data to the barrage server 2. The encapsulated target barrage data can include various information such as text content, barrage color, avatar, and recipient. After receiving the data, the barrage server 2 pushes the processed target barrage data to the designated game terminal.

[0151] BarrageApi is a class that represents a request to the Barrage API, including but not limited to the following properties:

[0152] ·content: The content of the barrage message.

[0153] color: The color of the barrage message.

[0154] size: The size of the bullet message.

[0155] Position: The position of the bullet message.

[0156] ·receiver: The recipient of the bullet message.

[0157] uid: The unique identifier of the bullet message.

[0158] In the above-mentioned optional embodiment, when a game user needs to send a barrage, the barrage toolkit configured in the target game terminal 4 can first receive and encapsulate the barrage content entered by the game user. The encapsulated target barrage data is then sent to the barrage server 2, which then distributes the target barrage data to the corresponding game terminals. It can be seen that the barrage toolkit quickly encapsulates and sends the target barrage data, so that the barrage server 2 can subsequently effectively distribute the target barrage data to multiple game terminals.

[0159] Different game terminals can have different bullet screen configuration data, thus forming a personalized display effect. The details are as follows:

[0160] In an optional embodiment, the bullet screen toolkit is configured with bullet screen configuration data. The step S502 may include: encapsulating the bullet screen content according to the bullet screen configuration data by the bullet screen toolkit to obtain target bullet screen data.

[0161] Danmu configuration data can be used to define and control the display mode and behavior of Danmu content on the game interface, such as: (1) Display style: the font, size, color, border and other appearance attributes of the Danmu; (2) Scrolling mode: such as horizontal scrolling or vertical scrolling; (3) Duration: the time that the Danmu stays on the game interface; (4) Animation effect: the animation effect when the Danmu appears and disappears, such as fade in and fade out, sliding, etc.

[0162] In the above optional embodiment, corresponding barrage configuration data is set in the barrage toolkit, so as to realize the encapsulation of barrage content inside the barrage toolkit, improve the encapsulation efficiency of barrage content and realize personalized barrage display effect.

[0163] It should be noted that the bullet screen configuration data set in the bullet screen toolkit can be provided by the bullet screen server 2 or input and set by the game user associated with the target game terminal 4, as follows:

[0164] Acquisition method 1: The barrage configuration data is provided by the barrage server 2.

[0165] In an optional embodiment, the barrage configuration data is obtained in advance from the barrage server. For example, when the SDK opens the barrage interface and is called, the barrage toolkit will be initialized to implement the personalized configuration of the barrage function. As shown in Figure 6, the initialization operation is as follows:

[0166] Step S600: Create a bullet screen view layer through the bullet screen toolkit and generate a bullet screen parameter configuration request.

[0167] Step S602: When the barrage toolkit establishes a connection with the barrage server, a barrage parameter configuration request is sent to the barrage server, so that the barrage server returns the barrage configuration data according to the barrage parameter configuration request.

[0168] The barrage parameter configuration request may refer to a request for obtaining barrage configuration data. After receiving the barrage parameter configuration request, the barrage server 2 may return the corresponding barrage configuration data according to the barrage parameter configuration request. The barrage parameter configuration request may carry query data for barrage display scene, barrage color, barrage size, barrage speed, etc.

[0169] In the above optional embodiment, the barrage toolkit obtains the barrage configuration data specific to the target game terminal 4, and then can quickly and individually encapsulate the barrage content internally according to the specific barrage configuration data, thereby improving the efficiency of barrage encapsulation.

[0170] In an optional embodiment, as shown in FIG7 , the bullet screen configuration data is obtained by the bullet screen server through the following operations:

[0171] Step S700: Obtain object data of a target object associated with a target game terminal from a game server.

[0172] Step S702: Generate the corresponding bullet screen configuration data for the target object according to the object data of the target object.

[0173] The target object may be a game user associated with the target game terminal 4 .

[0174] The object data may be various data information about the target object collected by the game server 6, such as: (1) basic information of the target object: such as the target object account, geographic location and other basic information; (2) game behavior data: such as game level, game time, game task completion, achievement achievement, etc.; (3) behavior data, such as interaction value, interaction frequency, purchase of virtual items or in-game currency, etc. It should be noted that the bullet screen configuration data for different target objects may be different. For example, if target object A is a high-value player, special animation effects such as flashing, scaling, gradient, etc. may be added when setting the bullet screen configuration data for target object A.

[0175] In some embodiments, when the barrage server generates corresponding barrage configuration data for a target object, it also generates a corresponding user ID for the target object.

[0176] In the above optional embodiment, when determining the barrage configuration data for the target game terminal 4, the object data of the target object (the object associated with the target game terminal 4) can be obtained from the game server, and then the barrage configuration data can be personalized based on the object data to improve the interactive effect and barrage display effect of the barrage.

[0177] Acquisition method 2: The target game terminal 4 provides the bullet screen configuration data.

[0178] In an optional embodiment, the barrage configuration data is obtained through input from the target game terminal 4 .

[0179] The target game terminal 4 can be associated with the target game user. Before sending the bullet screen content, the target game user can input the corresponding bullet screen configuration data (such as font, size, color, etc.) through the target game terminal 4 to adjust the display effect of the subsequent bullet screen content on the game interface.

[0180] In an exemplary application, parameters such as the size, display timing, and display area of ​​the bullet screen can be encapsulated into code classes such as BarrageConfig, and the game can control the bullet screen parameters. The BarrageConfig code classes in the game terminal can pass the bullet screen configuration parameters and bullet screen configuration data to the bullet screen toolkit, so that the bullet screen toolkit can obtain the bullet screen configuration data.

[0181] In the above optional embodiment, the target game user associated with the target game terminal 4 sets the barrage configuration data by himself, which can realize the personalized setting of the barrage configuration data, thereby improving the interaction effect and the barrage display effect.

[0182] In an optional embodiment, the target bullet screen data may further include a group identifier, wherein the group identifier is used to instruct the bullet screen server to send the target bullet screen data to the game terminals of a specified group.

[0183] The group identifier may be identification information for distinguishing different chat groups, such as a group ID, a group name, etc. In some embodiments, the group identifier may be obtained by being sent by the bullet screen server during the initialization operation.

[0184] In the above optional embodiment, the barrage server 2 can correctly send the target barrage data to the game terminals of the designated group through the group identifier carried in the target barrage data, thereby ensuring the correct distribution of the target barrage data.

[0185] The bullet screen toolkit can provide corresponding bullet screen functions for the game terminal, such as bullet screen receiving function, rendering function, display function, etc. Different functions can be implemented by corresponding functional modules. The following is a detailed introduction to each functional module in the bullet screen toolkit.

[0186] In an optional embodiment, as shown in FIG8 , the bullet comment toolkit includes a bullet comment logic engine module and a bullet comment rendering module, wherein:

[0187] The barrage logic engine module includes a barrage underlying rendering module (BarrageRenderer), a barrage dispatching module (BarrageDispatcher), and a barrage creation module (BarrageCreateor). The barrage underlying rendering module is responsible for the underlying rendering logic of the barrage data, the barrage dispatching module is responsible for receiving and sending barrage data, and the barrage dispatching module is used to create the main body of the barrage data.

[0188] The bullet screen rendering module is used to render the bullet screen data. The bullet screen rendering module includes an interpreter module, a layer drawing module, and a bullet screen view layer creation and display module.

[0189] When the barrage rendering module renders the barrage data, it requires the cooperation of multiple modules, specifically: the interpreter module is responsible for parsing the received barrage data and converting the barrage data into a format or object that can be used for display, that is, parsing the barrage information such as content, position, style, display time, etc. in the barrage data, so that the subsequent layer drawing module and the barrage view layer creation and display module can process and display the parsed barrage data. The layer drawing module (BarrageLayer) can be used for drawing at the Layer level, that is, it can be used to create a barrage view layer (Layer) for rendering barrage content, and the barrage view layer can be used to display barrage content. The barrage view layer creation and display module (BarrageView) can be used to draw the barrage data on the barrage view layer in a specific way, that is, to create a visual barrage so that the barrage content can be displayed on the game interface.

[0190] In the above optional embodiment, by encapsulating functional modules such as the barrage logic engine module and the barrage rendering module in the barrage toolkit, the barrage toolkit has an independent and complete barrage function, so that operations such as receiving and rendering the barrage can be completed within the barrage toolkit. When the game needs to access the barrage function, the barrage toolkit can be directly called to help the game quickly access the barrage function. In addition, the barrage function is encapsulated in the barrage toolkit, so that the barrage function can be provided to the game development end in the form of an SDK product, providing the game development end with a ready-to-use barrage function, improving the development and use efficiency of the game-based barrage function, and effectively saving costs.

[0191] In order to make this application easier to understand, an exemplary application is provided below in conjunction with FIG9 and FIG10 .

[0192] In this exemplary application, the bullet screen server 2, the game server 6 and the target game terminal 4 (equipped with a bullet screen toolkit) are interconnected via a network.

[0193] Initialization operation of the barrage toolkit:

[0194] S01, the target game terminal calls the bullet screen opening interface.

[0195] S02, the bullet screen toolkit establishes a bullet screen view layer and generates a bullet screen parameter configuration request.

[0196] S03, the barrage toolkit sends a connection request to establish a long connection with the barrage server 2.

[0197] S04, the bullet screen toolkit sends a bullet screen parameter configuration request to the bullet screen server 2.

[0198] S05, the bullet screen server 2 obtains user data and other information from the game server.

[0199] S06, the barrage server 2 generates barrage configuration data based on user data and other information.

[0200] S07, the bullet screen server 2 generates user and group IDs, and sends the bullet screen configuration data to the bullet screen toolkit.

[0201] After the initialization operation, you can execute the corresponding barrage function through the barrage toolkit.

[0202] How to use the barrage toolkit:

[0203] S11, the target game terminal 4 transmits the bullet comment content to the bullet comment toolkit.

[0204] S12, the barrage toolkit encapsulates the barrage content according to the barrage configuration data to obtain target barrage data;

[0205] It should be noted that the bullet screen configuration data can be obtained through the above initialization operation, or can be input through the target game terminal 4.

[0206] S13, the barrage toolkit sends the target barrage data to the barrage server 2.

[0207] S14, the barrage server 2 processes the target barrage data and distributes it to multiple game terminals.

[0208] S15, the bullet screen toolkit receives the bullet screen data distributed by the bullet screen server 2, which may include target bullet screen data and bullet screen data provided by other game terminals.

[0209] S16, rendering the received bullet chat data in the bullet chat toolkit to draw the bullet chat view layer; it should be noted that:

[0210] ① Parse the received bullet-message data through the bullet-message parser to obtain the data to be rendered, and then render the data to be rendered.

[0211] ② When there are multiple bullet chat data in the same period, at least part of the multiple bullet chat data can be combined and displayed on the same view layer;

[0212] S17, displaying the bullet comment view layer on the game interface to display the bullet comment content on the game interface.

[0213] Example 2

[0214] Figure 11 schematically shows a block diagram of a bullet screen processing device in a game according to the second embodiment of the present application. The bullet screen processing device in the game 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 embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer-readable instruction segments that can perform specific functions. The following description will specifically introduce the functions of each program module in this embodiment. As shown in Figure 11, the bullet screen processing device 1100 in the game may include: a receiving module 1110, a rendering module 1120, and a display module 1130, wherein:

[0215] The receiving module 1110 is used to receive the bullet comment data distributed by the bullet comment server through the bullet comment toolkit when the bullet comment toolkit is in a calling state;

[0216] The rendering module 1120 is used to render the bullet chat data in the bullet chat toolkit to draw a bullet chat view layer;

[0217] The display module 1130 is used to display the bullet screen view layer on the game interface to display the bullet screen content in a designated area of ​​the game interface.

[0218] In an optional embodiment, the rendering module 1120 is further configured to:

[0219] Parsing the barrage data using a barrage toolkit to obtain a target barrage type;

[0220] According to the target barrage type, create a barrage parser corresponding to the target barrage type;

[0221] The barrage data is parsed by a corresponding barrage parser to obtain barrage data of the target type to be rendered for rendering.

[0222] In an optional embodiment, the number of the bullet comment data is multiple; the rendering module 1120 is further configured to:

[0223] Get the preset display quantity of the bullet screen view layer;

[0224] Determining, from the plurality of barrage data, a plurality of barrage data whose display time is within a target time period;

[0225] Merging at least part of the plurality of bullet chat data into one view layer according to the preset display quantity;

[0226] Based on the same view layer, at least part of the bullet comment data is rendered to be drawn on the same bullet comment view layer.

[0227] In an optional embodiment, the barrage processing device in the game may further include a sending module, wherein the sending module is configured to:

[0228] When the bullet comment toolkit is in a calling state, the bullet comment content is transmitted to the bullet comment toolkit;

[0229] Get the target barrage data by encapsulating the barrage content through the barrage toolkit;

[0230] The target bullet screen data is sent to the bullet screen server through the bullet screen toolkit, so that the bullet screen server processes the target bullet screen data and distributes it.

[0231] In an optional embodiment, the barrage toolkit is configured with barrage configuration data; correspondingly, the sending module is further configured to:

[0232] The barrage toolkit is used to encapsulate the barrage content according to the barrage configuration data to obtain target barrage data.

[0233] In an optional embodiment, the barrage configuration data is pre-acquired from the barrage server; the barrage processing device in the game may further include an initialization module, the initialization module being configured to:

[0234] Create a bullet screen view layer and generate a bullet screen parameter configuration request through the bullet screen toolkit;

[0235] When the bullet screen toolkit establishes a connection with the bullet screen server, a bullet screen parameter configuration request is sent to the bullet screen server, so that the bullet screen server returns the bullet screen configuration data according to the bullet screen parameter configuration request.

[0236] In an optional embodiment, the initialization module is further configured to:

[0237] Obtain object data of a target object associated with a target game terminal from a game server;

[0238] Generate the corresponding bullet screen configuration data for the target object according to the object data of the target object.

[0239] In an optional embodiment, the bullet screen configuration data is obtained through input from the target game terminal.

[0240] In an optional embodiment, the target barrage data carries a group identifier;

[0241] The group identifier is used to instruct the bullet screen server to send the target bullet screen data to the game terminals of the designated group.

[0242] In an optional embodiment, the barrage toolkit includes:

[0243] The barrage logic engine module includes a barrage underlying rendering module, a barrage scheduling module, and a barrage creation module; wherein the barrage underlying rendering module is responsible for the underlying rendering logic of the barrage data, the barrage scheduling module is responsible for receiving and sending the barrage data, and the barrage scheduling module is used to create the main body of the barrage data;

[0244] The bullet screen rendering module is used to render the bullet screen data; wherein, the bullet screen rendering module includes an interpreter module, a layer drawing module, and a bullet screen view layer creation and display module.

[0245] Example 3

[0246] Figure 12 schematically shows a hardware architecture diagram of a computer device 10000 suitable for implementing the bullet screen processing method in the game according to the third embodiment of the present application. In some embodiments, the computer device 10000 can be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle-mounted terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. In other embodiments, the computer device 10000 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), etc. As shown in Figure 11, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other through a system bus. Among them:

[0247] The memory 10010 includes at least one type of computer-readable storage medium, including flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), 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 storage, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of the computer device 10000, such as a hard disk or memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Of course, the memory 10010 may also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store the operating system and various application software installed on the computer device 10000, such as the program code of the bullet comment processing method in the game, etc. In addition, the memory 10010 can also be used to temporarily store various data that has been output or will be output.

[0248] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to execute program code stored in the memory 10010 or process data.

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

[0250] It should be noted that FIG. 12 only shows a computer device having components 10010 - 10030 , but it should be understood that it is not required to implement all of the shown components, and more or fewer components may be implemented instead.

[0251] In this embodiment, the barrage processing method in the game stored in the memory 10010 can also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of the present application.

[0252] Example 4

[0253] An embodiment of the present application also provides a computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the steps of the barrage processing method in the game of the embodiment.

[0254] In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), 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 computer-readable storage medium may be an internal storage unit of a computer device, such as a 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 memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. Of course, the computer-readable storage medium may also include both an internal storage unit of the computer device and its external storage 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 processing method in the game in the embodiment. In addition, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are about to be output.

[0255] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented using general-purpose computer devices. They can be concentrated on a single computer device or distributed on a network composed of multiple computer devices. Alternatively, they can be implemented using program codes executable by the computer device, so that they can be stored in a storage device and executed by the computer device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0256] It should be noted that the above are only preferred embodiments of the present application and do not limit the scope of patent protection of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the scope of patent protection of the present application.

Claims

1. A method for processing bullet comments in a game, for a target game terminal equipped with a bullet comment toolkit; the method comprises: When the bullet chat toolkit is in the calling state, the bullet chat data distributed by the bullet chat server is received through the bullet chat toolkit; Rendering the bullet chat data in the bullet chat toolkit to draw a bullet chat view layer; The bullet screen view layer is displayed on the game interface to display the bullet screen content in a designated area of ​​the game interface.

2. According to the method of claim 1, rendering the barrage data in a barrage toolkit comprises: Parsing the barrage data through a barrage toolkit to obtain a target barrage type; According to the target barrage type, create a barrage parser corresponding to the target barrage type; The barrage data is parsed by a corresponding barrage parser to obtain barrage data of a target type to be rendered for rendering.

3. According to the method of claim 1, the number of the barrage data is multiple; Correspondingly, the distributed bullet chat data is rendered in the bullet chat toolkit to draw the bullet chat view layer, including: Get the preset display quantity of the bullet screen view layer; Determining a plurality of barrage data whose display time is within a target time period from the plurality of barrage data; According to the preset display quantity, at least part of the plurality of bullet chat data are merged into one view layer; Based on the same view layer, at least part of the bullet commentary data is rendered to be drawn on the same bullet commentary view layer.

4. The method according to claim 1, further comprising: When the bullet comment toolkit is in a calling state, transmitting the bullet comment content to the bullet comment toolkit; Get the target bullet chat data by encapsulating the bullet chat content through the bullet chat toolkit; The target bullet screen data is sent to the bullet screen server through the bullet screen toolkit, so that the bullet screen server processes and distributes the target bullet screen data.

5. According to the method of claim 4, the barrage toolkit is configured with barrage configuration data; correspondingly, the step of obtaining target barrage data by encapsulating the barrage content through the barrage toolkit comprises: The barrage toolkit encapsulates the barrage content according to the barrage configuration data to obtain target barrage data.

6. According to the method of claim 4, the bullet screen configuration data is obtained in advance from the bullet screen server; The method also includes an initialization operation: Create a bullet chat view layer through the bullet chat toolkit and generate a bullet chat parameter configuration request; When the bullet screen toolkit establishes a connection with the bullet screen server, it sends a bullet screen parameter configuration request to the bullet screen server. The barrage server can return the barrage configuration data according to the barrage parameter configuration request.

7. According to the method of claim 6, the bullet screen configuration data is obtained by the bullet screen server through the following operations: Obtaining object data of a target object associated with a target game terminal from a game server; Generate the corresponding bullet screen configuration data for the target object according to the object data of the target object.

8. According to the method of claim 4, the bullet screen configuration data is obtained through input from the target game terminal.

9. According to the method of claim 4, the target barrage data carries a group identifier; in, The group identifier is used to instruct the bullet screen server to send the target bullet screen data to the game terminals of the designated group.

10. The method according to any one of claims 1 to 9, wherein the bullet comment toolkit comprises: The bullet screen logic engine module includes a bullet screen underlying rendering module, a bullet screen scheduling module, and a bullet screen creation module; wherein the bullet screen underlying rendering module is responsible for the underlying rendering logic of the bullet screen data, the bullet screen scheduling module is responsible for receiving and sending the bullet screen data, and the bullet screen scheduling module is used to create the main body of the bullet screen data; The bullet screen rendering module is used to render the bullet screen data; wherein, the bullet screen rendering module includes an interpreter module, a layer drawing module, and a bullet screen view layer creation and display module.

11. A bullet screen processing device in a game, the device comprising: The receiving module is used to receive the bullet chat data distributed by the bullet chat server through the bullet chat toolkit when the bullet chat toolkit is in a calling state; A rendering module, used for rendering the barrage data in the barrage toolkit to draw a barrage view layer; The display module is used to display the bullet screen view layer on the game interface to display the bullet screen content in a designated area of ​​the game interface.

12. A computer device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein: The memory stores computer-readable instructions that can be executed by the at least one processor, and the computer-readable instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 10.

13. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Interface interaction method in live video broadcasting, and live broadcasting client side

    CN107087217A

  • Barrage display method, live broadcasting method and related devices

    CN107911708A

  • Bullet screen display method and apparatus

    CN108540850A

  • Bullet screen rendering method and device, computer readable storage medium and computer equipment

    CN111083551A

  • Bullet screen processing method and device in game

    CN117750085A