[go: up one dir, main page]

CN121367803A - Methods, apparatus, readable media, and program products for processing bullet comments. - Google Patents

Methods, apparatus, readable media, and program products for processing bullet comments.

Info

Publication number
CN121367803A
CN121367803A CN202511798976.2A CN202511798976A CN121367803A CN 121367803 A CN121367803 A CN 121367803A CN 202511798976 A CN202511798976 A CN 202511798976A CN 121367803 A CN121367803 A CN 121367803A
Authority
CN
China
Prior art keywords
sub
region
barrage
height
bullet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202511798976.2A
Other languages
Chinese (zh)
Inventor
姚隆康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202511798976.2A priority Critical patent/CN121367803A/en
Publication of CN121367803A publication Critical patent/CN121367803A/en
Pending legal-status Critical Current

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a method, an apparatus, an electronic device, a computer readable medium and a computer program product for processing a barrage. The method comprises the following steps of taking bullet screen data to be displayed in a partitioned mode, determining subareas corresponding to bullet screens to be processed according to priorities of the bullet screens, determining area heights corresponding to the subareas according to the number of the bullet screens to be displayed in the subareas, generating corresponding bullet screen display instructions based on the obtained area heights of the subareas, and sending the corresponding bullet screen display instructions to a client, wherein the bullet screen display instructions are used for indicating the subareas corresponding to the bullet screens in the bullet screen data and the area heights of each subarea. The method comprises the following steps of determining sub-areas corresponding to the to-be-processed barrages according to priorities of the barrages, determining the area heights corresponding to the sub-areas according to the number of the to-be-displayed barrages in the sub-areas, and generating corresponding barrage display instructions based on the obtained area heights of the sub-areas and sending the corresponding barrage display instructions to the client, wherein the barrage display instructions are used for indicating the sub-areas corresponding to the barrages in barrage data and the area heights of the sub-areas.

Description

Method, apparatus, readable medium and program product for processing a barrage
Technical Field
The present application relates to the field of computer technology, and in particular, to a method, an apparatus, an electronic device, a computer readable medium, and a computer program product for processing a barrage.
Background
In conventional video content barrage systems, the barrages are typically displayed in a vertically scrolling fashion within a unified area, with the user barrages being mixed in presentation. For example, a celebrity or a host-side barrage is not clearly distinguished from a regular user barrage, resulting in a celebrity barrage being easily covered by a large number of regular barrages, thereby affecting the interactive effect. The existing solutions usually adopt the modes of highlighting the barrage color, enlarging the fonts or displaying preferentially and the like to highlight the celebrity barrages, but the barrages are still overlapped and displayed in the same area, so that the high-priority barrages can not be effectively ensured.
Disclosure of Invention
The present application is directed to a method, apparatus, electronic device, computer readable medium and computer program product for processing a barrage, which is directed to solving the problem of high priority barrages being easily submerged due to the mixed display of the barrages in conventional barrage systems.
In one aspect of the present application, a method for processing a barrage in a server is provided, where the method includes:
acquiring bullet screen data to be displayed in a partition;
determining sub-areas corresponding to each bullet screen to be processed according to the priorities of the bullet screens;
determining the region height corresponding to each sub-region according to the number of the barrages to be displayed in each sub-region;
Based on the obtained regional heights of the subregions, corresponding barrage display instructions are generated and sent to the client, and the barrage display instructions are used for indicating the subregions corresponding to the barrages in barrage data and the regional heights of the subregions.
In one aspect of the present application, a method for processing a barrage in a client is provided, wherein the method includes:
Responding to a bullet screen display instruction sent by a server, and analyzing to obtain a sub-region corresponding to each bullet screen to be displayed and the region height of each sub-region;
According to the received area height of each sub-area, the size of each sub-area is adjusted;
and displaying the barrages with corresponding priorities in the sub-areas after the resizing.
In one aspect of the present application, a first apparatus for processing a barrage in a service side is provided, where the first apparatus includes:
the bullet screen acquisition module is used for acquiring bullet screen data to be displayed in a partitioned mode;
the zone determining module is used for determining the sub-zone corresponding to each bullet screen to be processed according to the priority of the bullet screen;
The regional height determining module is used for determining the regional height corresponding to each sub-region according to the number of the barrages to be displayed in each sub-region;
The instruction generation and transmission module is used for generating corresponding barrage display instructions based on the obtained regional heights of the subareas and transmitting the corresponding barrage display instructions to the client, wherein the barrage display instructions are used for indicating the subareas corresponding to each barrage in barrage data and the regional heights of each subarea.
In one aspect of the present application, there is provided a second apparatus for displaying a bullet screen in a client, wherein the second apparatus includes:
The instruction analysis module is used for responding to the received bullet screen display instruction sent by the server side and analyzing to obtain the corresponding subareas of each bullet screen to be displayed and the area height of each subarea;
the subarea adjusting module is used for adjusting the size of each subarea according to the received area height of each subarea;
and the bullet screen partition display module is used for respectively displaying bullet screens with corresponding priorities in each sub-area subjected to size adjustment.
In another aspect of the application, an electronic device comprises at least one processor and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor for enabling the at least one processor to perform the methods of embodiments of the application.
In another aspect of the application, a computer-readable storage medium having stored thereon computer program instructions executable by a processor to implement a method of an embodiment of the application is provided.
In another aspect of the application, a computer program product is provided, comprising a computer program which, when executed by a processor, implements a method of an embodiment of the application.
According to the scheme provided by the embodiment of the application, the live broadcast barrage area is divided into the subareas, barrages with different priorities are correspondingly displayed in each subarea, the problem that the barrage with high priority is easily submerged due to barrage mixed display in a traditional barrage system is solved, the visibility of the barrage with high priority is remarkably improved, the heights of the corresponding subareas are automatically adjusted according to the number of barrages with different priorities, the utilization of screen space is optimized, the use efficiency of interface space is improved, visual weakening treatment is carried out on the subareas with low priority by using Gaussian fuzzy filters and the like, visual interference is effectively reduced, visual focusing is enhanced, the recovered barrages with low priority are conveyed to the barrage area with high priority for unified display through a barrage conveying and context correlation display mechanism, the problem that the replying relation is difficult to visually express intuitively is solved, the consistency and the definition of barrage interaction are enhanced, flexible interactive operation is provided, the high priority barrage area is manually folded and unfolded by a user is supported, the personalized interactive display requirements of different spectators are met.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
FIG. 1 shows a flow chart of a method for processing a barrage in a server and client according to an embodiment of the application;
FIG. 2 (a) shows a schematic diagram of an exemplary bullet screen display effect according to an embodiment of the present application;
FIG. 2 (b) shows a schematic diagram of an exemplary bullet screen display effect according to an embodiment of the present application;
Fig. 3 is a schematic structural diagram of a first device for processing a barrage in a server and a second device for processing a barrage in a client according to an embodiment of the present application;
Fig. 4 shows a schematic structural diagram of an apparatus suitable for implementing the solution in an embodiment of the application.
The same or similar reference numbers in the drawings refer to the same or similar parts.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In one exemplary configuration of the application, the terminal, the devices of the services network each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer-readable media include both permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer program instructions, data structures, modules of the program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device.
FIG. 1 shows a flow chart of a method for processing a barrage in a server and client according to an embodiment of the application. The method at least comprises a step S101, a step S102, a step S103 and a step S104 which are executed by a server, and a step S201, a step S202 and a step S203 which are executed by a client.
The server includes, but is not limited to, a network host, a single network server, a plurality of network server sets, or a computer set based on cloud computing, which may be used to implement a part of processing functions when setting an alarm clock. Here, the Cloud is composed of a large number of hosts or web servers based on Cloud Computing (Cloud Computing), which is a kind of distributed Computing, one virtual computer composed of a group of loosely coupled computer sets. The client comprises, but is not limited to, various terminal devices such as a computer, a mobile phone, a tablet personal computer, a smart watch, a bracelet and the like.
In a practical scenario, the method according to an embodiment of the application may be performed by a server of a video website, or by a client playing a video.
Referring to fig. 1, in step S101, bullet screen data to be displayed in a partitioned manner is acquired.
The bullet screen data comprise basic information such as text content, appearance time stamps and the like of each bullet screen. And, the bullet screen data includes information, such as a user ID, an identification, etc., that can be used to indicate the priority of the bullet screen sender.
For example, the live broadcast server receives bullet screen data to be displayed in real time through WebSocket, including user ID, bullet screen content, timestamp, identity, and the like.
The target video may include various types of videos or video clips with barrage interaction functions. For example, the target video may be a video obtained from a video player or video playing software of a browser, or may be a directly shot video. Types of target video may include sports event video, live video, movie theatrical video, variety video, advertising video, and the like.
Optionally, in response to an instruction for triggering the split display of the bullet screen of the target video, bullet screen data to be split displayed is acquired. The instruction for displaying the bullet screen of the target video in a partitioning mode is used for dividing at least two sub-areas in the total area of the displayed bullet screen, and bullet screens with different priorities are respectively displayed.
Alternatively, the partition display instruction is automatically triggered when a bullet screen of a sender of a specific identity (e.g., a bullet screen sent by a movie star, a well-known anchor, etc.) is received.
Alternatively, the instruction for the partition display may be triggered based on a setting operation on the viewer side. For example, the viewer may manually enable or disable the barrage section display function through a setup menu of the video player. The viewer may also adjust parameters of the partitioned display, such as the number of sub-regions, prioritization criteria, etc., based on his own preferences. This user setting-based operation provides greater flexibility to enable the viewer to optimize the bullet screen display effect according to his own needs and viewing habits.
In the embodiment of the application, a plurality of subareas are constructed in the total area of the display barrage, the visual levels of the subareas can be distinguished, and each subarea corresponds to different priorities. Wherein the priority of the sub-area may be determined based on identity information of the barrage sender. For example, according to the identities of the ordinary spectators and the celebrities, two sub-areas of the celebrity barrage area and the ordinary barrage area are respectively divided, and the two sub-areas correspond to the priorities of the celebrities and the ordinary spectators respectively. Optionally, the implementation support of the present application is further extended to multiple sub-areas to accommodate the need for more user roles or bullet screen priorities.
In step S102, a sub-area corresponding to each bullet screen to be processed is determined according to the priority of the bullet screen.
According to one embodiment, the step S102 further includes step S1021 and step S1022.
In step S1021, priority information of each bullet screen to be processed is determined.
Wherein the priority information may be determined based on the sender's role (e.g., celebrity, average user, etc.) or other attributes of the barrage (e.g., endorsement number, frequency of interaction, etc.). For example, the bullet screen may be divided into a general bullet screen and a celebrity bullet screen according to the identity of the sender. Celebrity backdrops are typically of higher priority, while regular user backdrops are of lower priority.
In step S1022, each bullet screen to be processed is allocated to a corresponding sub-area based on a preset mapping rule.
Optionally, the embodiment of the application distributes the barrage to the corresponding subareas for partition display based on the type of the barrage sender. For example, in a live scene where speaker identity needs to be distinguished, the live broadcast system may preset three roles, namely, a current live room anchor, other anchor or video-on-demand creator, and a common viewer. After the bullet screen data to be displayed in a partitioned mode are obtained, the server reads the identity of the sender of each bullet screen, distributes the sender of each bullet screen to the subarea corresponding to the corresponding role, distributes the bullet screen to the subarea at the top layer position for display if the bullet screen is sent by a host, distributes the bullet screen to the subarea at the middle layer position for display if the bullet screen is sent by an creator, and distributes the bullet screen to the subarea at the bottom layer position for display if the bullet screen is sent by a common audience.
Through the steps, the bullet screen can be dynamically distributed to different subareas according to the priority of the bullet screen, so that layered display of the bullet screen and visual effect optimization are realized, and continuity and visual layering sense of bullet screen interaction are enhanced.
In step S103, according to the number of the bullet curtains to be displayed in each sub-area, the area height corresponding to each sub-area is determined.
According to one embodiment, the step S103 further includes a step S1031 and a step S1032.
In step S1031, the number of real-time barrages to be displayed in each sub-zone is determined.
In step S1032, the region height corresponding to each sub-region is calculated according to a preset height calculation rule.
For example, dividing the barrage display area into two sub-areas of a celebrity barrage area and a common barrage area, and for the celebrity barrage area, setting a maximum height limit (e.g. 450 px) by multiplying the number of barrages by the height of a single barrage (e.g. 50 px). For the common barrage zone, the height is determined by subtracting the height of the celebrity barrage zone from the total barrage zone height (e.g., 500 px), while ensuring that the minimum height of the common barrage zone is not less than 50px.
Alternatively, the calculation rule may be a nonlinear mapping rule, including a step function, a logarithmic function, or a piecewise linear function, so that the height value of the sub-region may be dynamically adjusted based on the number of live shots, such as to generate a jump expansion or contraction when the number of shots reaches a preset threshold.
Optionally, the server pushes the calculated area height information of each sub-area and the barrage data to the client through the WebSocket, and the client dynamically adjusts the size of the barrage display area according to the received area height information. Or the client side automatically calculates the height according to the bullet screen data actually received so as to realize more flexible dynamic adjustment. The WebSocket is a network communication protocol, provides a full duplex communication channel, and allows real-time data transmission between a client and a server.
The dynamic height adjustment mechanism of the subareas in the embodiment of the application ensures that the visible height of each subarea in the vertical direction can be independently adjusted along with the change of the number of the contained barrages. For example, when the number of celebrity barrages increases, the height of the celebrity barrage zone correspondingly expands, while the height of the ordinary barrage zone correspondingly compresses, whereas when the number of celebrity barrages decreases, the height of the celebrity barrage zone contracts, and the height of the ordinary barrage zone expands. And, expansion or contraction of any sub-region will trigger complementary adjustment of the remaining sub-regions in the same vertical dimension, thereby keeping the area of the total area of the bullet screen constant. The method optimizes the space allocation of barrage display, improves user experience, and ensures that barrages with different priorities can be reasonably presented visually. Through the mechanism, the embodiment of the application can flexibly adapt to the change of the number of the barrages, and simultaneously ensures the rationality of the interface layout and the continuity of the visual effect.
In step S104, based on the obtained region heights of the sub-regions, a corresponding barrage display instruction is generated and sent to the client.
The bullet screen display instruction is used for indicating the subareas corresponding to each bullet screen in bullet screen data and the area height of each subarea. For example, the bullet screen display instructions may include key information such as a unique identifier of the bullet screen, hierarchical information of the display area to which the bullet screen belongs (e.g., celebrity bullet screen area or general bullet screen area), bullet screen content, a time stamp, and a height value of the bullet screen display area. The bullet screen display instruction enables the client to adjust the display layout of the bullet screen area according to the received instruction, and accurately renders the bullet screen to the corresponding subarea for display.
In step S201, in response to receiving the bullet screen display instruction sent by the server, the client parses to obtain the sub-area corresponding to each bullet screen to be displayed and the area height of each sub-area.
The analysis process comprises the steps of extracting and analyzing key fields in the barrage display instruction, such as a unique identifier of the barrage, hierarchical information of a sub-region (such as a celebrity barrage region or a common barrage region), barrage content, a time stamp, a height value of each barrage display region and the like. The client determines from these fields the display position of each bullet screen and the height of the corresponding sub-region, ready for the subsequent rendering operation.
In step S202, the size of each sub-area is adjusted according to the received area height of each sub-area.
The resizing process includes dynamically calculating the vertical position and height of each sub-region to ensure that the layout of the sub-regions in the vertical direction conforms to the height instructions sent by the server. Specifically, the client adjusts the size of each sub-region according to the height value obtained by analysis, and meanwhile ensures that the boundaries between the sub-regions are clear and the transition is smooth.
Optionally, the client combines the device attribute of the client to adjust the total area of the display barrage and/or the size of each subarea so as to ensure that the barrage displayed in each subarea can be normally displayed under the size of the current device and maintain the aesthetic property and the readability of the overall layout. Wherein the heights of the barrage areas of different types of client devices may be different. For example, the bullet screen area at the PC end is 500px, and the mobile phone end may be only 300px.
Optionally, the height of the total area may be adaptively adjusted according to the viewport height (viewport height) of the client device, and the heights of the sub-areas may be dynamically adaptively adjusted according to the device type and the playing scene, so as to ensure that the bullet screen display area can keep good user experience on different devices.
The height of the total area can be scaled according to the view port height of the device, so that self-adaptive layout is realized. For example, the bullet screen height of the PC end can be set to a certain proportion (e.g. 50%) of the viewport height, and the cell phone end can be adjusted to a higher proportion (e.g. 70%) of the viewport height according to the smaller screen size. This scaling may be predefined according to the type of device or may be dynamically adjusted via a configuration file. To support such adaptive adjustment, the height of the total area on the different devices may be determined based on a preset scaling table. For example, PC side, barrage area height=50% of view port height (default, adjustable by configuration), tablet side, barrage area height=60% of view port height, and cell phone side, barrage area height=70% of view port height.
In the dynamic adjustment process, the height calculation reference of the barrage area is the height of the player from the bottom. In a non-full screen scenario, the height of the bullet screen area is divided according to the distance from the bottom of the player to the top of the screen. If a full screen scene, 50% of the picture height (this ratio can be adjusted by the profile) is used by default as the height of the bullet screen area. This dynamic adjustment mechanism ensures that the height of the bullet screen area can be flexibly adapted to different play scenes and device types, thereby providing a more optimal visual experience.
Optionally, the heights of the sub-regions are dynamically adapted according to the device type and the playing scene. For example, in a multi-level barrage zone scene, the height ratio of each sub-zone is dynamically allocated according to the device type and screen size. For the PC end, the height of the celebrity barrage area can be set to be 30% of the total barrage area height, the common barrage area is 70%, and at the mobile phone end, the height of the celebrity barrage area can be adjusted to be 40% of the total barrage area height, and the common barrage area is 60%. This dynamic allocation ensures that the heights of the sub-areas on different devices can be flexibly adjusted according to the view port height of the device and the user's needs.
According to one embodiment, the client dynamically adjusts the height of each sub-region according to the number of live barrages. The process of determining the height of each sub-area according to the real-time bullet screen number is similar to the aforementioned step S103, and will not be repeated here.
Through the self-adaptive adjustment mechanism based on the height of the viewing port, the method and the device can effectively solve the problem of the difference in the heights of the barrage areas among different devices, and meanwhile, the consistency of barrage display and the consistency of user experience are maintained.
In step S203, the bullet screens of the corresponding priorities are displayed in the respective sub-areas that are resized, respectively.
In the barrage rendering process, the client side firstly dynamically allocates the display space of the barrage according to the region height and the position information of each sub region. Specifically, the client renders the barrage content into the corresponding display area according to the priority of the barrage and the sub-area to which the barrage belongs, so that the barrage is ensured to be reasonably arranged and displayed in each sub-area according to the priority sequence.
According to one embodiment, the client applies a smooth animation effect in the process of displaying the bullet screen in each adjusted sub-region, so as to avoid visual mutation caused by size change, and further improve user experience. Optionally, the smooth transition animation adopts a cubic Bezier curve or a spring physical model, and the animation duration is dynamically adjusted based on the current subarea height variation so as to maintain visual consistency.
According to one embodiment, to achieve differentiation of the visual hierarchy, the method further comprises step S204.
In step S204, the one or more sub-areas with lower priority are visually weakened to achieve visual weakening of the bullet screen in the area.
Optionally, a CSS (cascading style sheet, CASCADING STYLE SHEETS) gaussian blur filter is used for visual weakening, which process comprises:
Firstly, dynamically setting the height of a covering layer by a client, and adjusting the size of the covering layer in real time according to the actual height of a high-priority sub-region;
The coverage area is then processed using the blurring effect to reduce visual interference of the lower priority barrage. Optionally, the client further enhances the visual separation effect by adding a translucent background. For optimizing the performance, the client adopts various technical means, such as prompting the browser to perform performance optimization, forcedly starting hardware acceleration and avoiding the cover layer from blocking user interaction;
and finally, the client realizes dynamic change of the height of the covering layer and the blurring effect through smooth transition animation, and ensures natural transition of the visual effect.
For example, the client may create an overlay using CSS pseudo-elements (e.g.,:: before or::: after) and locate it as an absolute, overlaid on top of a common bullet screen area. Dynamic height is controlled by CSS variable (e.g., -celebrity-height), and the variable is updated in real time after the height of the high priority barrage zone is calculated by JavaScript. The blurring effect is achieved through backdrop-filter: blur (), wherein the blurring radius can be adjusted according to the actual requirement, for example, 8px is a better value after test, the blurring effect is not obvious when the blurring effect is smaller than 6px, and excessive blurring can be caused when the blurring effect is larger than 10px, so that the user experience is influenced. The client may also add a slight translucent background (e.g., white translucent) to the overlay to further enhance the visual separation effect.
In addition to CSS gaussian blur filters, clients may employ other alternatives to achieve similar visual weakening effects. For example, SVG filters are used to achieve more complex blur effects, canvas is used for real-time blur processing suitable for scenes requiring highly custom, or multi-layer mask gradation is used to achieve blur-like visual effects through transparency changes. The person skilled in the art can flexibly select the alternatives described above according to the actual requirements.
According to one embodiment, the reply barrage process includes step S105 performed by the server and step S205 performed by the client.
In step S105, when detecting that the reply barrage in the high priority sub-area points to the original barrage of other sub-areas, the server migrates the data copy of the original barrage to the sub-area corresponding to the high priority, and pushes the data copy to the client together with the reply barrage.
Optionally, in the case that the reply target is not explicitly selected, a Natural Language Processing (NLP) model is utilized to predict a possible reply target in combination with the context content of the barrage, and the possible reply target is used as an auxiliary recommendation means to help the server to more intelligently identify potential reply relations, so that the consistency of barrage interaction is improved. For example, when the server detects that one bullet screen may have a semantic association with a previous bullet screen, the two bullet screens are associated and presented in the appropriate format in the high priority sub-area, even if the anchor is not explicitly marked, ensuring that the viewer can clearly see the context of the interaction.
In step S205, after receiving the original bullet screen migrated by the server and the corresponding reply bullet screen, the client performs synchronous rendering display on the two bullet screens in the high-priority sub-area. Optionally, the client presents the reply barrage and its contextually relevant original barrage in a quoted or aggregated form, thereby forming a clear contextually relevant presentation. The method can intuitively display the interaction relation between the bullet screens, and enhances the continuity of live broadcast interaction.
For example, when a celebrity barrage zone renders a reply barrage and the common barrages to which the reply barrage is returned, the reply relationship is presented in the form of a visual reference block, so that a viewer can intuitively understand the interaction relationship between the barrages. The display mode not only enhances the continuity of live interaction, but also improves the user experience, so that the audience can track the context of barrage interaction more clearly.
According to one embodiment, the partition display function supports folding and unfolding operations for sub-regions to enhance the user experience and optimize interface space utilization, the method further comprising step S206.
In step S206, a folding or unfolding operation is performed on one or more sub-regions in response to the interactive operation at the viewer' S end.
The interactive operation includes, but is not limited to, inputting a text command or a voice command, clicking operation or touch operation, and the like.
The folding operation is a process of compressing the content of a certain sub-region to gradually reduce the height of the content, so that part or all of the content is hidden. For example, in response to a folding operation triggered by a voice command or the like in the viewer's side, the client gradually reduces the height of the high priority sub-region while retaining the important bullet (e.g., the most recent or most endorsed bullet) within that region as a representative bullet. Accordingly, the height of the normal barrage zone is correspondingly increased to fill in the space released by the folding of the high priority sub-zone.
The expanding operation refers to a process of restoring the content of a certain sub-region to gradually increase the height of the sub-region, so as to redisplay the previously hidden barrage content. In response to triggering the expansion operation, the client increases the height of the high-priority sub-region step by step, and resumes its complete display content, while the height of the normal barrage region decreases accordingly.
Through the flexible folding and unfolding mechanism, the embodiment of the application can dynamically adjust the display state of the barrage partition according to the operation habit and interface requirement of a user, thereby providing more optimized visual experience under different equipment and playing scenes.
Alternatively, the partitioned display processing of the bullet screen is executed or stopped in response to the interactive operation of the bullet screen partitioned display function by the viewer side.
According to the method, the live broadcast barrage area is divided into the subareas, barrages with different priorities are correspondingly displayed in each subarea, the problem that the barrage with high priority is easily submerged due to the mixed display of the barrages in a traditional barrage system is solved, the visibility of the barrages with high priority is remarkably improved, the heights of the corresponding subareas are automatically adjusted according to the number of the barrages with the priorities, the utilization of screen space is optimized, the use efficiency of interface space is improved, visual weakening treatment is carried out on the subareas with low priority in a Gaussian fuzzy filter mode and the like, visual interference is effectively reduced, visual focusing is enhanced, the reverted barrages with low priority are conveyed to the barrage with high priority for unified display through a display mechanism related to reverted barrages, the consistency and definition of barrages with the reverted relation which are difficult to visually express intuitively are improved, flexible interactive operation is provided, manual folding and unfolding of the barrage with high priority are supported by a user, the requirements of different audience content are met, and the interactive experience is improved.
The method of the embodiment of the present application is described below with reference to an example. The target video of this example is a star documentary live video. In this example, the total area of the display barrage is divided into two sub-areas, namely a normal barrage area and a celebrity barrage area.
When the live broadcast starts, the client initializes the barrage display area. The height of the normal barrage area is set to 500px, and the main space at the bottom of the screen is occupied for displaying the barrage of the normal user. The height of the celebrity barrage area is 0px, and the celebrity barrage area is in a hidden state and is dynamically unfolded when waiting for the celebrity to send the barrage. At this time, the viewer mainly focuses on the content of the general bullet screen area.
When a star sends a first barrage, the server receives the barrage and determines that the height of a celebrity barrage area is 50px according to a preset dynamic height calculation rule. The server then issues altitude mixture control instructions to the client via WebSocket. After receiving the instruction, the client dynamically expands the celebrity barrage area to 50px, and compresses the height of the common barrage area to 450px. Meanwhile, the client applies a Gaussian blur effect to the 50px area covered on the top of the common barrage area, and highlights the display content of the celebrity barrage area through visual weakening treatment, so that the attention of a spectator can be ensured to be focused on the celebrity barrage, and an effect diagram is shown in fig. 2 (a).
The star replies a common bullet, and after the server detects the reply relationship, the replied common bullet screen data is synchronized to the celebrity bullet screen area. The client renders the reply barrage and the common barrage cited by the reply barrage in the celebrity barrage area, and clearly displays the reply relation in the form of a cited block. This contextual presentation enables the viewer to intuitively understand the interactive content, enhancing the consistency of live interaction, and the display effect of the reply bullet screen is shown in fig. 2 (b).
If the star continuously sends a plurality of barrages, the height of the celebrity barrage area can be gradually increased according to the number of barrages. For example, every time one bullet screen is added, the height of the celebrity bullet screen area is increased by 50px until the maximum height of 450px is reached. At this time, the height of the normal barrage zone is compressed to a minimum of 50px to ensure that the celebrity barrage can be fully displayed. The dynamic height adjustment mechanism optimizes space allocation in real time according to the number of the barrages, and ensures that the celebrity barrages are always in a remarkable position.
During the live broadcast, the viewer can switch the bullet screen display state by clicking the fold button. When the audience clicks the folding button, the height of the celebrity barrage area is folded to 50px, and only the display space of one star barrage is reserved. At this point, the normal barrage zone height is restored to 450px and the viewer can refocus on the content of the normal barrage zone. The folding mechanism provides a flexible interactive experience, and meets the attention demands of audiences on different barrage contents.
And after the live broadcasting is finished, the client restores the heights of all barrage areas to a default state. The height of the common barrage zone is restored to 500px, the height of the celebrity barrage zone is restored to 0px, and the interface layout is restored to the initial state, so that the preparation is made for the next live broadcast.
The problem that the celebrity barrage is easy to cover, the visual level is insufficient, the replying relation is not clear and the like in live broadcasting is solved through layering barrage areas, dynamic height adjustment, gaussian blur visual focusing and replying barrage carrying mechanisms, the interaction experience of the live broadcasting barrage and the visibility of the celebrity barrage are remarkably improved, and the watching experience of audiences is optimized.
Fig. 3 is a schematic structural diagram of a first device for processing a barrage in a server and a second device for processing a barrage in a client according to an embodiment of the present application.
The first device comprises a barrage acquisition module 101, a zone determination module 102, a zone height determination module 103 and an instruction generation and transmission module 104. The second device shown includes an instruction parsing module 201, a sub-region adjustment module 202, and a bullet screen partition display module 203.
The bullet screen acquisition module 101 acquires bullet screen data to be displayed in a partitioned manner. The meaning of the target video and the barrage data is described in the foregoing, and will not be described herein.
Optionally, in response to an instruction for triggering the split display of the bullet screen of the target video, bullet screen data to be split displayed is acquired.
Optionally, the partition display instruction is automatically triggered when a bullet screen of a sender of a specific identity is received.
Alternatively, the partition display instruction may be triggered based on a setting operation on the viewer side.
In the embodiment of the application, a plurality of subareas are constructed in the total area of the display barrage, the visual levels of the subareas can be distinguished, and each subarea corresponds to different priorities. Wherein the priority of the sub-area may be determined based on identity information of the barrage sender.
The region determining module 102 determines the sub-region corresponding to each bullet screen to be processed according to the priority of the bullet screen.
According to one embodiment, the region determination module 102 further comprises a priority determination module and a sub-region allocation module.
The priority determining module determines priority information of each bullet screen to be processed.
The priority information is described in the foregoing, and is not described herein.
The sub-area distribution module distributes each bullet screen to be processed to the corresponding sub-area based on a preset mapping rule.
Optionally, the embodiment of the application distributes the barrage to the corresponding subareas for partition display based on the type of the barrage sender. For example, in a live scene where speaker identity needs to be distinguished, the live broadcast system may preset three roles, namely, a current live room anchor, other anchor or video-on-demand creator, and a common viewer. After the bullet screen data to be displayed in a partitioned mode are obtained, the server reads the identity of the sender of each bullet screen, distributes the sender of each bullet screen to the subarea corresponding to the corresponding role, distributes the bullet screen to the subarea at the top layer position for display if the bullet screen is sent by a host, distributes the bullet screen to the subarea at the middle layer position for display if the bullet screen is sent by an creator, and distributes the bullet screen to the subarea at the bottom layer position for display if the bullet screen is sent by a common audience.
Through the operation, the embodiment of the application can dynamically distribute the barrage into different subareas according to the priority of the barrage, thereby realizing layered display of the barrage and optimizing visual effect, and enhancing continuity and visual layering sense of barrage interaction.
The area height determining module 103 determines the area height corresponding to each sub-area according to the number of the bullet curtains to be displayed in each sub-area.
According to one embodiment, the zone height determining module 103 further includes a bullet screen number determining module and a zone height calculating module.
The bullet screen number determining module determines the number of real-time bullet screens to be displayed in each sub-area.
And the region height calculation module calculates the region height corresponding to each sub-region according to a preset height calculation rule.
Alternatively, the calculation rule may be a nonlinear mapping rule, including a step function, a logarithmic function, or a piecewise linear function, so that the height value of the sub-region may be dynamically adjusted based on the number of live shots, such as to generate a jump expansion or contraction when the number of shots reaches a preset threshold.
Optionally, the area height information of each sub-area calculated by the server side is pushed to the client side together with the barrage data through WebSocket, and the client side dynamically adjusts the size of the barrage display area according to the received area height information. Or the client side automatically calculates the height according to the bullet screen data actually received so as to realize more flexible dynamic adjustment. The WebSocket is a network communication protocol, provides a full duplex communication channel, and allows real-time data transmission between a client and a server.
The dynamic height adjustment mechanism of the subareas in the embodiment of the application ensures that the visible height of each subarea in the vertical direction can be independently adjusted along with the change of the number of the contained barrages. For example, when the number of celebrity barrages increases, the height of the celebrity barrage zone correspondingly expands, while the height of the ordinary barrage zone correspondingly compresses, whereas when the number of celebrity barrages decreases, the height of the celebrity barrage zone contracts, and the height of the ordinary barrage zone expands. And, expansion or contraction of any sub-region will trigger complementary adjustment of the remaining sub-regions in the same vertical dimension, thereby keeping the area of the total area of the bullet screen constant. The method optimizes the space allocation of barrage display, improves user experience, and ensures that barrages with different priorities can be reasonably presented visually. Through the mechanism, the embodiment of the application can flexibly adapt to the change of the number of the barrages, and simultaneously ensures the rationality of the interface layout and the continuity of the visual effect.
The instruction generation and transmission module 104 generates a corresponding barrage display instruction based on the obtained region heights of the sub-regions, and transmits the barrage display instruction to the client.
The bullet screen display instruction is used for indicating the subareas corresponding to each bullet screen in bullet screen data and the area height of each subarea. For example, the bullet screen display instructions may include key information such as a unique identifier of the bullet screen, hierarchical information of the display area to which the bullet screen belongs (e.g., celebrity bullet screen area or general bullet screen area), bullet screen content, a time stamp, and a height value of the bullet screen display area. The bullet screen display instruction enables the client to adjust the display layout of the bullet screen area according to the received instruction, and accurately renders the bullet screen to the corresponding subarea for display.
The instruction parsing module 201 parses, in response to receiving a bullet screen display instruction sent by the server, a sub-area corresponding to each bullet screen to be displayed and an area height of each sub-area.
The analysis process comprises the steps of extracting and analyzing key fields in the barrage display instruction, such as a unique identifier of the barrage, hierarchical information of a sub-region (such as a celebrity barrage region or a common barrage region), barrage content, a time stamp, a height value of each barrage display region and the like. The client determines from these fields the display position of each bullet screen and the height of the corresponding sub-region, ready for the subsequent rendering operation.
The sub-region adjustment module 202 adjusts the size of each sub-region according to the received region height of each sub-region.
The resizing process includes dynamically calculating the vertical position and height of each sub-region to ensure that the layout of the sub-regions in the vertical direction conforms to the height instructions sent by the server. Specifically, the client adjusts the size of each sub-region according to the height value obtained by analysis, and meanwhile ensures that the boundaries between the sub-regions are clear and the transition is smooth.
Optionally, the client combines the device attribute of the client to adjust the total area of the display barrage and/or the size of each subarea so as to ensure that the barrage displayed in each subarea can be normally displayed under the size of the current device and maintain the aesthetic property and the readability of the overall layout. Wherein the heights of the barrage areas of different types of client devices may be different.
Optionally, the height of the total area may be adaptively adjusted according to the viewport height (viewport height) of the client device, and the heights of the sub-areas may be dynamically adaptively adjusted according to the device type and the playing scene, so as to ensure that the bullet screen display area can keep good user experience on different devices.
The height of the total area can be scaled according to the view port height of the device, so that self-adaptive layout is realized.
In the dynamic adjustment process, the height calculation reference of the barrage area is the height of the player from the bottom. In a non-full screen scenario, the height of the bullet screen area is divided according to the distance from the bottom of the player to the top of the screen. If a full screen scene, 50% of the picture height (this ratio can be adjusted by the profile) is used by default as the height of the bullet screen area. This dynamic adjustment mechanism ensures that the height of the bullet screen area can be flexibly adapted to different play scenes and device types, thereby providing a more optimal visual experience.
Optionally, the heights of the sub-regions are dynamically adapted according to the device type and the playing scene.
According to one embodiment, the sub-region adjustment module 202 dynamically adjusts the heights of the sub-regions according to the number of live barrages. The operation of determining the height of each sub-area according to the real-time bullet screen number is similar to the operation of the aforementioned area height determining module 103, and will not be described herein.
Through the self-adaptive adjustment mechanism based on the height of the viewing port, the method and the device can effectively solve the problem of the difference in the heights of the barrage areas among different devices, and meanwhile, the consistency of barrage display and the consistency of user experience are maintained.
The bullet screen partition display module 203 displays bullet screens with corresponding priorities in the respective sub-areas after the resizing.
In the barrage rendering process, the barrage partition display module 203 dynamically allocates the display space of the barrage according to the area height and the position information of each sub-area. Specifically, according to the priority of the barrage and the sub-region to which the barrage belongs, the barrage content is rendered into the corresponding display region, so that the barrage is ensured to be reasonably arranged and displayed in each sub-region according to the priority sequence.
According to one embodiment, the client applies a smooth animation effect in the process of displaying the bullet screen in each adjusted sub-region, so as to avoid visual mutation caused by size change, and further improve user experience. Optionally, the smooth transition animation adopts a cubic Bezier curve or a spring physical model, and the animation duration is dynamically adjusted based on the current subarea height variation so as to maintain visual consistency.
The smooth transition animation can realize natural slow motion effect by using Bezier curve, and ensures that the dynamic adjustment of the height change and the blurring effect is smoother.
According to an embodiment, to achieve differentiation of visual levels, the second device further comprises a visual weakness processing module.
The visual weakening processing module performs visual weakening on one or more subareas with lower priorities so as to realize visual weakening of the bullet screen in the subareas.
Optionally, a CSS (cascading style sheet, CASCADING STYLE SHEETS) gaussian blur filter is used for visual weakening, which process comprises:
Firstly, dynamically setting the height of a covering layer by a client, and adjusting the size of the covering layer in real time according to the actual height of a high-priority sub-region;
The coverage area is then processed using the blurring effect to reduce visual interference of the lower priority barrage. Optionally, the client further enhances the visual separation effect by adding a translucent background. For optimizing the performance, the client adopts various technical means, such as prompting the browser to perform performance optimization, forcedly starting hardware acceleration and avoiding the cover layer from blocking user interaction;
and finally, the client realizes dynamic change of the height of the covering layer and the blurring effect through smooth transition animation, and ensures natural transition of the visual effect.
In addition to CSS gaussian blur filters, clients may employ other alternatives to achieve similar visual weakening effects. For example, SVG filters are used to achieve more complex blur effects, canvas is used for real-time blur processing suitable for scenes requiring highly custom, or multi-layer mask gradation is used to achieve blur-like visual effects through transparency changes. The person skilled in the art can flexibly select the alternatives described above according to the actual requirements.
According to one embodiment, the first device further comprises a reply barrage processing module, and the second device further comprises a reply barrage display module.
And in response to detecting that the reply barrage in the high-priority subarea points to the original barrages of other subareas, the reply barrage processing module migrates the data copy of the original barrage to the subarea corresponding to the high priority and pushes the data copy to the client together with the reply barrage.
Optionally, in the case that the reply target is not explicitly selected, the reply barrage processing module predicts a possible reply target by using a Natural Language Processing (NLP) model in combination with the context content of the barrage, and serves as an auxiliary recommendation means to help the server to more intelligently identify potential reply relations, thereby improving the consistency of barrage interaction. For example, when the server detects that one bullet screen may have a semantic association with a previous bullet screen, the two bullet screens are associated and presented in the appropriate format in the high priority sub-area, even if the anchor is not explicitly marked, ensuring that the viewer can clearly see the context of the interaction.
And responding to the received original barrage and the corresponding reply barrage migrated by the server, and synchronously rendering and displaying the original barrage and the corresponding reply barrage in the high-priority subarea by the reply barrage display module. Optionally, the reply-barrage display module presents the original barrages of the reply barrages and their contextual associations in a quoted or aggregated form, thereby forming a clear contextual presentation. The method can intuitively display the interaction relation between the bullet screens, and enhances the continuity of live broadcast interaction.
According to one embodiment, the apparatus supports folding and unfolding operations for sub-regions to enhance user experience and optimize interface space utilization, and the second apparatus further comprises a folding and unfolding module.
In response to interactive operation at the viewer's end, the fold-and-unfold module performs a fold operation or an unfold operation on one or more sub-regions.
The interactive operation includes, but is not limited to, inputting a text command or a voice command, clicking operation or touch operation, and the like.
The folding operation is a process of compressing the content of a certain sub-region to gradually reduce the height of the content, so that part or all of the content is hidden. For example, in response to a folding operation triggered by a voice command or the like in the viewer's side, the client gradually reduces the height of the high priority sub-region while retaining the important bullet (e.g., the most recent or most endorsed bullet) within that region as a representative bullet. Accordingly, the height of the normal barrage zone is correspondingly increased to fill in the space released by the folding of the high priority sub-zone.
The expanding operation refers to a process of restoring the content of a certain sub-region to gradually increase the height of the sub-region, so as to redisplay the previously hidden barrage content. In response to triggering the expansion operation, the client increases the height of the high-priority sub-region step by step, and resumes its complete display content, while the height of the normal barrage region decreases accordingly.
Through the flexible folding and unfolding mechanism, the embodiment of the application can dynamically adjust the display state of the barrage partition according to the operation habit and interface requirement of a user, thereby providing more optimized visual experience under different equipment and playing scenes.
Alternatively, the partitioned display processing of the bullet screen is executed or stopped in response to the interactive operation of the bullet screen partitioned display function by the viewer side.
According to the device, the live broadcast barrage area is divided into the subareas, barrages with different priorities are correspondingly displayed in each subarea, the problem that the barrage with high priority is easily submerged due to the mixed display of the barrages in a traditional barrage system is solved, the visibility of the barrages with high priority is remarkably improved, the heights of the corresponding subareas are automatically adjusted according to the number of the barrages with different priorities, the utilization of screen space is optimized, the use efficiency of interface space is improved, visual weakening treatment is carried out on the subareas with low priority in a Gaussian fuzzy filter mode and the like, visual interference is effectively reduced, visual focusing is enhanced, the reverted barrages with low priority are conveyed to the barrage area with high priority for unified display through the barrage conveying and context association display mechanism, the problem that the reverted relationship is difficult to visually express intuitively is solved, the consistency and the definition of barrage interaction are enhanced, flexible interactive operation is provided, manual folding and unfolding of the barrage area with high priority by a user is supported, the requirements of different audience content are met, and the interactive experience is improved.
Based on the same inventive concept, an electronic device is further provided in the embodiments of the present application, and the corresponding method of the electronic device may be the method in the foregoing embodiments, and the principle of solving the problem is similar to that of the method. The electronic device provided by the embodiment of the application comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method and/or the technical scheme of the plurality of embodiments of the application.
The electronic device may be a user device, or a device formed by integrating the user device and a network device through a network, or may also be an application running on the device, where the user device includes, but is not limited to, a computer, a mobile phone, a tablet computer, a smart watch, a bracelet, and other various terminal devices, and the network device includes, but is not limited to, a network host, a single network server, a plurality of network server sets, or a computer set based on cloud computing, where the network device is implemented, and may be used to implement a part of processing functions when setting an alarm clock. Here, the Cloud is composed of a large number of hosts or web servers based on Cloud Computing (Cloud Computing), which is a kind of distributed Computing, one virtual computer composed of a group of loosely coupled computer sets.
Fig. 4 shows a structure of a device suitable for implementing the method and/or technical solution in an embodiment of the present application, the device 1200 includes a central processing unit (CPU, central Processing Unit) 1201, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1202 or a program loaded from a storage portion 1208 into a random access Memory (RAM, random Access Memory) 1203. In the RAM 1203, various programs and data required for the system operation are also stored. The CPU 1201, ROM 1202, and RAM 1203 are connected to each other through a bus 1204. An Input/Output (I/O) interface 1205 is also connected to the bus 1204.
Connected to the I/O interface 1205 are an input section 1206 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, and the like, an output section 1207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), an LED display, an OLED display, and the like, and a speaker, a storage section 1208 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, and the like, and a communication section 1209 including a network interface card such as a LAN (local area network ) card, a modem, and the like. The communication section 1209 performs communication processing via a network such as the internet.
In particular, the methods and/or embodiments of the present application may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. The above-described functions defined in the method of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 1201.
Another embodiment of the present application also provides a computer readable storage medium having stored thereon computer program instructions executable by a processor to implement the method and/or the technical solution of any one or more of the embodiments of the present application described above.
In particular, the present embodiments may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowchart or block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of devices, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple elements or page components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform part of the steps of the methods described in the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same, and although the present application has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present application.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. Several of the units or means recited in the apparatus may be embodied by one unit or means by software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.

Claims (15)

1.一种在服务端中处理弹幕的方法,其中,所述方法包括:1. A method for processing bullet comments on a server, wherein the method includes: 获取需要分区显示的弹幕数据;Obtain the bullet screen data that needs to be displayed in different sections; 根据弹幕的优先级,确定待处理的各条弹幕对应的子区域;Based on the priority of the bullet comments, determine the sub-regions corresponding to each bullet comment to be processed; 根据各个子区域中待显示的弹幕数量,确定各个子区域对应的区域高度;The height of each sub-region is determined based on the number of bullet comments to be displayed in each sub-region. 基于得到的各个子区域的区域高度,生成相应的弹幕显示指令并发送至客户端,所述弹幕显示指令用于指示弹幕数据中各条弹幕对应的子区域以及每个子区域的区域高度。Based on the obtained area height of each sub-region, a corresponding bullet screen display instruction is generated and sent to the client. The bullet screen display instruction is used to indicate the sub-region corresponding to each bullet screen in the bullet screen data and the area height of each sub-region. 2.根据权利要求1所述的方法,其中,所述方法还包括:2. The method according to claim 1, wherein the method further comprises: 在显示弹幕的总区域中构建多个子区域,各个子区域的视觉层级可区分,每个子区域分别对应于不同的优先级。Multiple sub-regions are constructed within the main area for displaying bullet comments. The visual hierarchy of each sub-region is distinguishable, and each sub-region corresponds to a different priority. 3.根据权利要求1所述的方法,其中,根据各个子区域中待显示的弹幕数量,确定各个子区域对应的区域高度包括:3. The method according to claim 1, wherein determining the region height corresponding to each sub-region based on the number of bullet comments to be displayed in each sub-region includes: 确定每个子区域内的需要显示的实时弹幕数量;Determine the number of real-time bullet comments to be displayed in each sub-area; 根据预设的高度计算规则,计算每个子区域对应的区域高度。Calculate the area height corresponding to each sub-area according to the preset height calculation rules. 4.根据权利要求1所述的方法,其中,所述方法还包括:4. The method according to claim 1, wherein the method further comprises: 在检测到高优先级子区域内的回复弹幕指向其他子区域的原始弹幕时,将所述原始弹幕的数据副本迁移至高优先级对应的子区域,并与所述回复弹幕一起推送至客户端。When a reply message in a high-priority sub-region is detected to point to an original message in another sub-region, a data copy of the original message is migrated to the corresponding high-priority sub-region and pushed to the client along with the reply message. 5.一种在客户端中处理弹幕的方法,其中,所述方法包括:5. A method for processing bullet comments in a client, wherein the method includes: 响应于接收到服务端发送的弹幕显示指令,解析得到待显示的各条弹幕相应的子区域以及每个子区域的区域高度;In response to receiving the bullet screen display command sent by the server, the corresponding sub-regions of each bullet screen to be displayed and the region height of each sub-region are parsed. 根据接收到的每个子区域的区域高度,调整各子区域的尺寸;Adjust the size of each sub-region based on the received region height; 在经过尺寸调整的各个子区域中分别显示对应优先级的弹幕。Each sub-region, after being resized, displays bullet comments of the corresponding priority. 6.根据权利要求5所述的方法,其中,所述方法还包括:6. The method according to claim 5, wherein the method further comprises: 对优先级较低的一个或多个子区域进行视觉弱化处理,以实现该区域中弹幕的视觉弱化。Visually weaken one or more sub-regions with lower priority to reduce the visual impact of bullet comments in those regions. 7.根据权利要求6所述的方法,其中,使用CSS高斯模糊滤镜进行视觉差异化处理,视觉弱化处理的过程包括;7. The method according to claim 6, wherein the process of visual weakening processing using a CSS Gaussian blur filter includes: 动态设置覆盖层的高度,根据高优先级子区域的实际高度实时调整覆盖层的尺寸;Dynamically set the height of the overlay and adjust its size in real time based on the actual height of the high-priority sub-regions; 应用模糊效果对覆盖区域进行处理,以降低较低优先级弹幕的视觉干扰;Apply a blur effect to the covered area to reduce visual interference from lower-priority bullet comments; 通过平滑过渡动画实现覆盖层高度和模糊效果的动态变化,确保视觉效果的自然过渡。The smooth transition animation dynamically changes the overlay height and blur effect, ensuring a natural visual transition. 8.根据权利要求5至7中任一项所述的方法,其中,所述方法还包括:8. The method according to any one of claims 5 to 7, wherein the method further comprises: 在接收到服务端迁移的原始弹幕及其对应的回复弹幕后,将两者在所述高优先级子区域内进行同步渲染显示。After receiving the original bullet comments and their corresponding reply bullet comments migrated from the server, both will be rendered and displayed synchronously in the high-priority sub-region. 9.根据权利要求5至7中任一项所述的方法,其中,所述方法还包括:9. The method according to any one of claims 5 to 7, wherein the method further comprises: 响应于观众端的互动操作,对一个或多个子区域执行折叠或展开操作。In response to interactive actions from the viewer, perform a collapsing or expanding operation on one or more sub-areas. 10.一种用于在服务端中处理弹幕的第一装置,其中,所述第一装置包括:10. A first apparatus for processing bullet comments on a server, wherein the first apparatus comprises: 弹幕获取模块,用获取需要分区显示的弹幕数据;The bullet screen acquisition module is used to obtain the bullet screen data that needs to be displayed in different sections. 区域确定模块,用于根据弹幕的优先级,确定待处理的各条弹幕对应的子区域;The region determination module is used to determine the sub-regions corresponding to each bullet comment to be processed based on the priority of the bullet comments; 区域高度确定模块,用于根据各个子区域中待显示的弹幕数量,确定各个子区域对应的区域高度;The area height determination module is used to determine the area height of each sub-area based on the number of bullet comments to be displayed in each sub-area; 指令生成发送模块,用于基于得到的各个子区域的区域高度,生成相应的弹幕显示指令并发送至客户端,所述弹幕显示指令用于指示弹幕数据中各条弹幕对应的子区域以及每个子区域的区域高度。The instruction generation and sending module is used to generate corresponding bullet screen display instructions based on the obtained area height of each sub-region and send them to the client. The bullet screen display instructions are used to indicate the sub-regions corresponding to each bullet screen in the bullet screen data and the area height of each sub-region. 11.一种用于在客户端中显示弹幕的第二装置,其中,所述第二装置包括:11. A second device for displaying bullet comments in a client, wherein the second device comprises: 指令解析模块,用于响应于接收到服务端发送的弹幕显示指令,解析得到待显示的各条弹幕相应的子区域以及每个子区域的区域高度;The instruction parsing module is used to respond to the barrage display instruction sent by the server, and parse it to obtain the corresponding sub-regions of each barrage to be displayed and the region height of each sub-region; 子区域调整模块,用于根据接收到的每个子区域的区域高度,调整各子区域的尺寸;The sub-region adjustment module is used to adjust the size of each sub-region based on the received region height of each sub-region; 弹幕分区显示模块,用于在经过尺寸调整的各个子区域中分别显示对应优先级的弹幕。The bullet screen partition display module is used to display bullet screens of corresponding priorities in each sub-region after the size has been adjusted. 12.一种弹幕处理系统,其中,所述系统包括根据权利要求10所述的第一装置和根据权利要求11所述的第二装置。12. A bullet screen processing system, wherein the system comprises the first device according to claim 10 and the second device according to claim 11. 13.一种电子设备,所述电子设备包括:13. An electronic device, the electronic device comprising: 至少一个处理器;以及At least one processor; and 与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1至4中任一项所述的方法,或者执行权利要求5至9中任一项所述的方法。The memory stores instructions that can be 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 4, or the method of any one of claims 5 to 9. 14.一种计算机可读介质,其上存储有计算机程序指令,所述计算机程序指令可被处理器执行以实现如权利要求1至4中任一项所述的方法,或者执行权利要求5至9中任一项所述的方法。14. A computer-readable medium having stored thereon computer program instructions that can be executed by a processor to implement the method of any one of claims 1 to 4, or to implement the method of any one of claims 5 to 9. 15.一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如权利要求1至4中任一项所述的方法,或者实现权利要求5至9中任一项所述的方法。15. A computer program product comprising a computer program that, when executed by a processor, implements the method as claimed in any one of claims 1 to 4, or implements the method as claimed in any one of claims 5 to 9.
CN202511798976.2A 2025-12-01 2025-12-01 Methods, apparatus, readable media, and program products for processing bullet comments. Pending CN121367803A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202511798976.2A CN121367803A (en) 2025-12-01 2025-12-01 Methods, apparatus, readable media, and program products for processing bullet comments.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202511798976.2A CN121367803A (en) 2025-12-01 2025-12-01 Methods, apparatus, readable media, and program products for processing bullet comments.

Publications (1)

Publication Number Publication Date
CN121367803A true CN121367803A (en) 2026-01-20

Family

ID=98420123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202511798976.2A Pending CN121367803A (en) 2025-12-01 2025-12-01 Methods, apparatus, readable media, and program products for processing bullet comments.

Country Status (1)

Country Link
CN (1) CN121367803A (en)

Similar Documents

Publication Publication Date Title
CN111010585B (en) Virtual gift sending method, device, equipment and storage medium
CN111541930B (en) Live broadcast picture display method and device, terminal and storage medium
CN111078070B (en) PPT video barrage play control method, device, terminal and medium
US8749690B2 (en) In-context content capture
KR20200035491A (en) Reducing latency in map interfaces
CN111327940A (en) Video playing method, device and system
CN107241657A (en) Video broadcasting method, device, computing device and storage medium
US20210090354A1 (en) User interface and functions for virtual reality and augmented reality
US20180246871A1 (en) Multiplane animation system
CN107707965B (en) Bullet screen generation method and device
CN115396717B (en) Display device and display image quality adjusting method
US11991420B2 (en) Live commenting processing method and system
EP4676067A1 (en) Virtual gift generation method and apparatus, device, and medium
US20250287064A1 (en) Live stream video processing method, apparatus, electronic device, and storage medium
CN121367803A (en) Methods, apparatus, readable media, and program products for processing bullet comments.
CN111610949A (en) Data large screen display method and device and electronic equipment
CN114546229B (en) Information processing method, screen capturing method and electronic equipment
CN112492399A (en) Information display method and device and electronic equipment
CN117194816A (en) Search content display method, AR device and computer-readable medium in three-dimensional space
CN113038225A (en) Video playing method and device, computing equipment and storage medium
CN112770099B (en) Multimedia playing method, device, terminal and storage medium
CN118646742A (en) Video playback method, device, equipment, and computer storage medium for mini program
HK40083848A (en) Video playing method, processing method, device, equipment and storage medium
WO2024088375A1 (en) Bullet comment presentation method and apparatus, device, and storage medium
CN119545108A (en) Method, device, medium and program product for displaying bullet screen special effects

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination