Bullet screen display method and device, equipment and storage medium
By switching barrage style attributes between different segments of video data, display barrage data of different plots, and using transition attributes, the problem of plot understanding difficulties caused by a large number of barrages in video data is solved, and user experience and terminal efficiency are improved .
Patent Information
- Application Number
- CN202310808438.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2043-06-30
AI Technical Summary
When watching video data, as the number of viewers increases, a large amount of barrage data may exist in the video data, making it difficult for users to understand the plot of the video data and increasing the resource overhead of the terminal.
By switching different barrage style attributes between different clips of the target video data, the barrage data in video clips of different plots is displayed, the user is prompted to change the plot, and the transition barrage attributes are used between the previous and subsequent video clips to avoid empty Screen and abrupt phenomenon.
It improves users' perception of video data plots, reduces terminal resource overhead, enhances the flexibility and diversity of barrage data display, and avoids the need for users to replay multiple times to understand the plot.
Smart Images

Figure CN119233033A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to fields such as Internet technologies, and in particular to a bullet screen display method, device, equipment and storage medium. Background Art
[0002] With the continuous development of Internet technology, there are more and more video contents on the Internet. When watching video data, users can interact with different viewers by sending barrage data to the video data. As the number of viewers of video data increases, there may be a large amount of barrage data in the video data, which causes some trouble for users to understand the plot of the video data. In practice, it is found that users need to replay the video data multiple times to understand the plot of the video data, which increases the resource overhead of the terminal. Summary of the invention
[0003] The embodiments of the present application provide a bullet screen display method, device, equipment and storage medium, which reduce the resource overhead of the terminal and help users quickly understand the plot of video data.
[0004] An embodiment of the present application provides a bullet screen display method, including:
[0005] During playback of a first video segment of target video data, displaying barrage data in a first barrage set in the first video segment according to a first barrage style attribute;
[0006] If the first video segment is played, the first video sub-segment of the second video segment in the target video data is played, and the barrage data in the second barrage set is displayed in the first video sub-segment according to the transition barrage style attribute; the plot of the first video segment is different from the plot of the second video segment;
[0007] If the first video sub-segment is played, the second video sub-segment in the second video segment is played, and the barrage data in the second barrage set is displayed in the second video sub-segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different.
[0008] An embodiment of the present application provides a bullet screen display method, including:
[0009] During playback of a first video sub-segment of target video data, displaying barrage data in a first barrage set in the first video sub-segment according to a first barrage style attribute; the first video sub-segment belongs to the first video segment in the target video data;
[0010] If the first video sub-segment is played, the second video sub-segment in the first video segment is played, and the barrage data in the first barrage set is displayed in the second video sub-segment according to the transition barrage style attribute;
[0011] If the second video sub-segment is played, the second video segment in the target video data is played, and the barrage data in the second barrage set is displayed in the second video segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different; the plot of the first video segment is different from the plot of the second video segment.
[0012] An embodiment of the present application provides a bullet screen display method, including:
[0013] During playback of a first video segment of target video data, displaying barrage data in a first barrage set in the first video segment according to a first barrage style attribute;
[0014] If the playback of the first video clip is completed, the second video clip in the target video data is played, and the barrage data in the second barrage set is displayed in the second video clip according to the second barrage style attributes. The transition barrage style attributes and the second barrage style attributes are different, and the plot of the first video clip is different from the plot of the second video clip.
[0015] An embodiment of the present application provides a bullet screen display device, including:
[0016] A first display module is used to display the barrage data in the first barrage set in the first video segment according to the first barrage style attribute during the playback of the first video segment of the target video data;
[0017] A second display module is used for playing a first video sub-segment of a second video segment in the target video data if the first video segment is played, and switching to displaying the barrage data in the second barrage set in the first video sub-segment according to the transition barrage style attribute; the plot of the first video segment is different from the plot of the second video segment;
[0018] The third display module is used to play the second video sub-segment in the second video segment if the first video sub-segment is played, and switch to display the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different.
[0019] An embodiment of the present application provides a bullet screen display device, including:
[0020] A first display module is used to display the barrage data in the first barrage set in the first video sub-segment according to the first barrage style attribute during the playback of the first video sub-segment of the target video data; the first video sub-segment belongs to the first video segment in the target video data;
[0021] A second display module is used for playing a second video sub-segment in the first video segment after the first video sub-segment is played, and switching to displaying the barrage data in the first barrage set in the second video sub-segment according to the transition barrage style attribute;
[0022] The third display module is used to play the second video segment in the target video data if the playback of the second video sub-segment is completed, and switch to display the barrage data in the second barrage set in the second video segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different; the plot of the first video segment is different from the plot of the second video segment.
[0023] An embodiment of the present application provides a bullet screen display device, including:
[0024] A first display module is used to display the barrage data in the first barrage set in the first video segment according to the first barrage style attribute during the playback of the first video segment of the target video data;
[0025] The second display module is used to play the second video segment in the target video data after the first video segment is played, and switch to display the barrage data in the second barrage style attributes in the second video segment according to the second barrage style attributes; the plot of the first video segment is different from the plot of the second video segment, and the transition barrage style attributes and the second barrage style attributes are different.
[0026] On one hand, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0027] On one hand, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0028] On the one hand, an embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0029] In the present application, during the playback of the target video data, the bullet screen data in the video clips of different plots are displayed with different bullet screen style attributes (i.e., the first bullet screen style attribute and the second bullet screen style attribute) to prompt the user that there are plot changes in the previous and next video clips (i.e., the first video clip and the second video clip), which is conducive to improving the user's perception of plot changes, and is conducive to the user's rapid understanding of the plot of the target video data, and improving the display flexibility and diversity of the bullet screen data; at the same time, it can avoid the user from having to play back the video data multiple times to understand the plot of the video data, and can reduce the terminal's resource overhead (such as the resources required to load the video data). In addition, by displaying the bullet screen data with a transition bullet screen attribute pattern between the previous and next video clips, it is possible to avoid the appearance of a blank screen (i.e., no bullet screen data), abruptness, etc. in the video clip, so that the bullet screen data displayed in the previous and next video clips can be smoothly connected. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 It is a schematic diagram of a bullet screen display system provided by this application;
[0032] Figure 2 It is a flowchart of a bullet screen display method provided by the present application;
[0033] Figure 3 This is a schematic diagram of an interactive scene of a bullet screen display method provided by the present application;
[0034] Figure 4 It is a flowchart of a bullet screen display method provided by the present application;
[0035] Figure 5 This is a schematic diagram of an interface for obtaining plot change moments provided by this application;
[0036] Figure 6 This is a schematic diagram of a display interface for barrage data provided by this application;
[0037] Figure 7 This is a schematic diagram of a display interface for barrage data provided by this application;
[0038] Figure 8 It is a schematic diagram of a bullet screen framework provided by this application;
[0039] Fig. 9 It is a schematic diagram of the inheritance relationship between a track control component and a virtual track provided by the present application;
[0040] Fig.10 This is a configuration diagram of a bullet screen backflow configuration provided by this application;
[0041] Fig.11 This is a schematic diagram of a display interface for barrage data provided by this application;
[0042] Fig.12 This is a schematic diagram of closing the barrage style attribute switching provided by this application;
[0043] Fig.13 It is a flowchart of a bullet screen display method provided by the present application;
[0044] Fig.14 It is a flowchart of a bullet screen display method provided by the present application;
[0045] Fig.15 It is a flowchart of a bullet screen display method provided by the present application;
[0046] Fig.16 It is a structural schematic diagram of a bullet screen display device provided in an embodiment of the present application;
[0047] Fig.17 It is a structural schematic diagram of a bullet screen display device provided in an embodiment of the present application;
[0048] Fig.18 It is a structural schematic diagram of a bullet screen display device provided in an embodiment of the present application;
[0049] Fig.19 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0051] First, the terms involved in this application are explained.
[0052] Bullet screen data: refers to the personal comments posted by users on video data while they are watching the video data. Bullet screen data will be displayed in the video data so that users can view the bullet screen data they posted. When the bullet screen function of the playback application of other users watching the video data is turned on, other users can also see the bullet screen data.
[0053] The moving direction of the barrage data refers to the moving direction of the barrage data on the video screen. The moving direction of the barrage data may include the forward flow direction and the reverse flow direction. The forward flow direction refers to the moving direction of the barrage data on the video screen from right to left; the reverse flow direction refers to the moving direction of the barrage data on the video screen from left to right. Left refers to the left side of the user when the user faces the video screen, and right refers to the right side of the user when the user faces the video data. The video screen refers to the screen of the terminal that plays the video data.
[0054] Barrage arrangement direction: refers to the reading arrangement order of the text content of the barrage data. The barrage arrangement direction may include the forward direction and the reverse direction. The forward direction refers to the text content of the barrage data being arranged in a reading order from left to right; the reverse direction refers to the text content of the barrage data being arranged in a reading order from right to left. For example, the barrage data is: The protagonist of this drama is so beautiful; when the barrage arrangement direction of the barrage data is the forward direction, the barrage data can be arranged as: The protagonist of this drama is so beautiful; when the barrage arrangement direction of the barrage data is the reverse direction, the barrage data can be arranged as: The protagonist of this drama is so beautiful.
[0055] Bullet chat moving speed: refers to the moving speed of bullet chat data, which includes general moving speed and accelerated moving speed. General moving speed is calculated according to a fixed display duration, that is, general moving speed refers to moving bullet chat data at a fixed moving speed; the general moving speed may be the default moving speed of the target application where the target video data is located. The accelerated moving speed is calculated based on a fixed acceleration, so that the bullet chat data appears faster and faster on the video screen, or the accelerated moving speed refers to a fixed moving speed greater than the general moving speed.
[0056] Barrage style attribute: Barrage style attribute is used to indicate that barrage data is displayed in a static display mode, or barrage style attribute is used to indicate that barrage data is displayed in a dynamic display mode. Static display mode means that barrage data will be displayed at a fixed position, that is, barrage data will not move; dynamic display mode means that barrage data is moved in a certain direction, and the position of barrage data changes with time. Barrage style attribute includes time parameters and space parameters of barrage data. Time parameters include one or more of the start display time, end display time, and limited display duration of barrage data. Limited display duration refers to the maximum display duration of barrage data on the video screen, that is, if the actual display duration exceeds the limited display duration, the display of barrage data ends. Spatial parameters include one or more of the display position of barrage data, barrage arrangement direction, barrage moving direction, barrage moving speed, font size, font type, color value, transparency, etc. In particular, when the barrage style attribute is used to indicate that barrage data is displayed in a static display mode, the barrage style attribute does not include the barrage moving direction and barrage moving speed.
[0057] It should be noted that the first barrage style attribute, the second barrage style attribute, and the transition barrage style attribute in the present application are different barrage style attributes. The first barrage style attribute and the second barrage style attribute are used to display barrage data in video clips of different plots to distinguish video clips of different plots. The transition barrage style attribute is used to display the barrage style of the barrage data in the middle video sub-segment. The middle video sub-segment may refer to the last n video frames in the playback order of the first video segment, or the middle video sub-segment may refer to the first m video frames in the playback order of the second video segment, where n and m are positive integers, or the middle video sub-segment may refer to the last n video frames and the first m video frames. The transitional barrage style attribute is also used to balance the difference between the first barrage style attribute and the second barrage style attribute, so that the barrage data displayed in the video clips of different plots can be smoothly connected, that is, the first display difference between the first barrage style attribute and the second barrage style attribute is greater than the second display difference between the first barrage style attribute and the transitional barrage style attribute and the first barrage style attribute, and the first display difference is greater than the third display difference between the second barrage style attribute and the transitional barrage style attribute. The first display difference can refer to the difference between the barrage data displayed according to the first barrage style attribute and the barrage data displayed according to the second barrage style attribute; the second display difference can refer to the difference between the barrage data displayed according to the first barrage style attribute and the barrage data displayed according to the transitional barrage style attribute, and the third display difference can refer to the difference between the barrage data displayed according to the second barrage style attribute and the barrage data displayed according to the transitional barrage style attribute. Among them, the first display difference, the second display difference, and the third display difference are all calculated for barrage data with the same text content. The transitional barrage style attribute can be called a compromise barrage style attribute between the first barrage style attribute and the second barrage style attribute.
[0058] In one embodiment, the transitional barrage style attribute is used to indicate that the barrage data is displayed in a static display mode, and the first barrage style attribute and the second barrage style attribute both indicate that the barrage data is displayed in a dynamic display mode. The first barrage style attribute and the second barrage style attribute have one or more of the following differences: a. The moving direction of the first barrage in the first barrage style attribute is opposite to the moving direction of the second barrage in the second barrage style attribute, that is, the moving direction of the first barrage is the opposite direction of the moving direction of the second barrage; for example, the moving direction of the first barrage is from left to right, and the moving direction of the second barrage is from right to left; or, the moving direction of the first barrage is from right to left, and the moving direction of the second barrage is from left to right. b. The arrangement direction of the first barrage in the first barrage style attribute is opposite to the arrangement direction of the second barrage in the second barrage style attribute, that is, the arrangement direction of the first barrage is the opposite direction of the arrangement direction of the second barrage; for example, the arrangement direction of the first barrage is from left to right, and the arrangement direction of the second barrage is from right to left; or, the arrangement direction of the first barrage is from right to left, and the arrangement direction of the second barrage is from left to right. c. The first moving speed in the first barrage style attribute is different from the second moving speed in the second barrage style attribute, such as the first moving speed (such as the accelerated moving speed) is greater than the second moving speed (such as the general moving speed), or the first moving speed (such as the general moving speed) is less than the second moving speed (such as the accelerated moving speed).
[0059] In one embodiment, the transition barrage style attribute, the first barrage style attribute, and the second barrage style attribute all indicate that the barrage data is displayed in a dynamic display manner. The transition barrage style attribute, the first barrage style attribute, and the second barrage style attribute have one or more of the following differences: 1. The barrage moving speeds respectively included in the transition barrage style attribute, the first barrage style attribute, and the second barrage style attribute are different from each other, and the barrage moving speed in the transition barrage style attribute belongs to the moving speed interval, which is an open interval formed by the barrage moving speed in the first barrage style attribute and the barrage moving speed in the second barrage style attribute. 2. The color values respectively included in the transition barrage style attribute, the first barrage style attribute, and the second barrage style attribute are different from each other, and the color value in the transition barrage style attribute belongs to the color value interval, which is an open interval formed by the color value in the first barrage style attribute and the color value in the second barrage style attribute. 3. The transparency included in the transitional barrage style attribute, the first barrage style attribute, and the second barrage style attribute are different from each other, and the transparency in the transitional barrage style attribute belongs to the transparency range, which is an open range formed by the transparency in the first barrage style attribute and the transparency in the second barrage style attribute. 4. The font sizes included in the transitional barrage style attribute, the first barrage style attribute, and the second barrage style attribute are different from each other, and the font size in the transitional barrage style attribute belongs to the font size range, which is an open range formed by the font size (i.e., font size) in the first barrage style attribute and the font size in the second barrage style attribute, such as the font size in the first barrage style attribute is size 5, the font size in the second barrage style attribute is size 14, and the font size in the transitional barrage style attribute is size 8. 5. The font types included in the transitional barrage style attribute, the first barrage style attribute, and the second barrage style attribute are different from each other. For example, the font type in the transitional barrage style attribute is Songti, the font type in the first barrage style attribute is Kaiti, and the font type in the second barrage style attribute is Heiti.
[0060] In one embodiment, the transitional bullet-screen style attribute, the first bullet-screen style attribute, and the second bullet-screen style attribute all indicate that the bullet-screen data is displayed in a static display mode. One or more of the font type, font size, color value, and transparency included in the transitional bullet-screen style attribute, the first bullet-screen style attribute, and the second bullet-screen style attribute are different from each other.
[0061] Virtual track: The lines on the video screen used to display bullet comment data are abstracted into L virtual tracks, that is, one line corresponds to one virtual track. The virtual track is used to carry one or more bullet comment data, and maintain the position, size, affine transformation and other bullet comment style attributes of any bullet comment data on the virtual track and the mapping of time. It is a function of spatial information and time information, and L is a positive integer. Affine transformation can change the bullet comment style attributes, such as switching from the first bullet comment style attribute to the transition bullet comment style attribute.
[0062] Plot: refers to the storyline of the video data. According to the role classification, the plot of the video data includes the protagonist plot, the supporting role plot, etc.; according to the scene classification, the plot of the video data includes the indoor plot (the plot of the video data shot indoors), the outdoor plot (the plot of the video data shot outdoors), the courtyard plot (including the plot of the video clips of the courtyard), the lawn plot (including the plot of the video clips of the lawn), etc. According to the timeline classification, the plot of the video data includes the time and space reversal plot and the time sequence plot. The time and space reversal plot refers to the plot presented in a flashback manner. The time and space reversal plot is divided into two types, the cyclic time and space reversal plot and the non-cyclic time and space reversal plot. The cyclic time and space reversal plot refers to the video clip played at the last moment being played back in a flashback manner, that is, the video clip corresponding to the cyclic time and space reversal plot has the same content as the video clip played at the last moment. For example, video clip 1 sequentially presents the growth of the sapling from January to December 2023, and video clip 2 sequentially presents the growth of the sapling from December to January 2023, that is, the plot of video clip 2 can be called a cyclic time and space reversal plot. A non-circular time-space reversal plot refers to a plot in which the content presented by the video clip played at the last moment is different from that presented by the video clip played at the next moment, and the plot in the video clip played at the last moment occurs later than the plot in the video clip played at the next moment. For example, video clip 3 shows the growth of the sapling in 2023, and then video clip 4 shows the growth of the sapling in 2022. The plot of video clip 4 can be called a non-circular time-space reversal plot. A time sequence plot refers to a plot presented in the order of occurrence. For example, the growth of the sapling in June 2023 is presented from the 1st to the 10th second of video clip 5, and the growth of the sapling in July 2023 is presented from the 11th to the 20th second of video clip 5. That is, the plot of video clip 5 can be called a time sequence plot.
[0063] In order to facilitate a clearer understanding of the present application, the bullet screen display system for implementing the present application is first introduced. Figure 1 As shown, the bullet screen display system includes a server 10 and a terminal cluster, and the terminal cluster may include one or more terminals, and the number of terminals is not limited here. Figure 1As shown, the terminal cluster may specifically include terminal 1, terminal 2, ..., terminal y; it can be understood that terminal 1, terminal 2, terminal 3, ..., terminal y can all be connected to the server 10 through a network connection, so that each terminal can exchange data with the server 10 through the network connection.
[0064] It is understandable that the server can be an independent physical server, or a server cluster or distributed system composed of at least two physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms and other basic cloud computing services. The terminal can specifically refer to a vehicle-mounted terminal, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a screen speaker, a smart TV, a smart watch, etc., but is not limited to this. Each terminal and server can be directly or indirectly connected by wired or wireless communication. At the same time, the number of terminals and servers can be one or at least two, and this application is not limited here.
[0065] One or more target applications are installed in the terminal, and the target application may refer to an application for playing video data, such as a target application may include an independent application, a web application, a small program in a host application, etc. The target task may refer to a live video application, a short video application, a video teaching application, a social application, a video playback application, and a video conferencing application, etc. The server 10 refers to a device that provides backend services for the target application in the terminal, such as the server 10 can be used to optimize and update the target application in the terminal. In this application, the server 10 can also be used to identify the plot change moment in the video data and send the plot change moment to the terminal, so that the terminal can divide the video data according to the plot change moment, obtain multiple video clips, and adaptively display the bullet screen data in the video clips.
[0066] For example, Figure 2As shown, the example of terminal 1 adaptively displaying barrage data in a video clip is used for explanation. The video clip may belong to target video data, and the target video data may be any video data in the target application installed by terminal 1. The process of terminal 1 adaptively displaying barrage data in a video clip can be achieved through interaction between terminal 1 and server 10. First, server 10 can identify the plot change moment, which reflects the time when the plot in the target video data changes; obtain the plot change moment of the target video data by any of the following three methods, which reflects the time when the plot in the target video data changes; Method 1, server 10 can obtain the plot change moment of the target video data marked by the operator. In the second method, the server 10 can call a recognition model to identify the plot change moment of the target video data, that is, call the recognition model, identify the plot change moment according to the barrage data in the target barrage set in the target video data, and obtain the plot change moment of the target video data. The recognition model can refer to a text recognition model, and the recognition model can specifically include a convolutional recurrent neural network (CRNN), a robust text renognizer with automatic rectification (RARE), etc. In the third method, the server 10 can call a graphic recognition model to identify the plot change moment of the target video data, that is, call a graphic recognition model, and identify the plot change moment of the target video data according to the script data of the target video data; the graphic recognition model refers to a model used to match the video frames in the video data with the script data to identify the plot change moment. For example, if the script data describes a courtyard and a lawn, the image recognition model is used to identify the video clip showing the courtyard and the video clip showing the lawn from the target video data, that is, the start time of the lawn video clip is the plot change moment. The image and text recognition model may refer to a Clip model, a multi-modal cross attention mechanism (Multi-Modality Cross Attation, MMCA), etc.
[0067] When the server 10 obtains the plot change moment of the target video data, the server 10 can execute the server response process, that is, the server 10 can send the plot change moment to the terminal 1; after the terminal 1 receives the plot change moment, the terminal (terminal 1) displays and interacts, that is, the terminal 1 can divide the target video data according to the plot change moment to obtain the first video segment and the second video segment. Further, the terminal 1 can switch the bullet screen moving direction, switch the bullet screen arrangement direction, switch the bullet screen moving speed, etc. for the bullet screen data in the second video segment. When a trigger operation for the bullet screen style switching control is detected, the terminal 1 can turn off the bullet screen switching, that is, display the bullet screen data according to the original bullet screen style attributes.
[0068] For example, Figure 3 As shown, the example of terminal 1 switching the moving direction of the bullet screen and the arrangement direction of the bullet screen for the bullet screen data in the second video clip is used for explanation. The target video data is a video showing the growth of a kitten, and the plot change moment is the 4th second (s) of the target video data. Therefore, the first video clip includes video frames with a playback time from 0s to 4s in the target video data, and the first video clip sequentially presents the growth of the kitten from 1 month to 12 months after birth, that is, the plot of the first video clip is a time sequence plot. The second video clip is a video frame with a playback time from 4s to 7s in the target video data, and the second video clip sequentially presents the growth of the kitten from 12 months to 1 month after birth, that is, the plot of the second video clip is a looping time and space reversal plot. Terminal 1 can display the bullet screen data in the first bullet screen set according to the first bullet screen style attribute during the playback of the first video clip. The bullet screen data in the first bullet screen set is the bullet screen data associated with the first video clip. Taking the first bullet screen style attribute including the first bullet screen arrangement direction and the first bullet screen movement direction as an example, the first bullet screen arrangement direction is from left to right, and the first bullet screen movement direction is from right to left. Figure 3In the video frame 30a, the barrage display area 31a includes three barrage data in the first barrage set, including "so cute", "I really want to take it home", and "pet the cat"; video frame 30a is the video frame with the playback time of the 2nd second in the first video clip. Similarly, the barrage display area 33a in the video frame 32a includes three barrage data in the first barrage set, including "I really want to take it home", "I really want to take it home when the cat is still small", and "The cat's eyes have become bigger after growing up"; video frame 32a is the video frame with the playback time of the 4th second in the first video clip. Comparing video frame 30a with video frame 32a, it can be seen that the barrage movement direction of the barrage data in the first video clip is from right to left, such as the barrage data in video frame 30a: "I really want to take it home" is located on the left side of the barrage display area 31a, and the barrage data in video frame 32a: "I really want to take it home" is located on the right side of the barrage display area 33a, that is, the barrage data: "I really want to take it home" is moved from the left side of the video screen to the right side. It can be seen from the video frame 30a and the video frame 32a that the bullet screen data in the first video segment is arranged in a direction from left to right.
[0069] Further, after the first video segment is played, terminal 1 can play the first video sub-segment of the second video segment, and display the bullet screen data in the second bullet screen set in the first video sub-segment according to the transition bullet screen style attribute. The first video sub-segment can be one or more video frames adjacent to the first video segment in the second video segment, and the second bullet screen set refers to the bullet screen data associated with the second video segment. The second bullet screen set can be the same as the first bullet screen set, or the second bullet screen set has partially the same bullet screen data as the first bullet screen set, or the first bullet screen set is completely different from the second bullet screen set. Figure 3 In the example, the second bullet screen set and the first bullet screen set have some of the same bullet screen data. Figure 3 The transition bullet screen style attribute reflects the static display of bullet screen data as an example for explanation. Figure 3 The video frames played from 4s to 4.8s in the target video data are the first video sub-segment of the second video segment (excluding the video frame displayed at 4s), and the second bullet comment set includes the bullet comment data displayed by the video frame that is at the end of the playback order in the first video segment, i.e., I want to take it home, the cat is still cute when it is small, and the cat's eyes have become bigger when it grows up. Figure 3That is, the three bullet screen data in the second bullet screen set are included in the bullet screen display area 35a in the video frame 34a, namely "I really want to take it home", "Cats are still cute when they are young", and "The eyes of cats get bigger when they grow up"; the video frame 34a is the video frame with a playback time of 4.8 s in the target video data. Comparing the video frame 34a in the first video sub - clip with the video frame 32a in the first video clip, it can be seen that the number of bullet screen data in the first video sub - clip remains unchanged, and the positions of the bullet screen data remain unchanged, that is, this transitional bullet screen style attribute indicates pausing the moving bullet screen data, and the duration of the pause is 0.8 s.
[0070] Next, after the first video sub - clip is played, the terminal 1 can then play the second video sub - clip in the second video clip, and switch to displaying the bullet screen data in the second bullet screen set in the second video sub - clip according to the second bullet screen style attribute; the second video sub - clip refers to the video frames in the second video clip whose playback order is after the first video sub - clip. This second video sub - clip includes the video frames in the target video data with a playback time from 4.8 s to 7 s (excluding the video frame with a playback time of 4.8 s; taking the second bullet screen style attribute including the second bullet screen arrangement direction and the second bullet screen moving direction as an example for illustration, the second bullet screen arrangement direction is from right to left, and the second bullet screen moving direction is from left to right. As Figure 3 That is, in the bullet screen display area 37a in the video frame 36a, three bullet screen data in the second bullet screen set are included, respectively including "Aiko waiting time (which is part of 'Aiko waiting time, the young cat is still')", "The eyes have changed a lot (which is part of 'The eyes of the cat have changed a lot when it grows up')", and "Walking backwards bullet screen"; the video frame 36a is the video frame with a playback time of 5 s in the target video data. In the bullet screen display area 39a in the video frame 38a, three bullet screen data in the second bullet screen set are included, respectively including "The young cat of Aiko waiting time", "The grown - up cat with changed eyes", and "Backward flow empty time"; the video frame 38a is the video frame with a playback time of 7 s in the target video data. Comparing the video frame 36a and the video frame 38a in the second video sub - clip, it can be seen that the bullet screen moving direction of the bullet screen data in the second video sub - clip is from left to right. For example, for the bullet screen data "Aiko waiting time" in the video frame 36a, it is located on the right side of the bullet screen display area 37a, and this bullet screen data is located on the left side of the bullet screen display area 39a in the video frame 38a, that is, the bullet screen data "Aiko waiting time (or 'The young cat of Aiko waiting time')" is moved from the right side to the left side of the video screen. From the video frame 36a and the video frame 38a, it can be seen that the bullet screen arrangement direction of the bullet screen data in the second video sub - clip is from right to left.
[0071] In summary, by switching the arrangement direction and movement direction of the bullet screen data to prompt the user that there is a plot change in the previous and next video clips (i.e., the first video clip and the second video clip), it is helpful to improve the user's perception of the plot change, help the user to quickly understand the plot of the target video data, and improve the display flexibility and diversity of the bullet screen data; at the same time, it can avoid the user from having to play back the video data multiple times to understand the plot of the video data, and can reduce the terminal's resource overhead (such as the resources required to load the video data). In addition, by pausing the movement of the bullet screen data in the middle video sub-segment (i.e., the above-mentioned first video sub-segment), it is possible to avoid the appearance of a blank screen (i.e., no bullet screen data), abruptness, etc. in the video clip, so that the bullet screen data displayed in the previous and next video clips can be smoothly connected.
[0072] For further information, see Figure 4 , is a flow chart of a bullet screen display method provided in an embodiment of the present application. Figure 4 As shown, this method can be Figure 1 It can be executed by any terminal in the terminal cluster in Figure 1 can be executed by the server in Figure 1 The terminal and server in the terminal cluster are executed in collaboration, that is, the device used to execute the bullet screen display method in the present application can be a computer device, and the computer device can be a terminal or a server. In this embodiment, the computer device is a terminal as an example. The method may include the following steps:
[0073] S101. During playback of a first video segment of target video data, display barrage data in a first barrage set in the first video segment according to a first barrage style attribute.
[0074] In the present application, a computer device can play the first video segment in the target video data, and display the barrage data in the first barrage set in the first video segment according to the first barrage style attribute. The barrage data in the first barrage set is the barrage data associated with the first video segment, such as the barrage data in the first barrage set includes comment data (also referred to as message data) posted by viewers when watching the first video segment.
[0075] It should be noted that the first barrage style attribute indicates that the barrage data is displayed in a static display manner, or the first barrage style attribute indicates that the barrage data is displayed in a dynamic display manner; the first barrage style attribute includes the time parameters and space parameters mentioned above.
[0076] Optionally, when the first barrage style attribute indicates that the barrage data is displayed in a dynamic display manner, the first barrage style attribute includes a first barrage moving direction and a first barrage arrangement direction; the above-mentioned displaying the barrage data in the first barrage set in the first video clip according to the first barrage style attribute includes: the computer device can arrange the text content of the barrage data in the first barrage set according to the first barrage arrangement direction, and move and display the arranged barrage data in the first barrage set in the first video clip according to the first barrage moving direction.
[0077] It should be noted that the first barrage arrangement direction may refer to the forward direction or the reverse direction of the barrage mentioned above, and the first barrage movement direction may refer to the forward flow direction or the reverse flow direction of the barrage mentioned above.
[0078] Optionally, the first barrage style attribute may also include a first moving speed, which is the above-mentioned or accelerated moving speed. The computer device may move and display the barrage data arranged in the first barrage set in the first video clip according to the first barrage moving direction and the first moving speed, that is, continuously update the position of the barrage data arranged in the first barrage set in the first video clip according to the first barrage moving direction and the first moving speed.
[0079] It is understandable that the computer device can obtain the first video segment and the second video segment in the target video data by any of the following three acquisition methods. In the first acquisition method, the computer device can obtain the plot change moment of the target video data marked by the operator, and divide the target video data according to the plot change moment to obtain the first video segment and the second video segment. If the plot change moment includes a start time point, the start time point is the start time of the second video segment, then the computer device can use the video segment whose playback time is between the previous plot change moment and the plot change moment as the first video segment, and use the video segment whose playback time is between the plot change moment and the next plot change moment as the second video segment. Alternatively, the plot change moment includes a start time point and an end time point, the start time point may refer to the start time point of the second video segment, that is, the start time point is also called the end time point of the first video clip, and the end time point may be the end time of the second video clip. At this time, the computer device may determine the video clip in the target video data whose playback time is between the end time point included in the previous plot change moment and the start time point of the plot change moment as the first video clip; and determine the video clip in the target video data whose playback time is between the start time point included in the plot change moment and the end time point of the plot change moment as the second video clip.
[0080] For example, Figure 5 As shown, the computer device can display a configuration interface 50a in response to a configuration operation for a plot change moment, and the configuration interface 50a can include a start time point setting control 51a and an end time point setting control 52a for the plot change moment. In response to a trigger operation for the start time point setting control 51a, the time point selected (or input) by the start time point setting control 51a is obtained as the start time point; in response to a trigger operation for the end time point setting control 52a, the time point selected (or input) by the end time point setting control 52a is obtained as the end time point. The start time point and the end time point are determined as the plot change moment, and according to the plot change moment, the target video data is divided to obtain the first video segment and the second video segment. By setting the plot change moment by the user, the flexibility of obtaining the plot change moment is improved.
[0081] Acquisition method 2: The computer device can obtain the target barrage set in the target video data; the first barrage set and the second barrage set are subsets of the target barrage set, that is, the target barrage set includes the barrage data in the first barrage set and the second barrage set. The computer device can call the recognition model to perform text feature recognition on the barrage data in the target barrage set to obtain the text features of the barrage data in the target barrage set, and the text features are used to reflect the semantics of the corresponding barrage data. Furthermore, according to the text features of the barrage data in the target barrage set, the target video data is divided to obtain the first video segment and the second video segment.
[0082] Optionally, the computer device may divide the target video data according to the text features of the barrage data in the target barrage set, and the implementation methods for obtaining the first video segment and the second video segment may include division method one and division method two; in division method one, the computer device may traverse the text features of the barrage data in the target barrage set in sequence according to the release time of the barrage data, and when the similarity of the text features of the traversed adjacent barrage data is less than the similarity threshold, the release time of any barrage data in the adjacent barrage data is determined as the plot change moment of the target video data, and the target video frame is divided according to the plot change moment to obtain the first video segment and the second video segment. The adjacent barrage data here may refer to the two barrage data with the closest release time.
[0083] In the second division method, the computer device can determine the text similarity between the text features of the barrage data in the target barrage set and the text features of the plot change; the text features of the plot change can be obtained by extracting the features of the text content reflecting the plot change, and the text content reflecting the plot change includes timeline, past, memory, scene change, playback, replay, etc. Further, the number of barrages whose text similarity of the barrage data in the target barrage set is greater than the similarity threshold within S release moments is counted; the S release moments are the release moments of the barrage data in the target barrage set, and S is a positive integer; the moment when the corresponding number of barrages is greater than the number threshold is selected from the S moments as the plot change moment, that is, when a large amount of barrage data reflecting the plot change appears at a certain moment, the moment is determined as the plot change moment, and then the target video data is divided according to the plot change moment to obtain the first video segment and the second video segment.
[0084] For example, Figure 6 As shown, in the target video data, the video frames with a playback time of 5s to 6s all display bullet comment data whose text similarity between the text feature and the plot change text feature is greater than the similarity threshold, such as Figure 6 The barrage display area 61a in the video frame 60a displays barrage data: time and space reversal, playback, and the sapling has become taller, that is, the text similarity between the barrage data: time and space reversal, playback text features and the script change text features is greater than the similarity threshold, and the video frame 60a is the video frame with a playback time of the 5th second in the target video data. Figure 6 The barrage display area 63a in the video frame 62a in the video shows barrage data: timeline, playback, saplings, that is, the text similarity between the text features of the barrage data: timeline, playback and the text features of the script change is greater than the similarity threshold, and the video frame 62a is the video frame with a playback time of the 6th second in the target video data. Assuming that the quantity threshold is 4, 5 similar barrage data are counted from the video frames with a playback time of the 5th to 6th seconds in the target video data, that is, similar barrage data is barrage data with a text similarity between the text features and the script change text features greater than the similarity threshold. Any moment in [5,6]s can be used as a plot change moment, such as the 5th second can be used as a plot change moment, the 6th second can be used as a plot change moment, or the 5.5th second can be used as a plot change moment.
[0085] Acquisition method three: the computer device can obtain the script data corresponding to the target video data from a web page or locally. The script data is mainly composed of the lines and stage instructions (i.e., scene description) of the target video data, which is the textual basis of the creation of dramatic art and the basis for the director and the actor to perform. Then, the above-mentioned graphic recognition model is called to extract the object description information and the appearance time of the object description information from the script data corresponding to the target video data; the object description information refers to the information used to describe the object (i.e., the physical object), and the object may include characters, buildings, plants, actions, etc. Further, according to the appearance time of the object description information and the object description information, the script scene information set associated with the target video data is determined; the script scene information set includes one or more script scene information, and the script scene information is used to reflect the scene described in the script data, and the scene may include indoor scenes, outdoor scenes, lawn scenes, courtyard scenes, time-space reversal scenes, time sequence scenes, etc. The time-space reversal scene here refers to the occurrence time of the plot described in text segment 1 in the script data, which is later than the occurrence time of the plot described in text segment 2. Text segment 2 appears in the script data earlier than text segment 1, that is, the scene described in text segment 2 is a time-space reversal scene. The time and space reversal scene includes a cyclic time and space reversal scene and a non-cyclic time and space reversal scene. For example, when text segment 2 describes the playback of the storyline of text segment 1, the scene described by text segment 2 is a cyclic time and space reversal scene. When text segment 2 describes the playback of the storyline that occurred before the storyline of text segment 1, the scene described by text segment 2 is a non-cyclic time and space reversal scene. After obtaining the script scene information set, the target video data can be divided according to the script scene information set to obtain the first video segment and the second video segment.
[0086] Optionally, the target video data is divided according to the script scene information set to obtain the first video segment and the second video segment, including: the computer device can call the above-mentioned graphic recognition model to traverse the script scene information i in the script scene information set and the untraversed video frames in the target video data frame by frame; i is less than or equal to F, and F is the number of script scene information in the script scene information set; if the match between the traversed target video frame and the script scene information i is less than a matching threshold, the computer device can determine the playback time of the target video frame as the plot change moment of the target video data, and divide the target video data according to the plot change moment to obtain the first video segment and the second video segment.
[0087] S102. If the first video segment is played, the first video sub-segment of the second video segment in the target video data is played, and the barrage data in the second barrage set is displayed in the first video sub-segment according to the transition barrage style attributes; the plot of the first video segment is different from the plot of the second video segment.
[0088] In the present application, if the first video segment is played, the computer device can play the first video sub-segment in the second video segment in the target video data, and switch to displaying the barrage data in the second barrage set in the first video sub-segment according to the fixed barrage style attribute. The first video sub-segment may refer to one or more video frames in the second video segment that are adjacent to the first video segment, and the number of video frames in the first video sub-segment may be determined according to the transition barrage style attribute. For example, the transition barrage style attribute indicates the pause of the moving barrage data, and the duration of the pause movement is a preset duration. Then, the first video sub-segment is the first m video frames in the playback order of the second video segment, and the playback duration of the first m video frames may be the preset duration, which may also be referred to as the display duration of the barrage data in the second barrage set according to the transition barrage style attribute.
[0089] It should be noted that the plot of the first video clip is different from the plot of the second video clip. The specific meanings are as follows: 1. According to the role division, the plot of the first video clip is the protagonist plot, and the plot of the second video clip is the supporting role plot; or, the plot of the first video clip is the supporting role plot, and the plot of the second video clip is the protagonist plot. 2. According to the scene division, the plot of the first video clip and the plot of the second video clip are any of indoor plots, outdoor plots, courtyard plots, lawn plots, etc., such as the plot of the first video clip is an indoor plot, and the plot of the second video clip is an outdoor plot. 3. According to the timeline division, the plot of the first video clip can be a time-sequential plot, and the plot of the second video clip can be a time-space reversal plot; or, the plot of the first video clip can be a time-space reversal plot, and the plot of the second video clip can be a time-sequential plot. 4. According to the authenticity, the plot of the first video clip can be a real plot, and the plot of the second video clip can be a virtual plot; or, the plot of the first video clip can be a virtual plot, and the plot of the second video clip can be a real plot; the real plot can refer to the real storyline, and the virtual plot can be the storyline imagined by the actor in the target video data in the current scene. For example, the first video clip plays a clip of Xiao Wang making a travel plan to place A, and the second video clip plays the food and beautiful scenery of place A imagined by Xiao Wang in the process of making a travel plan to place A, that is, the plot of the first video clip can be called a real plot, and the plot of the second video clip can be a virtual plot.
[0090] It should be noted that the barrage data in the second barrage set may include barrage data associated with the second video clip, that is, the barrage data in the second barrage set includes comment data (also referred to as message data) posted by viewers when watching the second video clip.
[0091] In one embodiment, the second barrage set can be the same as the first barrage set. For example, if the content described by the second video clip is the same as the content described by the first video clip, indicating that the second video clip is a playback of the first video clip, that is, the plot of the second video clip is a looping time-space reversal plot, then the first barrage set is the same as the second barrage set, and the first barrage set is associated with the first video clip, or the first barrage set is associated with the second video clip; the barrage data in the first barrage set is displayed cyclically in the second video clip. At this time, both the first barrage set and the second barrage set include barrage data posted by viewers when watching the first video clip and the second video clip.
[0092] In one embodiment, the second barrage set has some of the same barrage data as the first barrage set. For example, when the content described by the second video clip is different from the content described by the first video clip, the second barrage set includes the barrage data in the first barrage set displayed in the last video frame of the first video clip, and the barrage data associated with the second video clip. The first barrage set includes the barrage data associated with the first video clip, and the last video frame is the last video frame in the playback order of the first video clip. In other words, the first barrage set includes the barrage data posted by the viewer when watching the first video clip, and the second barrage set includes the barrage data in the first barrage set displayed in the last video frame of the first video clip, and the barrage data posted by the viewer when watching the second video clip, which is conducive to the smooth connection of the barrage data.
[0093] In one embodiment, the first barrage set is completely different from the second barrage set. For example, when the content described by the second video clip is different from the content described by the first video clip, the first barrage set is associated with the first video clip, that is, the barrage data in the first barrage set is associated with the first video clip; the second barrage set is associated with the second video clip, that is, the barrage data in the second barrage set is associated with the second video clip. Since the content described by the second video clip is different from the content described by the first video clip, the first barrage set is different from the second barrage set. In other words, when the content described by the video clip is different, the barrage data will also be updated as the content changes, ensuring that the barrage data read by the user changes in real time with the content described by the video clip, thereby improving the correlation between the barrage data and the video clip.
[0094] It should be noted that the first barrage set and the second barrage set are completely different here means that the first barrage set includes barrage data posted by viewers when playing the first video clip, and the second barrage set includes barrage data posted by viewers when watching the second video clip. However, the first barrage set and the second barrage set may contain barrage data with the same text content. For example, the first barrage set and the second barrage set both include: This drama is so exciting. Due to the different release times, it is considered that the first barrage set includes: This drama is so exciting, and the second barrage set includes: This drama is so exciting, which are different barrage data.
[0095] Optionally, the transition barrage style attribute is used to indicate that the barrage data is displayed in a static display manner, and the transition barrage style attribute includes display duration; the above-mentioned switching to display the barrage data in the second barrage set in the first video sub-segment according to the transition barrage style attribute includes: the computer device can display the barrage data in the second barrage set at a fixed position in the first video sub-segment according to the display duration.
[0096] In one embodiment, when the second bullet chat set is the same as the first bullet chat set, or the second bullet chat set has some of the same bullet chat data as the first bullet chat set, the computer device can obtain the bullet chat data displayed in the last video frame in the playback order of the first video segment (referred to as the last bullet chat data), and display the last bullet chat data at a fixed position in the first video sub-segment according to the display duration. Figure 3 As shown, the computer device can display the last barrage data at a fixed position in the video frame with a playback time of 4s to 4.8s in the target video data. The last barrage data is the barrage data displayed in the last video frame (i.e., video frame 32a) in the playback order in the first video segment, i.e., I want to take it home, the cat was still cute when it was young, and the cat's eyes became bigger when it grew up.
[0097] In one embodiment, the first barrage set is completely different from the second barrage set. The computer device can obtain the barrage data associated with the first video segment from the second barrage set, and display the barrage data associated with the first video segment at a fixed position in the first video sub-segment according to the display duration. The barrage data associated with the first video sub-segment refers to: the barrage data posted by the viewer when watching the first video sub-segment.
[0098] For example, Figure 7As shown, video frame 70a may be the last video frame in the first video segment in the playback order, and video frame 70a may be the video frame with the playback time of the 5th second in the target video data. The barrage data displayed in the barrage display area 71a in the video frame 70a include: like a teacher, I have read this book. Video frame 72a may be the first video frame in the playback order in the first video sub-segment, that is, video frame 72a may be the video frame with the playback time of the 5.1th second in the target video data, and the barrage data displayed in the barrage display area 73a in the video frame 72a include: the protagonist appears, is there anyone, and the protagonist is so beautiful. Comparing video frame 72a with video frame 70a, it can be seen that the barrage data displayed in video frame 72a is different from the barrage data displayed in video frame 70a. The other video frames in the first video sub-segment will continue to display the barrage data in video frame 72a according to the display mode in video frame 72a. The other video frames here are the video frames other than video frame 72a in the first video sub-segment.
[0099] Optionally, the above-mentioned fixed position is determined according to the position of the barrage data displayed in the last video frame in the playback order of the first video segment. For example, the above-mentioned fixed position refers to the position of the barrage data displayed in the last video frame in the playback order of the first video segment. This is conducive to smooth connection of the barrage data.
[0100] Optionally, the fixed position is any position in the bullet screen display area in the first video sub-segment.
[0101] S103. If the first video sub-segment is played, play the second video sub-segment in the second video segment, and switch to display the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different.
[0102] In the present application, if the first video sub-segment is played, the second video sub-segment in the second video segment is played, and the barrage data in the second barrage set is displayed in the second video sub-segment according to the second barrage style attributes. The second video sub-segment includes video frames in the second video segment except the first video segment.
[0103] It should be noted that the barrage data displayed in the first g video frames in the playback order of the second video sub-segment is the same as the barrage data displayed in the first video sub-segment, where the same refers to the same barrage data, and g can be a positive integer. The barrage data not displayed in the second barrage set is displayed in the video frames after the first g video frames in the playback order of the second video sub-segment, that is, the barrage data displayed in the video frames after the first g video frames in the playback order of the second video sub-segment is different from the barrage data displayed in the first video sub-segment.
[0104] It should be noted that the second barrage style attribute indicates that the barrage data is displayed in a static display mode, or the second barrage style attribute indicates that the barrage data is displayed in a dynamic display mode; the second barrage style attribute includes the time parameters and space parameters mentioned above.
[0105] It should be noted that when both the first barrage style attribute and the second barrage style attribute indicate that the barrage data is displayed in a dynamic display mode, the first barrage style attribute includes the first barrage moving direction, the first barrage arrangement direction and the first moving speed; the second barrage style attribute includes the second barrage moving direction, the second barrage arrangement direction and the second moving speed. The first barrage style attribute and the second barrage style attribute have one or more of the following differences: a. The moving direction of the first barrage is the opposite direction of the moving direction of the second barrage; b. The arrangement direction of the first barrage is the opposite direction of the arrangement direction of the second barrage; c. The first moving speed and the second moving speed are different.
[0106] Optionally, the second barrage moving direction included in the second barrage style attribute is different from the first barrage moving direction included in the first barrage style attribute; the above-mentioned displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: the computer device can move and display the barrage data in the second barrage set in the second video sub-segment according to the second barrage moving direction. By switching the barrage moving direction, the user is prompted that the plot of the video segment has changed, thereby improving the user's perception of plot changes and enhancing the user's ability to interpret the plot.
[0107] Optionally, the second bullet-screen style attribute also includes a second moving speed. The above-mentioned moving and displaying the bullet-screen data in the second bullet-screen set in the second video sub-segment according to the moving direction of the second bullet-screen includes: moving and displaying the bullet-screen data in the second bullet-screen set in the second video sub-segment according to the moving direction of the second bullet-screen and the second moving speed. The second moving speed can be determined according to the switching speed of the video frames in the second video segment. Similarly, the first moving speed in the first bullet-screen attribute style can be determined according to the switching speed of the video frames in the first video segment. Therefore, when the switching speed of the video frames in the second video sub-segment is equal to the switching speed of the video frames in the first video segment, the second moving speed is equal to the first moving speed; when the switching speed of the video frames in the second video sub-segment is less than the switching speed of the video frames in the first video segment, the second moving speed is less than the first moving speed. When the switching speed of the video frames in the second video sub-segment is greater than the switching speed of the video frames in the first video segment, the second moving speed is greater than the first moving speed. Through the switching speed of the video frames, the moving speed of the bullet-screen data is adaptively adjusted to increase the display flexibility of the bullet-screen data.
[0108] For example, when the plot of the second video clip is a time-space reversal plot, if the switching speed of the video frame of the second video sub-segment is less than or equal to the switching speed threshold, the plot of the second video clip is usually a non-circular time-space reversal plot, that is, the video screen presents a slow and natural switching time and space effect. At this time, the second moving speed can be a general moving speed, and the computer device can move and display the barrage data arranged in the second barrage set in the second video sub-segment according to the second barrage moving direction and the general moving speed, showing the effect of normal moving barrage data. If the switching speed of the video frame of the second video sub-segment is greater than the switching speed threshold, the plot of the second video clip is usually a cyclic time-space reversal plot, that is, the video screen presents a fast reversal (i.e., playback) effect. At this time, the second moving speed can be an accelerated moving speed, and the computer device can move and display the barrage data arranged in the second barrage set in the second video sub-segment according to the second barrage moving direction and the accelerated moving speed; showing the effect of accelerated moving barrage data, that is, by increasing the moving speed of the barrage data, the effect of fast reversal of the video screen is matched.
[0109] Similarly, if the switching speed of the video frame of the first video sub-segment is less than or equal to the switching speed threshold, the first moving speed may refer to the general moving speed mentioned above; if the switching speed of the video frame of the first video sub-segment is greater than the switching speed threshold, the first moving speed may refer to the accelerated moving speed mentioned above.
[0110] Optionally, the first moving speed and the second moving speed may be pre-set, such as the first moving speed may be a general moving speed and the second moving speed may be an accelerated moving speed; or the first moving speed may be an accelerated moving speed and the second moving speed may be a general moving speed.
[0111] In one embodiment, the second barrage arrangement direction included in the second barrage style attribute is different from the first barrage arrangement direction included in the first barrage style attribute; for example, the first barrage arrangement direction is the forward barrage arrangement direction, and the second barrage arrangement direction is the reverse barrage arrangement direction. The above-mentioned displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: the computer device can arrange the text content of the barrage data in the second barrage set according to the second barrage arrangement direction; and display the arranged barrage data in the second barrage set in the second video sub-segment. By switching the barrage arrangement direction, the user is prompted that the plot of the video clip has changed, thereby improving the user's perception of plot changes and enhancing the user's ability to interpret the plot.
[0112] In one embodiment, the second moving speed included in the second barrage style attribute is different from the first moving speed included in the first barrage style attribute; for example, the first moving speed is greater than the second moving speed, or the second moving speed is greater than the first moving speed, such as the first moving speed is a general moving speed and the second moving speed is an accelerated moving speed; the above-mentioned display of the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: the computer device can display the barrage data in the second barrage set in the second video sub-segment according to the second moving speed. By switching the barrage moving speed, the user is prompted that the plot of the video segment has changed, the user's perception of the plot change is improved, and the user's ability to interpret the plot is enhanced.
[0113] In one embodiment, the second barrage style attribute includes a second barrage moving direction and a second moving speed; the second barrage moving direction is the opposite direction of the first barrage moving direction, and the second moving speed is different from the first moving speed, and the barrage data in the second barrage set is displayed in the second video sub-segment according to the second barrage style attribute, including: the computer device can display the barrage data in the second barrage set in the second video sub-segment according to the second barrage moving direction and the second moving speed. By switching the barrage moving direction and the barrage moving speed, the user is prompted that the plot of the video segment has changed, thereby improving the user's perception of plot changes and enhancing the user's ability to interpret the plot.
[0114] Optionally, the second barrage style attribute includes a second barrage moving direction and a second barrage arrangement direction; the second barrage moving direction is the opposite direction of the first barrage moving direction, and the second barrage arrangement direction is the opposite direction of the first barrage arrangement direction. The above-mentioned displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: the computer device can arrange the text content of the barrage data in the second barrage set according to the second barrage arrangement direction, and move and display the arranged barrage data in the second barrage set in the second video sub-segment according to the second barrage moving direction, that is, continuously updating the position of the arranged barrage data in the second barrage set in the second video sub-segment according to the second barrage moving direction. By displaying the barrage data in video clips with different plots with different barrage style attributes, the user is prompted that there are plot changes in the previous and next video clips (i.e., the first video clip and the second video clip), which is conducive to improving the user's perception of plot changes, helping the user to quickly understand the plot of the target video data, and improving the display flexibility and diversity of the barrage data. By switching the arrangement direction of the bullet screen and the movement direction of the bullet screen, the user is prompted that the plot of the video clip has changed, the reminder is strengthened, the user's perception of the plot change is improved, and the user's ability to interpret the plot is enhanced. Optionally, when the second bullet screen style attribute indicates that the bullet screen data is displayed in a dynamic display mode, the second bullet screen style attribute can also include a second moving speed, the second moving speed is different from the first moving speed, and the second moving speed is the general moving speed or the accelerated moving speed mentioned above. The computer device can move and display the bullet screen data arranged in the second bullet screen set in the second video sub-segment according to the second bullet screen moving direction and the second moving speed, that is, according to the second bullet screen moving direction and the second moving speed, the position of the bullet screen data arranged in the second bullet screen set is continuously updated in the second video sub-segment. By switching the bullet screen moving speed, the arrangement direction of the bullet screen and the movement direction of the bullet screen, the user is prompted that the plot of the video clip has changed, the reminder is strengthened, the user's perception of the plot change is improved, and the user's ability to interpret the plot is enhanced.
[0115] In one embodiment, the present application provides a bullet screen framework, such as Figure 8As shown, the barrage framework includes an interface layer, a track and distribution layer, and a barrage rendering layer, wherein the interface layer includes a facade class, which refers to an interface provided to the outside; the facade class includes barrage facade management class components and barrage style attributes. The barrage facade management class component is an integration of other components within the entire barrage framework, providing external calling methods and barrage event callbacks, wherein the external calling methods include methods for adding and deleting virtual tracks, methods for starting, pausing, and clearing the screen for moving barrage data, and the like. For example, the track control component can call the external calling direction in the barrage facade management class to implement operations such as adding tracks (i.e. adding a single virtual track), deleting tracks (i.e. deleting a single virtual track), deleting all tracks (i.e. deleting all virtual tracks, i.e. turning off the barrage display function), inserting attributes, adding track sets (i.e. adding multiple virtual tracks), and inserting attributes refers to updating the barrage style attributes of the barrage data. The barrage event callback includes event callbacks such as the creation of barrage data, entering the barrage display area, and leaving the barrage display area. The bullet chat style attributes are used to control the display mode of the bullet chat data, including the attributes such as the limited display duration, position, start display time, and end display time of the bullet chat data.
[0116] Among them, the track and distribution layer may include a bullet screen distribution component, a track control component, a bullet screen track set, a bullet screen clock, a timer, a distribution strategy, a queue management, and a track management. The track control component is used to maintain the bullet screen data that has been on the screen (displayed) and is waiting to be on the screen (not displayed) on the virtual track, and is used for track management (i.e., managing virtual tracks), such as maintaining (such as adding and deleting) virtual tracks. The bullet screen distribution component (dispatcher) is used to add bullet screen data to the virtual track according to the distribution strategy. A bullet screen distribution component usually manages multiple virtual tracks, and has a built-in bullet screen queue to store bullet screen data. The bullet screen components are also used for queue management. For example, the bullet screen distribution component will continuously query the idle virtual tracks driven by the bullet screen clock. When a virtual track meets the idleness greater than the idleness threshold and the distribution strategy, the bullet screen data at the head of the bullet screen queue will be added to this virtual track. The free degree of the virtual track can be determined according to the amount of barrage data, and the distribution strategy can refer to the conditions for indicating how to distribute barrage data to the virtual track, such as the distribution strategy for indicating that barrage data is added to the virtual track only when there is no barrage data with a text length less than a text length threshold on the virtual track. The barrage clock is used to record the update time, addition time, etc. of the barrage data, and is the driver of the change of the barrage style attributes. The barrage track set refers to the set of all virtual tracks.
[0117] Among them, the rendering layer includes a rendering component, which refers to a component used to render barrage data and video data according to barrage style attributes. The rendering component can refer to an open graphics library (Open Graphics Library, OpenGL), Matal, and native draw, etc.
[0118] It should be noted that the barrage framework is managed in layers according to the interface layer, track and distribution layer, and barrage rendering layer. The layers are loosely coupled, and the design of the virtual track is flexible, which can simply and efficiently achieve the effect of moving barrage data on multiple virtual tracks.
[0119] In one embodiment, the inheritance relationship between the track control component and the track is as follows: Fig. 9 As shown, since the virtual track Track is abstracted in this application, such a track control component TrackController can be used with one or more virtual tracks to achieve the movement effects of various bullet screen data. Therefore, this application provides a virtual track that can support bidirectional (bullet screen forward flow direction and bullet screen reverse flow direction) movement of bullet screen data. Fig. 9From the inheritance relationship, we can see that the base class of the track control component is VBDanmuAbstractTrackController. The base class of the track control component is used to describe the general functions of the track control component, including adding virtual tracks, deleting virtual tracks, etc. The track control component can include the barrage movement controller VBDanmuBaseMoveTrackController, the barrage forward movement controller VBDanmuHorizontalMoveTrackController, and the barrage bidirectional movement controller VBDanmuHorizontalBidirectionalMoveTrackController. Among them, the barrage movement controller is used to describe the ability of the track control component to move barrage data, and the barrage forward movement controller is used to describe the ability of the track control component to move barrage data along the forward flow direction of the barrage. The barrage reverse flow movement controller is used to describe the ability of the track control component to move barrage data along the reverse flow direction of the barrage. The barrage bidirectional movement controller expands the ability to move barrage data along the reverse flow direction of the barrage through the inheritance relationship with the barrage reverse flow movement controller and the barrage forward movement controller, while retaining the original ability to move barrage data in the forward direction (along the forward flow direction of the barrage). The base class of the virtual track is VBDanmuAbstractTrack. The base class of the virtual track is used to describe the general functions of the virtual track, including the ability to carry barrage data. The virtual track includes the virtual track VBDanmuHorizontalMoveTrack that supports forward movement (that is, supports the barrage data to move along the forward flow direction of the barrage), and the virtual track VBDanmuHorizontalBidirectionalMove Track that supports bidirectional movement (that is, supports the barrage data to move along the forward flow direction and the reverse flow direction of the barrage). The virtual track that supports bidirectional movement allows the track control component to distinguish whether the barrage data is moving in the forward flow direction or the reverse flow direction of the barrage through the field value (backFlow) of the reverse flow field in the barrage display configuration response file. A field value of 0 or NO indicates the forward flow direction of the barrage (moving from right to left), and non-zero indicates the reverse flow direction. For an introduction to the barrage display configuration response file, see Fig.10 The virtual track that supports bidirectional movement allows the track control component to update the remaining display time of the bullet comment data after the bullet comment movement direction is updated.
[0120] In one embodiment, in order to achieve the effect of reverse barrage, the reverse barrage refers to the barrage data mentioned above moving in the reverse direction of the barrage, and the computer device can configure the barrage style attributes of the target video data, specifically, Fig.10As shown, the computer device can receive a bullet screen display configuration request file for the target video data, the bullet screen display configuration request file includes the video ID of the target video data, the value of the video ID is a string (vid: string) type, and the bullet screen display configuration request file is used to request to configure the bullet screen style attributes for the target video data. The computer device can detect whether the bullet screen style attributes of the target video data meet the configuration conditions, such as whether the playback length of the target video data is greater than the playback time threshold. If the playback length of the target video data is greater than the playback length, it is determined that the bullet screen style attributes of the target video data meet the configuration conditions. If the playback length of the target video data is less than or equal to the playback length, it is determined that the bullet screen style attributes of the target video data do not meet the configuration conditions. If the bullet screen style attributes of the target video data do not meet the configuration conditions, the computer device can generate a bullet screen display configuration response file carrying an error code (errorCode), and the value of (errorCode) is an integer (int) type. If the bullet-screen style attribute of the target video data meets the configuration conditions, the computer device can display a display list, which includes a bullet-screen display configuration item (DMDisplayEgg), which is used to configure the attribute ID (id: string), start time (startTime: int), end time (endTime: int) and attribute list (effectArray: List) of the bullet-screen style attribute. The start time and end time reflect the usage time of the configured bullet-screen style attribute, and the attribute ID reflects the identification of the configured bullet-screen style attribute. The attribute list (effectArray: List) may include a bullet-screen display effect (DMDisplayEffect), and the bullet-screen attribute effect refers to an option for configuring the attributes in the bullet-screen style attribute. For example, in response to a trigger operation for the bullet-screen attribute effect, the computer device may display the attribute type, which includes a reverse flow attribute, a font attribute, etc. The reverse flow attribute is used to configure the bullet-screen arrangement direction, the bullet-screen movement direction, and the bullet-screen movement speed of the bullet-screen data, and the font attribute is used to configure the font size, font size, font type, etc. of the bullet-screen data.
[0121] Further, the computer device can obtain the configuration result of the user for the barrage style attribute of the barrage data, and generate a barrage display configuration response file according to the configuration result. If the configuration result indicates that the user has configured the backflow attribute, the field value of the backflow information field (backFlowInfo:DMBackFlowInfo) in the barrage display configuration response file can be set to a valid value, such as a non-zero value. The default field value of the backflow information field is 0, indicating that the user has not configured the backflow attribute. If the configuration result indicates that the user configures the barrage arrangement direction of the barrage data as the inverted direction of the barrage, the field value of the text inverted field (textInverted:bool) in the barrage display configuration response file can be set to a valid value. If the configuration result indicates that the user configures the barrage movement direction of the barrage data as the reverse flow direction of the barrage, the field value of the backflow field (backFlow:bool) in the barrage display configuration response file can be set to a valid value. The default value of the backflow field is NO, indicating that the barrage movement direction of the barrage data defaults to the forward flow direction of the barrage. If the configuration result instructs the user to configure the barrage moving speed of the barrage data to an accelerated moving speed, the field value (acclerate:bool) of the acceleration field in the barrage display configuration response file can be set to a valid value. When the field value of the acceleration field is a valid value, the acceleration factor configured by the user can be obtained and added to the barrage display configuration response file. The acceleration factor refers to the increase in the barrage moving speed of the barrage data.
[0122] It should be noted that the first bullet screen style attribute in the present application may be the default bullet screen style attribute in the target application corresponding to the target video data, and the computer device may determine the bullet screen style attribute indicated in the bullet screen display configuration response file as the second bullet screen style attribute. It is understandable that the second bullet screen style attribute may be configured by the viewer, or the second bullet screen style attribute may be configured by the operator.
[0123] In one embodiment, the above-mentioned displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attributes includes: the computer device can display the barrage data in the second barrage set according to the second barrage style attributes on L virtual tracks in the second video sub-segment; which is conducive to presenting one or more lines of barrage data to the user.
[0124] Optionally, the second barrage moving direction included in the second barrage style attribute is different from the first barrage moving direction included in the first barrage style attribute; the L virtual tracks are the above-mentioned virtual tracks that support bidirectional movement. For example, the computer device can query the field value of the reverse flow field in the barrage display configuration response file. If the field value of the reverse flow field is a valid value, it is determined that the second barrage moving direction is the barrage reverse flow direction, and the barrage bidirectional movement controller in the track control component can be called to display the barrage data in the second barrage set on the L virtual tracks in the second video sub-segment according to the barrage reverse flow direction, that is, on the L virtual tracks in the second video sub-segment, the position of the barrage data in the second barrage set is updated from left to right. If the field value of the reverse flow field is an invalid value, such as NO, then the moving direction of the second barrage is determined to be the forward flow direction of the barrage, and the computer device can call the barrage bidirectional movement controller in the track control component to display the barrage data in the second barrage set on the L virtual tracks in the second video sub-segment according to the forward flow direction of the barrage, that is, on the L virtual tracks in the second video sub-segment, update the position of the barrage data in the second barrage set from right to left.
[0125] Optionally, the start time t1 and end time t2 of using the second barrage style attribute are configured in the barrage display configuration response file, that is, the usage time interval of the second barrage style attribute is [t1, t2]. During the process of playing the second video sub-segment in the target video data, the computer device can detect whether the playback time hits the interval. If the playback time hits the usage time interval, the computer device can read the second barrage style attribute from the barrage display configuration response file, and display the barrage data in the second barrage set according to the second barrage style attribute on the L virtual tracks in the second video sub-segment.
[0126] Optionally, the barrage data in the second barrage set is displayed on the L virtual tracks in the second video sub-segment according to the second barrage style attribute; L is a positive integer, including: the computer device can display x barrage data in the second barrage set on the L virtual tracks in the second video sub-segment according to the second barrage style attribute; x is a positive integer less than or equal to Q, Q is the number of barrages in the second barrage set; if the time reaches the barrage update time, the track control component is called to update and display the x barrage data in the second barrage set according to the second barrage style attribute. The barrage update time here is determined according to the barrage update time interval, and the barrage update time interval can be preset. In other words, the computer device can first display part of the barrage data (i.e., x barrage data) on L virtual tracks, and periodically update the barrage data on the L virtual tracks according to time, which is conducive to displaying more barrage data to the user. Optionally, if the time reaches the bullet screen update time, the track control component is called to update and display the x bullet screen data in the second bullet screen set according to the second bullet screen style attribute, including: the computer device removes part of the bullet screen data on the L virtual tracks and adds new bullet screen data to the virtual track. Specifically, if the time reaches the bullet screen update time, the computer device can call the track control component to update the remaining display time of the x bullet screen data to obtain the updated remaining display time of the x bullet screen data; the updated remaining display time is the maximum time that the x bullet screen data can be displayed on the video screen, and the updated remaining display time of the x bullet screen data can be the same or different. The updated remaining display time of the x bullet screen data is determined according to the start display time of the corresponding bullet screen data, the amount of text content, etc. Therefore, the computer device can call the bullet screen facade management component to remove the bullet screen data whose updated remaining display time is less than or equal to the time threshold from the L virtual tracks. The duration threshold may be preset, such as 0, and the track control component is called to display valid barrage data among the x barrage data on the L virtual tracks according to the second barrage style attribute. The valid barrage data is the barrage data among the x barrage data whose updated remaining display duration is greater than the duration threshold. Next, the track control component is called to display the remaining barrage data on the L virtual tracks according to the second barrage style attribute; the remaining barrage data is the barrage data in the second barrage set other than the x barrage data. By removing the barrage data whose duration is less than or equal to the duration threshold, new barrage data can be added on the L virtual tracks to present more barrage data to the user.
[0127] Optionally, the above-mentioned calling of the track control component to display valid barrage data among the x barrage data on the L virtual tracks according to the second barrage style attribute includes: when the second barrage style attribute is used to indicate the dynamic display mode to display the barrage data, the computer device can call the track control component to update the position of the valid barrage data among the x barrage data on the L virtual tracks according to the second barrage moving speed and the second barrage moving direction contained in the second barrage style attribute; that is, the product of the barrage update interval duration and the second barrage moving speed is the moving distance, and the valid barrage data is moved along the second barrage moving direction on the L tracks, and the moving distance is the product of the barrage update interval duration and the second barrage moving speed. When the second barrage style attribute is used to indicate the static display mode to display the barrage data, the computer device can call the track control component to display the valid barrage data on the L virtual tracks according to the current position of the valid barrage data.
[0128] Optionally, if the x bullet-screen data have been displayed in the first video segment according to the first bullet-screen style attribute, such as the first bullet-screen set is the same as the second bullet-screen set, or partially the same, or part of the bullet-screen data in the second bullet-screen set will be displayed in the first video segment first, and then displayed in the first video sub-segment and the second video sub-segment, then the computer device can obtain the updated remaining display time of the x bullet-screen data in the following manner. Specifically, the computer device can call the track control component to determine the display time of the x bullet-screen data in the first video segment as the remaining display time of the x bullet-screen data; further, obtain the interval time from the start time of displaying the x bullet-screen data in the second video segment to the bullet-screen update time; and perform the difference processing on the remaining display time of the x bullet-screen data and the interval time to obtain the remaining display time of the x bullet-screen data. By updating the remaining display time of the bullet-screen data, it is possible to avoid updating the position of the bullet-screen data for a long time, such as when the bullet-screen data has moved outside the video screen and the position of the bullet-screen data is still being updated, resulting in a waste of resources.
[0129] It should be noted that the display duration of the barrage data in the second barrage set when displayed with the transitional barrage style attribute affects the remaining display duration of the barrage data, that is, the display duration of the barrage data in the second barrage set when displayed with the transitional barrage style attribute will not be used to update the remaining display duration of the barrage data. Among them, the display duration of the barrage data in the second barrage set when displayed with the transitional barrage style attribute is determined by the transitional barrage style attribute, such as 0.8s.
[0130] For example, Fig.11As shown, assuming that the limited display time of the barrage data is 0.5s, assuming that the moving direction of the barrage in the above-mentioned first barrage style is the forward flow direction of the barrage, and the moving direction of the barrage in the second barrage style is the reverse flow direction of the barrage, the transition barrage style attribute indicates the pause of the moving barrage data, and the pause time is 0.8s. The moving speed of the first barrage in the first barrage style is the same as the moving speed of the second barrage in the second barrage style. The barrage data in the second barrage set: I want to take it home, the display time in the barrage display area 101a of the video frame 100a in the first video segment is 0.4s, the computer device can continue to display the barrage data in the video frame 100a at a fixed position in the first video sub-segment, and after 0.8s, the computer device can display the barrage data in the reverse flow direction of the barrage: I want to take it home. Since the barrage data "I want to take you home" is displayed for 0.4s in the first video clip, it will take 0.4s to change the moving direction of the barrage data to move it out of the video screen. That is, the display time of the barrage data "I want to take you home" in the first video clip is determined as the remaining display time of the barrage data "I want to take you home".
[0131] It should be noted that, if the first barrage set is different from the second barrage set, or if the x barrage data are barrage data with a relatively late display order in the second barrage set, the x barrage data will not be displayed in the first video segment according to the first barrage style attribute. At this time, the computer device can obtain the remaining display time for the update of the barrage data in the following manner. The computer device can determine the limited display time of the x barrage data as the remaining display time of the x barrage data, obtain the interval time from the start time of displaying the x barrage data in the second video segment to the barrage update time; and calculate the difference between the remaining display time of the x barrage data and the interval time to obtain the remaining display time of the x barrage data. By updating the remaining display time of the barrage data, it is possible to avoid updating the position of the barrage data for a long time, such as when the barrage data has moved outside the video screen and the position of the barrage data is still being updated, resulting in a waste of resources.
[0132] For example, the computer device may use the following formula (1) to calculate the remaining display time of the bullet screen data:
[0133] newCurrentAliveTime = attributes.totalAliveTime -attributes.currentAliveTime (1)
[0134] In formula (1), attributes.totalAliveTime is called the total display time (i.e., the total survival time), also known as the above-mentioned limited display time, attributes.currentAliveTime represents the current survival time of the bullet comment data, i.e., the interval time, and newCurrentAliveTime is the remaining display time for the update, also known as the update survival time.
[0135] Optionally, the above-mentioned calling of the track control component to display the remaining barrage data on the L virtual tracks according to the second barrage style attribute includes: the computer device can call the barrage distribution component to determine a virtual track whose idleness is greater than an idleness threshold from the L virtual tracks as the target virtual track, the idleness of the virtual track can be determined according to the amount of barrage data currently displayed on the virtual track, calling the barrage distribution component to read the remaining barrage data in the second barrage set from the barrage queue, and adding the remaining barrage data to the target virtual track. Then, the track control component is called to display the remaining barrage data on the target virtual track according to the second barrage style attribute.
[0136] Optionally, the first moving speed included in the first bullet-screen style attribute is different from the second moving speed included in the second bullet-screen style attribute; the above-mentioned displaying the bullet-screen data in the second bullet-screen set in the second video sub-segment according to the second bullet-screen style attribute includes: the computer device can call the track control component to obtain the total display time of the bullet-screen data in the second bullet-screen set; the total display time is determined according to the first moving speed; the computer device can obtain the speed ratio between the second moving speed and the first moving speed; the speed ratio is the amount of the moving speed increase. The computer device can divide the total display time by the speed ratio to obtain the limited display time of the x bullet-screen data. For example, assuming that the speed ratio is 1.5 and the second moving speed is V2, V2 / 1.5 (V2 divided by 1.5) can be used as the limited display time of the x bullet-screen data. Then, according to the limited display time and the second moving speed, the bullet-screen data in the second bullet-screen set is displayed in the second video sub-segment. When the moving speed of the barrage data changes, the moving effect of the barrage data can be achieved by updating the display duration of the barrage data.
[0137] It should be noted that, assuming that the first moving speed is V1 and the second moving speed is V2, the speed ratio is V2 / V1; that is, V2 divided by V1. When the first moving speed is less than the second moving speed, the speed ratio is a number greater than 1, and the speed ratio can be called the acceleration factor mentioned above, that is, the second moving speed becomes larger, and the limited display time calculated based on the second moving speed becomes smaller. In other words, when the moving speed of the barrage data increases, the accelerated movement effect of the barrage data can be achieved by shortening the display time of the barrage data. When the first moving speed is greater than the second moving speed, the speed ratio is a number less than 1, and the speed ratio can be called the deceleration factor, that is, the second moving speed becomes smaller, and the limited display time calculated based on the second moving speed becomes larger. In other words, when the moving speed of the barrage data becomes smaller, the decelerated movement effect of the barrage data can be achieved by extending the display time of the barrage data. Optionally, the first barrage arrangement direction included in the first barrage style attribute is the opposite direction of the second barrage arrangement direction included in the second barrage style attribute; the above-mentioned displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: the computer device can call the barrage rendering component, update the initial barrage rendering order according to the second barrage arrangement direction, and obtain an updated barrage rendering order; the initial barrage rendering order is determined according to the first barrage arrangement direction; the barrage rendering component is a component (functional module) for rendering barrage data, and renders the barrage data in the second barrage set according to the updated barrage rendering order; in the second video sub-segment, the rendered barrage data is displayed.
[0138] For example, the first barrage style attribute indicates that the barrage data is displayed in the forward direction of the barrage, and the second barrage style attribute indicates that the barrage data is displayed in the reverse direction of the barrage. The computer device can call the barrage rendering component, and use the reverse direction of the barrage to update the initial barrage rendering order to obtain an updated barrage rendering order; according to the updated barrage rendering order (that is, according to the reverse direction of the barrage), the barrage data in the second barrage set are rendered in sequence; in the second video sub-segment, the rendered barrage data is displayed, that is, the rendered barrage data is displayed in sequence according to the reverse order of the barrage.
[0139] In one embodiment, in response to a closing operation on a barrage style attribute switching control, the computer device may display the barrage data in the second barrage set in the second video clip according to the first barrage style attribute. In other words, the user can manually close the barrage style attribute switching function to meet the user's personalized needs.
[0140] For example, the first bullet screen style attribute indicates that the bullet screen data is displayed in the forward direction of the bullet screen, and the second bullet screen style attribute indicates that the bullet screen data is displayed in the reverse direction of the bullet screen. Fig.12 As shown, the bullet screen display area 111a of the video frame 110a in the second video sub-segment displays bullet screen data: When the cat is small, the cat with big eyes becomes big, and the cat with big eyes becomes big and long, and the computer device can respond to the trigger operation of the bullet screen toolbox and display the bullet screen toolbox. The bullet screen toolbox is a setting page for the bullet screen style attributes. The bullet screen toolbox 112a includes a bullet screen style attribute control (i.e., restore the default settings). In response to the trigger operation of the bullet screen style attribute control, the bullet screen data in the second bullet screen set can be displayed in the second video segment according to the direction of the bullet screen. Fig.12 In the video frame 113a in the second video sub-segment, the barrage display area 114a displays barrage data: the cat was cute when it was little, the cat's eyes became bigger when it grew up, and time and space flow backwards.
[0141] For further information, see Fig.13 , is a flow chart of a bullet screen display method provided in an embodiment of the present application. Fig.13 As shown, this method can be Figure 1 It can be executed by any terminal in the terminal cluster in Figure 1 can be executed by the server in Figure 1 The terminal and server in the terminal cluster are executed in collaboration, that is, the device used to execute the bullet screen display method in the present application can be a computer device, and the computer device can be a terminal or a server. In this embodiment, the computer device is a terminal as an example. The method may include the following steps:
[0142] S201. During playback of a first video sub-segment of target video data, display barrage data in a first barrage set in the first video sub-segment according to a first barrage style attribute; the first video sub-segment belongs to a first video segment in the target video data.
[0143] In the present application, a computer device can play the first video sub-segment of the target video data, and display the barrage data in the first barrage set in the first video sub-segment according to the first barrage style attribute, wherein the first video sub-segment is the video frame that is in the first h positions in the playback order in the first video segment.
[0144] S202: If the first video sub-segment is played, play the second video sub-segment in the first video segment, and switch to display the barrage data in the first barrage set in the second video sub-segment according to the transition barrage style attributes.
[0145] In the present application, if the first video sub-segment is played, the second video sub-segment in the first video segment can be played, and the barrage data in the first barrage set can be displayed in the second video sub-segment according to the transition barrage style attribute. The second video sub-segment may include video frames other than the first video sub-segment in the first video segment.
[0146] S203. If the playback of the second video sub-segment is completed, the second video segment in the target video data is played, and the barrage data in the second barrage set is displayed in the second video segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different; the plot of the first video segment is different from the plot of the second video segment.
[0147] In the present application, if the second video sub-segment is played, the computer device can play the second video segment in the target video data, and switch to display the barrage data in the second barrage set in the second video segment according to the second barrage style attributes.
[0148] It should be noted that Fig.13 and Figure 4 The difference is: Figure 4 In the second video clip, the bullet screen data is displayed with transition bullet screen style attributes. Fig.13 The bullet screen data is displayed in the first video clip with transition bullet screen style attributes. Therefore, the specific description of step S201 in this application can refer to the above step S101, the specific description of step S202 can refer to the above step S102, and the specific description of step S203 can refer to the above step S103, and the repeated parts will not be repeated.
[0149] For further information, see Fig.14 , is a flow chart of a bullet screen display method provided in an embodiment of the present application. Fig.14 As shown, this method can be Figure 1 It can be executed by any terminal in the terminal cluster in Figure 1 can be executed by the server in Figure 1 The terminal and server in the terminal cluster are executed in collaboration, that is, the device used to execute the bullet screen display method in the present application can be a computer device, and the computer device can be a terminal or a server. In this embodiment, the computer device is a terminal as an example. The method may include the following steps:
[0150] S301. During playback of a first video segment of target video data, display barrage data in a first barrage set in the first video segment according to a first barrage style attribute.
[0151] In one embodiment, step S301 includes: during the playback of the first video sub-segment in the first video segment of the target video data, displaying the barrage data in the first barrage set in the first video sub-segment of the first video segment according to the first barrage style attribute; if the playback of the first video sub-segment of the first video segment is completed, then playing the second video sub-segment of the first video segment, switching to displaying the barrage data in the first barrage set in the second video sub-segment of the first video segment according to the transition barrage style attribute. That is, by displaying the barrage data in the second video sub-segment in the first video segment in a transition barrage style, it is possible to avoid the situation where the second video sub-segment in the first video segment has a blank screen (i.e., no barrage data), abruptness, etc., so that the barrage data displayed in the previous and next video segments are smoothly connected.
[0152] S302. If the playback of the first video clip is completed, the second video clip in the target video data is played, and the barrage data in the second barrage set is displayed in the second video clip according to the second barrage style attributes; the plot of the first video clip is different from the plot of the second video clip.
[0153] In one embodiment, step S302 includes: if the first video segment is played, the first video sub-segment of the second video segment in the target video data is played, and the barrage data in the second barrage set is displayed in the first video sub-segment according to the transition barrage style attribute; if the first video sub-segment is played, the second video sub-segment in the second video segment is played, and the barrage data in the second barrage set is displayed in the second video sub-segment of the second video segment according to the second barrage style attribute. That is, by displaying the barrage data in the transition barrage style in the first video sub-segment of the second video segment, it is possible to avoid the appearance of a blank screen (i.e., no barrage data) and abruptness in the second video segment, so that the barrage data displayed in the previous and next video segments are smoothly connected.
[0154] It should be noted that the description of steps S301 and S302 in this application can refer to the description of the relevant steps in the previous text. For example, the description of step S301 can refer to the description of the above-mentioned step S101, and the description of step S302 can refer to the above-mentioned step S102 and step S103. The repeated parts will not be repeated here.
[0155] In the present application, when there are plot changes in the target video data, the barrage data is displayed by switching different barrage style attributes, which is beneficial to improving the user's perception of plot changes, helping the user to quickly understand the plot of the target video data, and improving the display flexibility and diversity of the barrage data; at the same time, it can avoid users from having to replay the video data multiple times to understand the plot of the video data, and can reduce the terminal's resource overhead (such as resources required to load video data).
[0156] In one embodiment, the bullet screen display method may include: Fig.15Steps 140b to 165b are shown as follows: 140b, turn on the bullet screen, 141b, turn on the timer, 142b, pre-request logic, 143b, format conversion, 144b, whether to play. 145b, add the bullet screen data to the bullet screen library, 146b, send to the bullet screen distribution component, 147b, whether it is high priority, 148b, whether it exceeds the maximum number, 149b, whether it exceeds the maximum number. 150b, add to the end of the bullet screen queue; 151b, pre-draw texture, 152b, recycle resources, 153b, add to the end of the bullet screen queue; 154b, sort according to weight. Among them, steps 140b to 154b are called the bullet screen placement stage. Specifically, when it is detected that the computer device turns on the bullet screen, that is, turns on the bullet screen display function, a timer can be turned on, and the timer is used for the playback time of the target video data. Receive the pre-request logic, which includes the initial bullet screen data, and the format of the bullet screen data can be based on the format of the http segment request. The computer device can convert the format of the initial bullet screen data to obtain the bullet screen data, and the format of the bullet screen data is the bullet screen format of the target application corresponding to the target video data. Detect whether the target video data is played. If so, the computer device can send the bullet screen data to the bullet screen facade management component. The bullet screen facade management component adds the bullet screen data to the bullet screen library and sends the bullet screen data to the bullet screen distribution component. The bullet screen distribution component determines the priority of the bullet screen data. The priority of the bullet screen data can be determined based on the correlation between the bullet screen data and the target video data, the level of the publisher of the bullet screen data in the target application, and the number of times the bullet screen data is sent. Determine whether the bullet screen data belongs to a high priority. A high priority means that the priority is greater than the priority threshold. If the bullet screen data belongs to a high priority, the bullet screen distribution component can determine whether the number of bullet screen data in the bullet screen queue exceeds the maximum number. If the number of bullet screen data in the bullet screen queue does not exceed the maximum number, the bullet screen data can be added to the end of the bullet screen queue, that is, the bullet screen data is added to the end of the bullet screen queue, and the bullet screen data is pre-textured. If the barrage data does not belong to high priority, the barrage distribution component can determine whether the number of barrage data in the barrage queue exceeds the maximum number. If the number of barrage data in the barrage queue exceeds the maximum number, the barrage data can be recycled and the barrage data can be deleted; if the number of barrage data in the barrage queue does not exceed the maximum number, the barrage data can be added to the end of the barrage queue, and sorted according to the weight of the barrage data to obtain the display order of the barrage data. The barrage data with an earlier display order moves to the head of the barrage queue, and the barrage data with a later display order moves to the end of the barrage queue. The weight of the barrage data can be determined according to the priority of the barrage data.
[0157] Among them, 155b, start to put on the screen, 156b, start the barrage timer, 157b, barrage facade management component; 158b, track control component. 159b, update the position and remaining display time, 160b, whether the remaining display time is less than or equal to the time threshold. 161b, barrage distribution component, 162b, whether the appropriate track (virtual track) is queried, 163b, read the barrage data from the barrage queue, 164b, pre-draw the texture, 165b, the track control component uploads the texture to the rendering component. Steps 155b to 165b are called the barrage update phase. Specifically, the computer device can start to put the barrage data in the barrage queue on the screen, and display the barrage data at the head of the barrage queue in the first video clip in the target video data according to the first barrage style attribute, that is, the barrage data at the head of the team is called the barrage data in the first barrage set. The barrage timer is started, which is used to record the update time of the barrage data, call the barrage facade management component to obtain the time in the barrage timer, calculate the time interval between the current time and the last time the barrage was updated, and send the time interval to the track control component and the barrage distribution. After receiving the time interval, the track control component updates the remaining display time of the barrage data displayed in the virtual track, that is, subtracts the time interval from the remaining display time to obtain the remaining display time for the update of the barrage data. If the remaining display time for the update of the barrage data is greater than the time threshold, the position of the barrage data in the virtual track is updated. After receiving the time interval, the barrage distribution component traverses all virtual tracks to determine whether a suitable virtual track is found, that is, to check whether there is a virtual track with an idleness greater than the idleness threshold. If a virtual track with an idleness greater than the idleness threshold is found, the barrage data can be read from the barrage queue and added to the virtual track with an idleness greater than the idleness threshold. The track control component can add the view of the added barrage data to the barrage display area. Specifically, if it is texture barrage data, the texture will be pre-drawn and uploaded to the rendering component. The rendering component renders the texture to obtain the view of the barrage data, and the view of the barrage data is added to the barrage display area.
[0158] Optionally, the bullet screen display method further includes a bullet screen uninstallation phase. Specifically, when the remaining duration of the update display of the bullet screen data is less than or equal to the duration threshold, the track control component can remove the view of the bullet screen data from the bullet screen display area, and remove the information stored about the bullet screen data (such as location information, etc.). The bullet screen facade management component can call the uninstallation callback function to remove the bullet screen data and the attributes of the bullet screen data (such as priority, etc.).
[0159] Optionally, the barrage display method also includes a barrage distribution stage. Specifically, the barrage facade management class component usually includes a barrage distribution component. The barrage distribution component usually manages multiple virtual tracks and has a built-in barrage queue to store barrage data. The barrage facade management class component will continuously query the idle virtual tracks under the drive of the barrage clock. When a virtual track meets the idleness requirements and allocation strategy at the same time, the barrage data at the head of the barrage queue will be added to this virtual track. The specific process is as follows: the barrage facade management class component calls the insertNewAttributes method to insert the barrage data (danmu attribute) into the barrage queue. The barrage facade management class component is driven by the barrage clock and calls the dispatchNewAttributesToFreeTracks method to add new attributes to the idle virtual track. It selects a virtual track that is idle and meets the distribution strategy from the virtual track, and adds the barrage data at the head of the barrage queue to the virtual track that is idle and meets the distribution strategy. The track control component displays the added barrage data.
[0160] Optionally, the bullet screen display method further includes a bullet screen moving stage, combining Fig.14 In the basic process, the principle of moving the barrage data is that under the drive of the barrage clock, the new barrage data is gradually driven to the screen and the barrage data that has been on the screen changes its position according to the established rules. In the industry, barrage data usually appears from the right edge of the video screen as the video data is played, and moves uniformly to the left side of the video screen until it disappears from the left side. In this example, its corresponding virtual track track represents an animation that moves uniformly from the right edge of the video screen to the left edge of the video screen until it exits the screen. The duration of this process is the limited display time TotalTime specified in the barrage style attribute of this barrage data. As the barrage clock periodically calls back (usually the barrage clock callback interval depends on the screen refresh rate. If the refresh rate is 60 frames per second, the callback interval is 0.0167), the track control component receives a callback of a short period of time (i.e., the interval duration), and then executes the following steps: (1) traverse all barrage data on the current virtual track, add the time interval to the display time of each barrage data, and obtain the updated display time; (2) if the updated display time of this barrage data exceeds the limited display time after adding this time interval, this barrage data will be placed in an uninstall function and uninstalled in the uninstall function. (3) If the update display time of this bullet comment data does not reach the limited display time after increasing this time interval, the track control component calls the virtual track to update the position of this bullet comment data. Of course, the track control component can unload the bullet comment data and update the position of the bullet comment data based on the remaining display time of the bullet comment data mentioned above.
[0161] Optionally, the barrage display method also includes a reverse barrage configuration stage. In order to support the effect of reverse barrage, the use time interval [t1, t2] of the reverse barrage is specified in the barrage display configuration response file. During the playback of the target video data, when the track control component receives the interval duration, it can detect whether the use time interval is hit. If the use time interval is hit, it detects whether the reverse information field in the barrage display configuration response file is a valid value. If it is a valid value, the reverse attribute of the barrage display configuration response file is obtained. When the playback time of the target video data exceeds the use time interval, the barrage style attribute switching can be turned off to restore the default barrage effect of the target application, that is, restore the default barrage style attribute.
[0162] Optionally, the barrage display method also includes a reverse barrage stage. The description of the reverse barrage can be found above and will not be repeated here.
[0163] Optionally, the barrage display method also includes a reverse barrage stage. After receiving the barrage reverse configuration, if the field value true (valid value) of the text inverted field textInverted in the barrage display configuration response file is recognized, the barrage rendering component can update the rendering order of the barrage data and render the barrage data according to the updated rendering order.
[0164] Optionally, the barrage display method also includes a barrage acceleration stage. After receiving the barrage backflow configuration, if the field value true of the acceleration field accelerate in the barrage display configuration response file is identified, the movement speed of the barrage data is accelerated, which means that the limited display time of the barrage data is reduced. The accelerated movement of the barrage data can be achieved by reducing the limited display time of the barrage data. The display time of the barrage data can be updated according to the acceleration factor in the barrage display configuration response file, thereby achieving the acceleration effect of the barrage.
[0165] See also Fig.16 , is a schematic diagram of the structure of a bullet screen display device provided in an embodiment of the present application. Fig.16 As shown, the bullet screen display device may include:
[0166] The first display module 161 is used to display the barrage data in the first barrage set in the first video segment according to the first barrage style attribute during the playback of the first video segment of the target video data;
[0167] The second display module 162 is used for playing the first video sub-segment of the second video segment in the target video data, and switching to displaying the barrage data in the second barrage set in the first video sub-segment according to the transition barrage style attribute if the first video segment is played. The plot of the first video segment is different from the plot of the second video segment;
[0168] The third display module 163 is used to play the second video sub-segment in the second video segment if the first video sub-segment is played, and switch to display the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different.
[0169] Optionally, the transitional bullet screen style attribute is used to indicate that the bullet screen data is displayed in a static display mode, and the transitional bullet screen style attribute includes a display duration;
[0170] The second display module 162 is used to display the barrage data in the second barrage set at a fixed position in the first video sub-segment according to the display duration.
[0171] Optionally, the fixed position is determined based on the position of the barrage data displayed in the last video frame in the playback order of the first video segment; or, the fixed position is any position in the barrage display area in the first video sub-segment.
[0172] Optionally, the second barrage moving direction included in the second barrage style attribute is different from the first barrage moving direction included in the first barrage style attribute; the third display module 163 is used to move and display the barrage data in the second barrage set in the second video sub-segment according to the second barrage moving direction.
[0173] The third display module 163 is used to move and display the barrage data in the second barrage set in the second video sub-segment according to the second barrage moving direction and the second moving speed.
[0174] Optionally, the second barrage arrangement direction included in the second barrage style attribute is different from the first barrage arrangement direction included in the first barrage style attribute; the third display module 163 is used to arrange the text content of the barrage data in the second barrage set according to the second barrage arrangement direction; in the second video sub-segment, the arranged barrage data in the second barrage set is displayed.
[0175] Optionally, the second moving speed included in the second barrage style attribute is different from the first moving speed included in the first barrage style attribute; the third display module 163 is used to display the barrage data in the second barrage set in the second video sub-segment according to the second moving speed.
[0176] Optionally, if the content described by the second video clip is the same as the content described by the first video clip, the first barrage set is the same as the second barrage set, and the first barrage set is associated with the first video clip, or the first barrage set is associated with the second video clip; if the content described by the second video clip is different from the content described by the first video clip, the first barrage set is associated with the first video clip, and the second barrage set is associated with the second video clip.
[0177] The first display module 161 is further used to display the barrage data in the second barrage set in the second video segment according to the first barrage style attributes in response to a closing operation on the barrage style attribute switching control.
[0178] 16 Optionally, the third display module 163 is used to display the barrage data in the second barrage set in the reverse direction of the barrage if the second barrage style attribute indicates that the barrage data is moved in the reverse direction of the barrage; if the second barrage style attribute indicates that the barrage data is moved in the forward direction of the barrage, the barrage data in the second barrage set is displayed in the forward direction of the barrage on the L virtual tracks in the second video sub-segment. L is a positive integer;
[0179] Optionally, the third display module 163 is used to display x bullet discussion data in the second bullet discussion set on L virtual tracks of the second video sub-segment according to the second bullet discussion style attribute; x is a positive integer less than or equal to Q, Q is the number of bullet discussions in the second bullet discussion set; L is a positive integer;
[0180] If the time reaches the bullet screen update time, the track control component is called to update and display the x bullet screen data in the second bullet screen set according to the second bullet screen style attributes.
[0181] Optionally, the third display module 163 is used to call the track control component if the time reaches the barrage update time, update the remaining display time of the x barrage data, and obtain the updated remaining display time of the x barrage data; call the barrage facade management component to remove the barrage data whose updated remaining display time among the x barrage data is less than or equal to the time threshold from the L virtual tracks; call the track control component to display the valid barrage data among the x barrage data on the L virtual tracks according to the second barrage style attribute; the valid barrage data is the barrage data among the x barrage data whose updated remaining display time is greater than the time threshold; call the track control component to display the remaining barrage data on the L virtual tracks according to the second barrage style attribute; the remaining barrage data is the barrage data in the second barrage set other than the x barrage data.
[0182] Optionally, the barrage moving direction included in the first barrage style attribute is opposite to the barrage moving direction included in the second barrage style attribute; optionally, the third display module 163 is used to call the track control component if the x barrage data have been displayed in the first video clip according to the first barrage style attribute, and determine the display time of the x barrage data in the first video clip as the remaining display time of the x barrage data; obtain the interval time from the start time of displaying the x barrage data in the second video clip to the barrage update time; and calculate the difference between the remaining display time of the x barrage data and the interval time to obtain the remaining display time of the x barrage data.
[0183] Optionally, the third display module 163 is used to call the barrage distribution component to determine, from the L virtual tracks, a virtual track whose idleness is greater than an idleness threshold as the target virtual track; call the barrage distribution component to add the remaining undisplayed barrage data belonging to the second barrage set in the barrage queue to the target virtual track; call the track control component to display the remaining barrage data on the target virtual track according to the second barrage style attributes.
[0184] Optionally, a first moving speed included in the first barrage style attribute is different from a second moving speed included in the second barrage style attribute;
[0185] Optionally, the third display module 163 is used to call the track control component to obtain the total display time of the barrage data in the second barrage set; the total display time is determined according to the first moving speed; the speed ratio between the second moving speed and the first moving speed is obtained; the total display time is divided by the speed ratio to obtain the limited display time of the x barrage data; according to the limited display time and the second moving speed, the barrage data in the second barrage set are displayed in the second video sub-segment.
[0186] Optionally, the first barrage arrangement direction included in the first barrage style attribute is the opposite direction of the second barrage arrangement direction included in the second barrage style attribute;
[0187] Optionally, the third display module 163 is used to call the barrage rendering component, update the initial barrage rendering order according to the second barrage arrangement direction, and obtain an updated barrage rendering order; the initial barrage rendering order is determined according to the first barrage arrangement direction; according to the updated barrage rendering order, the barrage data in the second barrage set is rendered; in the second video sub-segment, the rendered barrage data is displayed.
[0188] Optionally, the division module 164 is used to display a configuration interface in response to a configuration operation for a plot change moment; obtain the plot change moment input in the configuration interface, and divide the target video data according to the plot change moment to obtain the first video segment and the second video segment.
[0189] Optionally, the division module 164 is used to obtain a target barrage set in the target video data; the first barrage set and the second barrage set are subsets of the target barrage set;
[0190] Performing text feature recognition on the barrage data in the target barrage set to obtain text features of the barrage data in the target barrage set;
[0191] The target video data is divided according to text features of the barrage data in the target barrage set to obtain the first video segment and the second video segment.
[0192] Optionally, a division module 164 is used to determine the text similarity between the text features of the barrage data in the target barrage set and the text features of the plot changes; count the number of barrages whose text similarity of the barrage data in the target barrage set is greater than a similarity threshold within S release times; the S release times are the release times of the barrage data in the target barrage set, and S is a positive integer; select the times when the corresponding number of barrages is greater than the number threshold from the S times as the plot change times; and divide the target video data according to the plot change times to obtain the first video segment and the second video segment.
[0193] Optionally, the division module 164 is used to obtain the script data corresponding to the target video data; extract object description information and the appearance time of the object description information from the script data corresponding to the target video data; determine the script scene information set associated with the target video data according to the appearance time of the object description information and the object description information;
[0194] The target video data is divided according to the script scene information set to obtain the first video segment and the second video segment.
[0195] Optionally, the division module 164 is used to: traverse the script scene information i in the script scene information set and the untraversed video frames in the target video data frame by frame; i is less than or equal to F, and F is the number of script scene information in the script scene information set; if the matching degree between the traversed target video frame and the script scene information i is less than a matching degree threshold, then dividing the target video data according to the playback time of the target video frame to obtain the first video segment and the second video segment.
[0196] If it needs to be explained, the barrage display device in the present application can be used to execute the description of the above-mentioned barrage display method in the corresponding embodiment of the previous text. When the barrage display device executes the description of the barrage display method in the previous text, the beneficial effects brought about can refer to the beneficial effects described in the embodiment corresponding to the barrage display method in the previous text, and will not be repeated here.
[0197] In the present application, during the playback of the target video data, the bullet screen data in the video clips of different plots are displayed with different bullet screen style attributes (i.e., the first bullet screen style attribute and the second bullet screen style attribute) to prompt the user that there are plot changes in the previous and next video clips (i.e., the first video clip and the second video clip), which is conducive to improving the user's perception of plot changes, and is conducive to the user's rapid understanding of the plot of the target video data, and improving the display flexibility and diversity of the bullet screen data; at the same time, it can avoid the user from having to play back the video data multiple times to understand the plot of the video data, and can reduce the terminal's resource overhead (such as the resources required to load the video data). In addition, by displaying the bullet screen data with a transition bullet screen attribute pattern between the previous and next video clips, it is possible to avoid the appearance of a blank screen (i.e., no bullet screen data), abruptness, etc. in the video clip, so that the bullet screen data displayed in the previous and next video clips can be smoothly connected.
[0198] See also Fig.17 , is a schematic diagram of the structure of a bullet screen display device provided in an embodiment of the present application. Fig.17 As shown, the bullet screen display device may include:
[0199] The first display module 171 is used to display the barrage data in the first barrage set in the first video segment according to the first barrage style attribute during the playback of the first video segment of the target video data;
[0200] The second display module 172 is used for playing the first video sub-segment of the second video segment in the target video data, and switching to displaying the barrage data in the second barrage set in the first video sub-segment according to the transition barrage style attribute if the first video segment is played. The plot of the first video segment is different from the plot of the second video segment;
[0201] The third display module 173 is used to play the second video sub-segment in the second video segment if the first video sub-segment is played, and switch to display the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different.
[0202] If it needs to be explained, the barrage display device in the present application can be used to execute the description of the above-mentioned barrage display method in the corresponding embodiment of the previous text. When the barrage display device executes the description of the barrage display method in the previous text, the beneficial effects brought about can refer to the beneficial effects described in the embodiment corresponding to the barrage display method in the previous text, and will not be repeated here.
[0203] In the present application, during the playback of the target video data, the bullet screen data in the video clips of different plots are displayed with different bullet screen style attributes (i.e., the first bullet screen style attribute and the second bullet screen style attribute) to prompt the user that there are plot changes in the previous and next video clips (i.e., the first video clip and the second video clip), which is conducive to improving the user's perception of plot changes, and is conducive to the user's rapid understanding of the plot of the target video data, and improving the display flexibility and diversity of the bullet screen data; at the same time, it can avoid the user from having to play back the video data multiple times to understand the plot of the video data, and can reduce the terminal's resource overhead (such as the resources required to load the video data). In addition, by displaying the bullet screen data with a transition bullet screen attribute pattern between the previous and next video clips, it is possible to avoid the appearance of a blank screen (i.e., no bullet screen data), abruptness, etc. in the video clip, so that the bullet screen data displayed in the previous and next video clips can be smoothly connected.
[0204] See also Fig.18 , is a schematic diagram of the structure of a bullet screen display device provided in an embodiment of the present application. Fig.18 As shown, the bullet screen display device may include:
[0205] The first display module 181 is used to display the barrage data in the first barrage set in the first video segment according to the first barrage style attribute during the playback of the first video segment of the target video data;
[0206] The second display module 182 is used to play the second video segment in the target video data after the first video segment is played, and switch to display the barrage data in the second barrage style attribute in the second video segment according to the second barrage style attribute; the plot of the first video segment is different from the plot of the second video segment, and the first barrage style attribute, the transition barrage style attribute and the second barrage style attribute are different.
[0207] If it needs to be explained, the barrage display device in the present application can be used to execute the description of the above-mentioned barrage display method in the corresponding embodiment of the previous text. When the barrage display device executes the description of the barrage display method in the previous text, the beneficial effects brought about can refer to the beneficial effects described in the embodiment corresponding to the barrage display method in the previous text, and will not be repeated here.
[0208] In the present application, during the playback of the target video data, the bullet screen data in the video clips of different plots are displayed with different bullet screen style attributes (i.e., the first bullet screen style attribute and the second bullet screen style attribute) to prompt the user that there are plot changes in the previous and next video clips (i.e., the first video clip and the second video clip), which is conducive to improving the user's perception of plot changes, and is conducive to the user's rapid understanding of the plot of the target video data, and improving the display flexibility and diversity of the bullet screen data; at the same time, it can avoid the user from having to play back the video data multiple times to understand the plot of the video data, and can reduce the terminal's resource overhead (such as the resources required to load the video data). In addition, by displaying the bullet screen data with a transition bullet screen attribute pattern between the previous and next video clips, it is possible to avoid the appearance of a blank screen (i.e., no bullet screen data), abruptness, etc. in the video clip, so that the bullet screen data displayed in the previous and next video clips can be smoothly connected.
[0209] See also Fig.19 , is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.19 As shown, the above-mentioned computer device 1000 may refer to a terminal or a server, including: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, in some embodiments, the user interface 1003 may include a display screen (DiSPlay), a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatileMeMory), such as at least one disk storage. The memory 1005 may also be optionally at least one storage device away from the aforementioned processor 1001. As Fig.19 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a computer program.
[0210] exist Fig.19In the computer device 1000 shown, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface; and the processor 1001 can be used to call the computer program stored in the memory 1005 to execute the description of the above-mentioned bullet screen display method in the corresponding embodiment of the foregoing text, and can also execute the description of the above-mentioned bullet screen display device in the corresponding embodiment of the foregoing text, which will not be repeated here. In addition, when the processor 1001 executes the description of the foregoing bullet screen display method, or when the processor 1001 executes the description of the foregoing bullet screen display device, the beneficial effects brought about can refer to the beneficial effects described in the embodiment corresponding to the foregoing bullet screen display method, and will not be repeated here.
[0211] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the above-mentioned computer-readable storage medium stores the computer program executed by the above-mentioned barrage display device, and the above-mentioned computer program includes program instructions. When the above-mentioned processor executes the above-mentioned program instructions, it can execute the description of the above-mentioned barrage display method in the corresponding embodiment of the previous text, so it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0212] As an example, the above program instructions may be deployed on a computer device for execution, or deployed on at least two computer devices at one location for execution, or executed on at least two computer devices distributed at at least two locations and interconnected through a communication network. At least two computer devices distributed at at least two locations and interconnected through a communication network may constitute a blockchain network.
[0213] The above-mentioned computer-readable storage medium can be the bullet screen display device provided in any of the above-mentioned embodiments or the central storage unit of the above-mentioned computer device, such as a hard disk or a central storage of a computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SMART Media card, SMC), a secure digital (Secure digital, SD) card, a flash memory card (flaSh card), etc. equipped on the computer device. Further, the computer-readable storage medium can also include both the central storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0214] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish between contents in different media, rather than to describe a specific order. In addition, the terms "including" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules that are not listed, or may optionally include other step units inherent to these processes, methods, devices, products, or equipment.
[0215] The data collection and processing in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in practice, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0216] The embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the description of the above-mentioned bullet screen display method and decoding method in the corresponding embodiment above, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the embodiment of the computer program product involved in this application, please refer to the description of the method embodiment of this application.
[0217] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0218] The method and related apparatus provided by the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided by the embodiment of the present application. Specifically, each process and / or box in the method flow chart and / or structural diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable network connection device to generate a machine, so that the instructions executed by the processor of the computer or other programmable network connection device generate instructions for implementing the process in the process. Figure 1 Schematic diagram of one or more processes and / or structures Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable network-connected device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 Schematic diagram of one or more processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable network connected device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.
[0219] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A bullet screen display method, characterized in that: include: During playback of a first video segment of target video data, displaying barrage data in a first barrage set in the first video segment according to a first barrage style attribute; If the first video segment is played, the first video sub-segment of the second video segment in the target video data is played, and the barrage data in the second barrage set is displayed in the first video sub-segment according to the transition barrage style attribute; the plot of the first video segment is different from the plot of the second video segment; If the first video sub-segment is played, the second video sub-segment in the second video segment is played, and the barrage data in the second barrage set is displayed in the second video sub-segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different.
2. The method according to claim 1, characterized in that The transitional bullet screen style attribute is used to indicate that the bullet screen data is displayed in a static display mode, and the transitional bullet screen style attribute includes a display duration; The switching to displaying the bullet chat data in the second bullet chat set in the first video sub-segment according to the transition bullet chat style attribute includes: At a fixed position in the first video sub-segment, the bullet comment data in the second bullet comment set is displayed according to the display duration.
3. The method according to claim 2, characterized in that The fixed position is determined according to the position of the bullet screen data displayed in the last video frame in the playback order in the first video segment; or, The fixed position is any position in the bullet screen display area in the first video sub-segment.
4. The method according to claim 1, characterized in that The second barrage moving direction included in the second barrage style attribute is different from the first barrage moving direction included in the first barrage style attribute; The displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: According to the moving direction of the second barrage, the barrage data in the second barrage set is moved and displayed in the second video sub-segment.
5. The method according to claim 4, characterized in that The second bullet screen style attribute also includes a second moving speed; The step of moving and displaying the second bullet commentary data in the second bullet commentary set in the second video sub-segment according to the second bullet commentary moving direction includes: According to the second barrage moving direction and the second moving speed, the barrage data in the second barrage set is moved and displayed in the second video sub-segment.
6. The method according to claim 1, characterized in that The second barrage arrangement direction included in the second barrage style attribute is different from the first barrage arrangement direction included in the first barrage style attribute; The displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: Arranging text content of the barrage data in the second barrage set according to the second barrage arrangement direction; In the second video sub-segment, the arranged barrage data in the second barrage set is displayed.
7. The method according to claim 1, characterized in that The second moving speed included in the second barrage style attribute is different from the first moving speed included in the first barrage style attribute; The displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: Display the barrage data in the second barrage set in the second video sub-segment according to the second moving speed.
8. The method according to claim 1, characterized in that If the content described by the second video segment is the same as the content described by the first video segment, then the first barrage set is the same as the second barrage set, the first barrage set is associated with the first video segment, or the first barrage set is associated with the second video segment; If the content described by the second video clip is different from the content described by the first video clip, the first barrage set is associated with the first video clip, and the second barrage set is associated with the second video clip.
9. The method according to claim 1, characterized in that The method further comprises: In response to a closing operation on a barrage style attribute switching control, the barrage data in the second barrage set is displayed in the second video segment according to the first barrage style attributes.
10. The method according to claim 1, characterized in that The second barrage moving direction included in the second barrage style attribute is different from the first barrage moving direction included in the first barrage style attribute; The displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: If the moving direction of the second bullet screen is the reverse direction of the bullet screen, the bullet screen data in the second bullet screen set are displayed on L virtual tracks in the second video sub-segment in the reverse direction of the bullet screen; L is a positive integer; If the moving direction of the second barrage is the forward flow direction of the barrage, the barrage data in the second barrage set is displayed on the L virtual tracks in the second video sub-segment by moving in the forward flow direction of the barrage.
11. The method according to claim 1, characterized in that The displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: On L virtual tracks in the second video sub-segment, display x bullet comment data in the second bullet comment set according to the second bullet comment style attribute; x is a positive integer less than or equal to Q, Q is the number of bullet comments in the second bullet comment set, and L is a positive integer; If the time reaches the bullet screen update time, the track control component is called to update and display the x bullet screen data in the second bullet screen set according to the second bullet screen style attributes.
12. The method according to claim 11, characterized in that If the time reaches the bullet screen update time, the track control component is called to update and display the x bullet screen data in the second bullet screen set according to the second bullet screen style attribute, including: If the time reaches the bullet screen update time, the track control component is called to update the remaining display time of the x bullet screen data to obtain the updated remaining display time of the x bullet screen data; Call the bullet screen facade management component to remove from the L virtual tracks, and update the bullet screen data whose remaining display time is less than or equal to the time threshold among the x bullet screen data; Calling the track control component, and displaying valid barrage data among the x barrage data on the L virtual tracks according to the second barrage style attribute; the valid barrage data is barrage data among the x barrage data whose updated remaining display time is greater than the time threshold; The track control component is called to display the remaining barrage data on the L virtual tracks according to the second barrage style attributes; the remaining barrage data is the barrage data in the second barrage set except the x barrage data.
13. The method according to claim 12, characterized in that The moving direction of the barrage included in the first barrage style attribute is opposite to the moving direction of the barrage included in the second barrage style attribute; The calling of the track control component, updating the remaining display duration of the x bullet screen data, and obtaining the updated remaining display duration of the x bullet screen data, comprises: If the x bullet-screen data have been displayed in the first video segment according to the first bullet-screen style attribute, calling the track control component to determine the display duration of the x bullet-screen data in the first video segment as the remaining display duration of the x bullet-screen data; Obtaining the interval time from the start time of displaying the x bullet screen data in the second video segment to the bullet screen update time; The remaining display time of the x bullet screen data is subtracted from the interval time to obtain the remaining display time of the x bullet screen data.
14. The method according to claim 13, characterized in that The calling of the track control component to display the remaining bullet screen data on the L virtual tracks according to the second bullet screen style attribute includes: Calling the bullet screen distribution component to determine, from the L virtual tracks, a virtual track whose idleness is greater than an idleness threshold as a target virtual track; Calling the barrage distribution component to add the remaining barrage data that is not displayed and belongs to the second barrage set in the barrage queue to the target virtual track; The track control component is called to display the remaining barrage data on the target virtual track according to the second barrage style attribute.
15. The method according to claim 1, wherein: A first moving speed included in the first bullet-chat style attribute is different from a second moving speed included in the second bullet-chat style attribute; The displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: Calling the track control component to obtain the total display time of the barrage data in the second barrage set; the total display time is determined according to the first moving speed; Obtaining a speed ratio between the second moving speed and the first moving speed; Dividing the total display time by the speed ratio to obtain the limited display time of the x bullet screen data; According to the limited display time and the second moving speed, the barrage data in the second barrage set is displayed in the second video sub-segment.
16. The method according to claim 1, wherein: The first barrage arrangement direction included in the first barrage style attribute is the opposite direction of the second barrage arrangement direction included in the second barrage style attribute; The displaying the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attribute includes: Calling a bullet chat rendering component, updating an initial bullet chat rendering order according to the second bullet chat arrangement direction, and obtaining an updated bullet chat rendering order; the initial bullet chat rendering order is determined according to the first bullet chat arrangement direction; Rendering the barrage data in the second barrage set according to the updated barrage rendering order; In the second video sub-segment, the rendered bullet comment data is displayed.
17. The method according to claim 1, wherein: The method further comprises: In response to a configuration operation for a plot change moment, displaying a configuration interface; The plot change moment input in the configuration interface is obtained, and the target video data is divided according to the plot change moment to obtain the first video segment and the second video segment.
18. The method of claim 1, wherein: The method further comprises: Acquire a target bullet comment set in the target video data; the first bullet comment set and the second bullet comment set are subsets of the target bullet comment set; Performing text feature recognition on the barrage data in the target barrage set to obtain text features of the barrage data in the target barrage set; The target video data is divided according to text features of the barrage data in the target barrage set to obtain the first video segment and the second video segment.
19. The method according to claim 18, characterized in that The step of dividing the target video data according to the text features of the barrage data in the target barrage set to obtain the first video segment and the second video segment includes: Determine the text similarity between the text features of the barrage data in the target barrage set and the text features of the plot changes; Counting the number of bullet comments whose text similarity of the bullet comment data in the target bullet comment set is greater than a similarity threshold within S publishing times; the S publishing times are the publishing times of the bullet comment data in the target bullet comment set, and S is a positive integer; Filter out the moments when the number of corresponding bullet comments is greater than the number threshold from the S moments as the plot change moments; The target video data is divided according to the plot change moment to obtain the first video segment and the second video segment.
20. The method of claim 1, wherein: The method further comprises: Obtaining script data corresponding to the target video data; Extracting object description information and the appearance time of the object description information from the script data corresponding to the target video data; Determining a script scene information set associated with the target video data according to the appearance time of the object description information and the object description information; The target video data is divided according to the script scene information set to obtain the first video segment and the second video segment.
21. The method of claim 20, wherein: The step of dividing the target video data according to the script scene information set to obtain the first video segment and the second video segment includes: Traverse the script scene information i in the script scene information set and the untraversed video frames in the target video data frame by frame; i is less than or equal to F, and F is the number of script scene information in the script scene information set; If the matching degree between the traversed target video frame and the script scene information i is less than the matching degree threshold, the target video data is divided according to the playback time of the target video frame to obtain the first video segment and the second video segment.
22. A bullet screen display method, characterized in that: include: During playback of a first video sub-segment of target video data, displaying barrage data in a first barrage set in the first video sub-segment according to a first barrage style attribute; the first video sub-segment belongs to the first video segment in the target video data; If the first video sub-segment is played, the second video sub-segment in the first video segment is played, and the barrage data in the first barrage set is displayed in the second video sub-segment according to the transition barrage style attribute; If the second video sub-segment is played, the second video segment in the target video data is played, and the barrage data in the second barrage set is displayed in the second video segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different; the plot of the first video segment is different from the plot of the second video segment.
23. A bullet screen display method, characterized in that: include: During playback of a first video segment of target video data, displaying barrage data in a first barrage set in the first video segment according to a first barrage style attribute; If the playback of the first video clip is completed, the second video clip in the target video data is played, and the barrage data in the second barrage set is displayed in the second video clip according to the second barrage style attributes; the plot of the first video clip is different from the plot of the second video clip; the first barrage style attributes and the second barrage style attributes are different.
24. A bullet screen display device, characterized in that: include: A first display module is used to display the barrage data in the first barrage set in the first video segment according to the first barrage style attribute during the playback of the first video segment of the target video data; A second display module is used for playing a first video sub-segment of a second video segment in the target video data if the first video segment is played, and switching to displaying the barrage data in the second barrage set in the first video sub-segment according to the transition barrage style attribute; the plot of the first video segment is different from the plot of the second video segment; The third display module is used to play the second video sub-segment in the second video segment if the first video sub-segment is played, and switch to display the barrage data in the second barrage set in the second video sub-segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different.
25. A bullet screen display device, characterized in that: include: A first display module is used to display the barrage data in the first barrage set in the first video sub-segment according to the first barrage style attribute during the playback of the first video sub-segment of the target video data; the first video sub-segment belongs to the first video segment in the target video data; A second display module is used for playing a second video sub-segment in the first video segment after the first video sub-segment is played, and switching to displaying the barrage data in the first barrage set in the second video sub-segment according to the transition barrage style attribute; The third display module is used to play the second video segment in the target video data if the playback of the second video sub-segment is completed, and switch to display the barrage data in the second barrage set in the second video segment according to the second barrage style attributes; the first barrage style attributes, the transition barrage style attributes and the second barrage style attributes are different; the plot of the first video segment is different from the plot of the second video segment.
Citation Information
Patent Citations
Bullet screen adjusting method and device, electronic device and storage medium
CN110958493A
Bullet screen display method and device, electronic equipment and storage medium
CN111277910A
Target bullet screen display method and device, electronic equipment and storage medium
CN113542843A
Bullet screen display method and device, equipment, medium and program product
CN116017016A