A bullet screen display method, device, equipment and medium

By obtaining the positions of the video and bullet screen view layers, determining the overlapping areas, and drawing background transparency differences, the problem of bullet screen areas obscuring the video or showing through the desktop was solved, improving the bullet screen display effect and performance.

CN122293936APending Publication Date: 2026-06-26BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411920452.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing technologies, the bullet screen area can easily obscure the video or show through the desktop during video playback, resulting in a poor user viewing experience, and full-screen rendering leads to low performance.

Method used

By obtaining the positions of the video view layer and the bullet screen view layer, the overlapping area is determined, and the background transparency is differentiated for drawing. This ensures that the minimum area of ​​the video and bullet screen view layers is drawn, avoiding occlusion and transparency issues.

Benefits of technology

The effect of bullet comments has been improved, the view layer size of video and bullet comments has been kept unchanged, performance and power consumption have been optimized, and the issue of desktop exposure when switching taskbars has been resolved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122293936A_ABST
    Figure CN122293936A_ABST
Patent Text Reader

Abstract

This disclosure relates to a method, apparatus, device, and medium for displaying bullet comments (danmaku). The method includes: in response to a video playback request, obtaining a first position of a video view layer and a second position of a bullet comment view layer; determining an overlapping area of ​​the video view layer and the bullet comment view layer based on the first and second positions; drawing the video view layer and performing differential rendering of the background transparency of the bullet comment view layer based on the overlapping area; displaying a target video on the video view layer and displaying bullet comment information of the target video on the bullet comment view layer. This disclosure performs differential rendering of the background transparency of the bullet comment view layer based on the overlapping area to display bullet comment information. This maintains the size of the video and bullet comment view layers while minimizing the rendering area, achieving optimal performance and power consumption. Simultaneously, the differential rendering of the background transparency of the overlapping area solves the problem of the desktop showing through when switching taskbars, improving the bullet comment display effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, device and medium for displaying bullet comments. Background Technology

[0002] Bullet comments can be displayed on the video screen during playback, allowing users to participate in real-time discussions and interactions. Both the video and bullet comments can be drawn using view controls. To avoid obscuring the video, the bullet comment area can be set to a completely transparent background. However, when switching taskbars in the application, adjustments to the layer drawing mechanism can cause the bullet comment area to show through the desktop. Related technologies have addressed this issue by drawing both the video and bullet comments using full-screen view controls. However, this approach results in view control areas far exceeding the area to be displayed, leading to performance degradation and requiring improvement. Summary of the Invention

[0003] To address the aforementioned technical problems, this disclosure provides a method, apparatus, device, and medium for displaying bullet comments.

[0004] This disclosure provides a method for displaying bullet comments, the method including:

[0005] In response to a video playback request, obtain the first position of the video view layer and the second position of the bullet screen view layer;

[0006] The overlapping area of ​​the video view layer and the bullet screen view layer is determined based on the first position and the second position;

[0007] Draw the video view layer, and draw the background transparency of the bullet screen view layer differently based on the overlapping area;

[0008] The target video is displayed in the video view layer, and the bullet screen information of the target video is displayed in the bullet screen view layer.

[0009] This disclosure also provides a bullet screen display device, the device comprising:

[0010] The acquisition module is used to acquire the first position of the video view layer and the second position of the bullet screen view layer in response to a video playback request.

[0011] An overlap module is used to determine the overlap area between the video view layer and the bullet screen view layer based on the first position and the second position.

[0012] A drawing module is used to draw the video view layer and to perform differentiated drawing of the background transparency of the bullet screen view layer based on the overlapping area;

[0013] The display module is used to display the target video in the video view layer and the bullet screen information of the target video in the bullet screen view layer.

[0014] This disclosure also provides an electronic device, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the bullet screen display method provided in this disclosure.

[0015] This disclosure also provides a computer-readable storage medium storing a computer program for executing the bullet screen display method provided in this disclosure.

[0016] Compared with the prior art, the technical solution provided in this disclosure has the following advantages: The bullet screen display scheme provided in this disclosure, in response to a video playback request, obtains a first position of the video view layer and a second position of the bullet screen view layer; determines the overlapping area of ​​the video view layer and the bullet screen view layer based on the first and second positions; draws the video view layer, and performs differentiated background transparency drawing on the bullet screen view layer based on the overlapping area; displays the target video in the video view layer, and displays the bullet screen information of the target video in the bullet screen view layer. By adopting the above technical solution, determining the overlapping area based on the positions of the video view layer and the bullet screen view layer, and performing differentiated background transparency drawing on the bullet screen view layer based on this overlapping area to display bullet screen information, it can maintain the size of the video and bullet screen view layers while keeping the minimum area drawn, achieving optimal performance and power consumption. At the same time, the differentiated background transparency drawing in the overlapping area solves the problem of the desktop showing through when switching taskbars, improving the bullet screen display effect. Attached Figure Description

[0017] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0018] Figure 1 This is a schematic diagram illustrating the display of bullet comments in related technologies.

[0019] Figure 2 This is a schematic diagram of the bullet screen view layer in related technologies;

[0020] Figure 3 A flowchart illustrating a bullet screen display method provided in an embodiment of this disclosure;

[0021] Figure 4 A schematic diagram illustrating a bullet screen display provided in an embodiment of this disclosure;

[0022] Figure 5 A flowchart illustrating another method for displaying bullet comments provided in this embodiment of the present disclosure;

[0023] Figure 6 A schematic diagram illustrating another form of bullet screen display provided in this embodiment of the disclosure;

[0024] Figure 7 This is a schematic diagram of the structure of a bullet screen display device provided in an embodiment of the present disclosure;

[0025] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0026] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0027] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0028] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0029] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0030] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0031] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0032] In related technologies, the view hierarchy of the bullet comments is higher than that of the video. If the bullet comment area is entirely opaque, it will partially obscure the video playback. If the bullet comment area is entirely transparent, the bullet comment area may appear to show through the desktop due to adjustments in the layer drawing mechanism when the application switches to the taskbar. For example, Figure 1 This is a schematic diagram of the display of bullet comments in related technologies. The diagram shows the interface 100 when the application switches the taskbar. The interface 100 includes a bullet comment area 101 with a completely transparent background and a video area 102. The vertical background of the desktop is visible in the non-overlapping area of ​​the bullet comment area 101 and the video area 102, resulting in a poor viewing experience for the user when switching the taskbar.

[0033] To solve this problem, the relevant technology adopts a solution of drawing a full-screen bullet screen view layer and a full-screen video view layer, for example, Figure 2 This is a schematic diagram of the bullet screen view layer in related technologies, such as Figure 2 As shown in the figure, the full-screen bullet screen view layer and the bullet screen display area in the middle are displayed. It can be seen that the area of ​​the bullet screen view layer is much larger than the actual bullet screen display area, and the area of ​​the full-screen video view layer is also much larger than the actual video display area, resulting in poor performance.

[0034] To address the aforementioned issues, this disclosure provides a method for displaying bullet comments, which will be described below with reference to specific embodiments.

[0035] Figure 3 This is a flowchart illustrating a bullet screen display method provided in an embodiment of this disclosure. The method can be executed by a bullet screen display device, which can be implemented using software and / or hardware, and is generally integrated into an electronic device. Figure 3 As shown, the method includes:

[0036] Step 301: In response to the video playback request, obtain the first position of the video view layer and the second position of the bullet screen view layer.

[0037] The video playback request can be a user-initiated request to play a target video, specifically obtained in response to the user's gesture control operation (such as clicking, long-pressing, double-tapping, etc.) on the video entry control of the target video. The target video can be the video that is about to be played, and the target video carries corresponding bullet screen information to be displayed during playback. The specific video type is not limited, and the target video can include short videos, long videos, etc. The bullet screen display method of this embodiment can be executed by a device based on a target operating system. The target operating system can be an operating system with a complex layer drawing mechanism during taskbar switching, so that the bullet screen background is fully transparent and shows through the desktop.

[0038] The video view layer can be a view layer used to display the video, drawn using a view control. The bullet comment view layer can be a view layer used to display bullet comment information, drawn using a view control. The bullet comment view layer has a higher hierarchy than the bullet comment view layer. Optionally, both the video view layer and the bullet comment view layer can be drawn using a target view control with an independent thread and an independent drawing surface. This target view control inherits from the view class and can be drawn in an independent thread. This allows the target view control to achieve complex and efficient user interface (UI) rendering without consuming main thread resources, thus enabling timely responses to other user input events.

[0039] Optionally, the size of the video view layer is the same as the size of the target video's playback interface, and the size of the bullet comment view layer is the same as the display size of the bullet comment information. The size of the target video's playback interface is controlled by the video player and is fixed. The size of the video view layer is set to be the same as the size of the target video's playback interface, using the minimum area for video display. The display size of the bullet comment information can be preset and is also fixed. Setting the size of the bullet comment view layer to be the same as the display size of the bullet comment information achieves the use of the minimum area for bullet comment display.

[0040] Specifically, when the bullet screen display device receives a user's video playback request, it can obtain the target video and the first position of the video view layer and the second position of the bullet screen view layer. The first position refers to the drawing position of the video view layer set in advance on the screen, which may include four vertex coordinates. The second position refers to the drawing position of the bullet screen view layer set in advance on the screen, which may also include four vertex coordinates. The first and second positions are obtained in preparation for subsequent drawing of the view layer.

[0041] Step 302: Determine the overlapping area of ​​the video view layer and the bullet screen view layer based on the first position and the second position.

[0042] The overlapping area can be the part where two view layers intersect or cover each other in spatial position. In this embodiment of the disclosure, it refers to the intersection area of ​​the video view layer and the bullet screen video image, which involves the mutual occlusion and coverage of the two views in the same display area. The display of the overlapping area can be achieved according to the view hierarchy relationship and transparency settings.

[0043] In some embodiments, determining the overlapping area of ​​the video view layer and the bullet screen view layer based on a first position and a second position may include: determining a first rectangular area of ​​the video view layer based on the first position and determining a second rectangular area of ​​the bullet screen view layer based on the second position; if the first rectangular area and the second rectangular area intersect in both the horizontal and vertical directions, then the video view layer and the bullet screen view layer overlap, and the overlapping area is determined.

[0044] The first rectangular area can be a rectangular area determined based on the first position of the video view layer, and the second rectangular area can be a rectangular area determined based on the second position of the bullet screen view layer. Specifically, after obtaining the first and second positions, the bullet screen display device can determine whether there is an overlapping area between the video view layer and the bullet screen view layer based on the first and second positions. The specific determination process is as follows: the first rectangular area is determined based on the first position, and the second rectangular area is determined based on the second position. If the left boundary of one rectangular area is smaller than the right boundary of the other rectangular area and the right boundary of one rectangular area is larger than the left boundary of the other rectangular area, then the first and second rectangular areas are determined to intersect in the horizontal direction. If the upper boundary of one rectangular area is smaller than the lower boundary of the other rectangular area and the lower boundary of one rectangular area is larger than the upper boundary of the other rectangular area, then the first and second rectangular areas are determined to intersect in the vertical direction. If the intersection exists in both the horizontal and vertical directions, then the first and second rectangular areas are determined to overlap, and the specific location of the overlapping area can be determined, which may include the coordinates of the four vertices of the overlapping area.

[0045] For example, Figure 4 This is a schematic diagram of a bullet screen display provided in an embodiment of the present disclosure, such as... Figure 4 As shown in the figure, there is an overlapping area between the bullet screen view layer and the video view layer.

[0046] Step 303: Draw the video view layer, and draw the background transparency of the bullet screen view layer differently based on the overlapping area.

[0047] Differentiated background transparency can be understood as setting different background transparency for the overlapping area and other areas of the bullet screen view layer to achieve differentiated drawing and display.

[0048] Specifically, the bullet screen display device can draw a video view layer based on the first position and a bullet screen view layer based on the second position, and differentiate the background transparency based on the area size of the overlapping area of ​​the bullet screen view layers during the drawing process.

[0049] For example, Figure 5 A flowchart illustrating another bullet screen display method provided in this disclosure embodiment is shown below. Figure 5 As shown, in one feasible implementation, differential rendering of the background transparency of the bullet screen view layer based on the overlapping area may include:

[0050] Step 501: Determine whether the area of ​​the overlapping region is smaller than the area of ​​the bullet screen view layer. If so, proceed to step 502; otherwise, proceed to step 503.

[0051] The bullet screen display device can first compare the area of ​​the overlapping area with the area of ​​the bullet screen view layer. If the area of ​​the overlapping area is smaller than the area of ​​the bullet screen view layer, then step 502 is executed; otherwise, the area of ​​the overlapping area is determined to be equal to the area of ​​the bullet screen view layer, and step 503 is executed.

[0052] Step 502: Set the background transparency of the overlapping area in the bullet screen view layer to transparent and draw it, and set the background transparency of the non-overlapping area in the bullet screen view layer to opaque and draw it.

[0053] The non-overlapping area can be any area in the bullet screen view layer other than the overlapping area. Background transparency can be the transparency of the background image, which can be controlled by the transparency channel (Alpha channel). The value of the Alpha channel can be an integer between 0 and 255, where 0 represents complete transparency, that is, the background image is not visible, 255 represents complete opacity, that is, the background image is completely visible, and values ​​between 0 and 255 represent different degrees of semi-transparency.

[0054] Specifically, the bullet screen display device can draw a transparent background image for the overlapping area of ​​the bullet screen view layer by setting the background transparency of the overlapping area to 0, so that the underlying video view layer can be directly displayed without obscuring the video. For the non-overlapping area of ​​the bullet screen view layer, the background transparency can be set to 255 to obtain an opaque background image. The specific fill color of the background image can be set according to the display color outside the video view layer, for example, it can be set to black to obtain a black background image.

[0055] For example, see Figure 5In the image, the overlapping area of ​​the bullet screen view layer is a transparent background, directly displaying the underlying video view layer, while the non-overlapping area of ​​the bullet screen view layer is an opaque background. The image uses an opaque dark gray background image of the non-overlapping area as an example.

[0056] Step 503: Determine that the area of ​​the overlapping region is equal to the area of ​​the bullet screen view layer, and set the background transparency of the bullet screen view layer to transparent before drawing.

[0057] If the area of ​​the overlapping region is determined to be equal to the area of ​​the bullet screen view layer, then the bullet screen view layer can be determined to completely cover the video view layer. The background transparency of the entire bullet screen view layer can be set to 0 to draw the background image, resulting in a transparent background image that can directly display the underlying video view layer without obscuring the video.

[0058] In some embodiments, the bullet screen display method further includes: if the overlapping area does not exist, setting the background transparency of the bullet screen view layer to opaque before drawing.

[0059] If the overlapping area of ​​the bullet screen display device is determined to be zero, that is, the overlapping area is bucp matched, the background transparency of the entire bullet screen view layer can be set to 255 to obtain an opaque background image. Since the background image is opaque, it will not show through the desktop when switching taskbars.

[0060] In the above solution, the minimum area can be used for drawing the bullet screen view layer and the video view layer. When drawing the bullet screen view layer, the overlapping area with the video view layer is made transparent, and the non-overlapping area with the video view layer is made opaque. This achieves differentiated drawing of background transparency, which neither obscures video playback nor makes the desktop visible when switching taskbars.

[0061] Step 304: Display the target video in the video view layer and display the bullet screen information of the target video in the bullet screen view layer.

[0062] The target video can be a video that is about to be played, and it carries corresponding bullet comments to be displayed during playback. The specific video type is not limited; the target video can include short videos, long videos, etc. Bullet comments are information that viewers can send in real time and which are displayed on the video. The bullet comments for the target video can be comments sent by viewers and can be overlaid on the video screen, allowing viewers to participate in the discussion and interaction of the video in real time.

[0063] Specifically, after drawing the video view layer, the bullet screen display device can display the target video in the video view layer, and after drawing the bullet screen view layer, it can display the bullet screen information of the target video in the bullet screen view layer. The specific display method and display style of the bullet screen information are not limited in this embodiment and can be set according to the actual situation.

[0064] For example, Figure 6 This is an illustration of another bullet screen display provided in an embodiment of the present disclosure, such as... Figure 6 As shown in the figure, a video playback page 600 is displayed. This video playback page 600 includes a video area 601 and a bullet screen area 602. The target video is playing in the video area 601, and the bullet screen area 602 is displaying the bullet screen information of the target video. The overlapping area of ​​the bullet screen area 602 with the video area 601 has a transparent background, allowing simultaneous display of the target video's video frame and bullet screen information. The non-overlapping area of ​​the bullet screen area 602 with the video area 601 has an opaque background. The figure uses a dark gray background image as an example, only displaying the target video's bullet screen information. Figure 6 Based on this, when switching taskbars, refer to Figure 1 In terms of display format, the non-overlapping areas of the bullet screen area 101 and the video area 102 are still dark gray backgrounds, and the vertical lines of the desktop background will not be visible.

[0065] In scenarios where both the bullet screen view layer and the video view layer are drawn using a target view control with independent threads and independent drawing surfaces, this solution differentiates the background transparency of the bullet screen view layer based on the overlapping area. This minimizes both areas, achieving optimal performance and power consumption, while also resolving the issue of the bullet screen area showing through the desktop when switching to the taskbar.

[0066] The bullet screen display scheme provided in this disclosure responds to a video playback request by obtaining a first position of the video view layer and a second position of the bullet screen view layer; determining the overlapping area of ​​the video view layer and the bullet screen view layer based on the first and second positions; drawing the video view layer and performing differentiated background transparency drawing on the bullet screen view layer based on the overlapping area; displaying the target video on the video view layer and displaying the bullet screen information of the target video on the bullet screen view layer. By adopting the above technical solution, determining the overlapping area based on the positions of the video view layer and the bullet screen view layer, and performing differentiated background transparency drawing on the bullet screen view layer based on this overlapping area to display bullet screen information, the size of the video and bullet screen view layers remains unchanged, maintaining a minimum drawing area and achieving optimal performance and power consumption. Simultaneously, the differentiated background transparency drawing in the overlapping area solves the problem of the desktop showing through when switching taskbars, improving the bullet screen display effect.

[0067] Figure 7This is a schematic diagram of a bullet screen display device provided in an embodiment of this disclosure. The device can be implemented by software and / or hardware and is generally integrated into an electronic device. Figure 7 As shown, the device includes:

[0068] The acquisition module 701 is used to acquire the first position of the video view layer and the second position of the bullet screen view layer in response to a video playback request.

[0069] Overlap module 702 is used to determine the overlap area of ​​the video view layer and the bullet screen view layer based on the first position and the second position;

[0070] The drawing module 703 is used to draw the video view layer and perform differentiated drawing of the background transparency of the bullet screen view layer based on the overlapping area;

[0071] The display module 704 is used to display the target video in the video view layer and display the bullet screen information of the target video in the bullet screen view layer.

[0072] Optionally, the overlapping module 702 is used for:

[0073] A first rectangular region of the video view layer is determined based on the first position, and a second rectangular region of the bullet screen view layer is determined based on the second position.

[0074] If the first rectangular region and the second rectangular region intersect in both the horizontal and vertical directions, then the video view layer and the bullet screen view layer overlap, and the overlapping area is determined.

[0075] Optionally, the drawing module 703 is used for:

[0076] If the area of ​​the overlapping region is smaller than the area of ​​the bullet screen view layer, then the background transparency of the overlapping region in the bullet screen view layer is set to transparent for drawing, and the background transparency of the non-overlapping region in the bullet screen view layer is set to opaque for drawing.

[0077] Optionally, the drawing module 703 is also used for:

[0078] If the area of ​​the overlapping region is equal to the area of ​​the bullet screen view layer, then the background transparency of the bullet screen view layer is set to transparent for drawing.

[0079] Optionally, the device further includes a non-overlapping drawing module for:

[0080] If the overlapping area does not exist, the background transparency of the bullet screen view layer is set to opaque before drawing.

[0081] Optionally, the size of the video view layer is the same as the size of the playback interface of the target video, and the size of the bullet screen view layer is the same as the display size of the bullet screen information.

[0082] Optionally, both the video view layer and the bullet screen view layer are drawn using a target view control with an independent thread and an independent drawing surface.

[0083] The bullet screen display device provided in this disclosure can execute the bullet screen display method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0084] This disclosure also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements the bullet screen display method provided in any embodiment of this disclosure.

[0085] Figure 8 This is a schematic diagram of an electronic device provided in an embodiment of the present disclosure. See below for details. Figure 8 The diagram illustrates a structural schematic suitable for implementing the electronic device 800 in the embodiments of this disclosure. The electronic device 800 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0086] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the electronic device 800. The processing device 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0087] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic device 800 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 An electronic device 800 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0088] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, it performs the functions defined in the bullet screen display method of embodiments of this disclosure.

[0089] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0090] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0091] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0092] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to a video playback request, acquire a first position of a video view layer and a second position of a bullet comment view layer; determine an overlapping area of ​​the video view layer and the bullet comment view layer based on the first position and the second position; draw the video view layer and perform differential rendering of the background transparency of the bullet comment view layer based on the overlapping area; display a target video in the video view layer and display bullet comment information of the target video in the bullet comment view layer.

[0093] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0095] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0096] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0097] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0098] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0099] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0100] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0101] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method for displaying bullet comments, characterized in that, include: In response to a video playback request, obtain the first position of the video view layer and the second position of the bullet screen view layer; The overlapping area of ​​the video view layer and the bullet screen view layer is determined based on the first position and the second position; Draw the video view layer, and draw the background transparency of the bullet screen view layer differently based on the overlapping area; The target video is displayed in the video view layer, and the bullet screen information of the target video is displayed in the bullet screen view layer.

2. The method of claim 1, wherein, Determining the overlapping area of ​​the video view layer and the bullet screen view layer based on the first position and the second position includes: A first rectangular region of the video view layer is determined based on the first position, and a second rectangular region of the bullet screen view layer is determined based on the second position. If the first rectangular region and the second rectangular region intersect in both the horizontal and vertical directions, then the video view layer and the bullet screen view layer overlap, and the overlapping area is determined.

3. The method of claim 1, wherein, Based on the overlapping area, the background transparency of the bullet screen view layer is differentiated and drawn accordingly, including: If the area of ​​the overlapping region is smaller than the area of ​​the bullet screen view layer, then the background transparency of the overlapping region in the bullet screen view layer is set to transparent for drawing, and the background transparency of the non-overlapping region in the bullet screen view layer is set to opaque for drawing.

4. The method of claim 1, wherein, Based on the overlapping area, the background transparency of the bullet screen view layer is differentiated and drawn accordingly, including: If the area of ​​the overlapping region is equal to the area of ​​the bullet screen view layer, then the background transparency of the bullet screen view layer is set to transparent for drawing.

5. The method of claim 1, wherein, The method further includes: If the overlapping area does not exist, the background transparency of the bullet screen view layer is set to opaque before drawing.

6. The method of claim 1, wherein, The size of the video view layer is the same as the size of the playback interface of the target video, and the size of the bullet screen view layer is the same as the display size of the bullet screen information.

7. The method of claim 1, wherein, Both the video view layer and the bullet screen view layer are drawn using a target view control with an independent thread and an independent drawing surface.

8. A bullet screen display device, characterized by, include: The acquisition module is used to acquire the first position of the video view layer and the second position of the bullet screen view layer in response to a video playback request. An overlap module is used to determine the overlap area between the video view layer and the bullet screen view layer based on the first position and the second position. A drawing module is used to draw the video view layer and to perform differentiated drawing of the background transparency of the bullet screen view layer based on the overlapping area; The display module is used to display the target video in the video view layer and the bullet screen information of the target video in the bullet screen view layer.

9. An electronic device, comprising: The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the bullet screen display method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which is used to execute the bullet screen display method according to any one of claims 1-7.