Data processing method and device, computer equipment and storage medium
By obtaining and laying out barrage content information, animation files and configuration files, the problem of frequent interaction between the design side and the development side in traditional barrage layout solutions is solved, and efficient barrage layout and diversified effect display is achieved, reducing R&D costs And improves the fun of the barrage.
Patent Information
- Application Number
- CN202310799839.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
Traditional barrage layout solutions are difficult to achieve diverse barrage effects and visual expressions through plain text, resulting in frequent interaction between the design and development sides, increasing R&D costs and reducing efficiency.
By obtaining barrage content information and corresponding initial animation files and configuration files, the layers in the animation file are laid out based on track height and configuration information, and an animation file for display is generated to reduce the interaction between the design side and the development side.
It reduces R&D costs, improves the efficiency of barrage layout, supports diversified barrage effect display, and increases the fun and playability of barrage.
Smart Images

Figure CN119233001A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer equipment and storage medium. Background Art
[0002] The traditional barrage layout solution is that the target terminal device displays the barrage through local plain text, text stroke and color. However, it is difficult to achieve more diverse barrage effects and visual performances through plain text. Therefore, for a new barrage style, the design side produces a design draft, and the technical side develops a special barrage type. If the designed barrage effect is to be perfectly restored on the target terminal device, the design side and the development side need to communicate multiple times and adjust the implementation plan and parameters until the desired effect is achieved. This not only leads to high R&D costs, but also seriously affects the efficiency of barrage layout. Summary of the invention
[0003] The embodiments of the present application provide a data processing method, apparatus, computer equipment and storage medium, which can reduce research and development costs and improve the efficiency of bullet screen layout.
[0004] An embodiment of the present application provides a data processing method, including:
[0005] Get the content information of the first bullet screen;
[0006] Based on the bullet chat style of the first bullet chat, an initial animation file corresponding to the first bullet chat and a configuration file corresponding to the first bullet chat are obtained respectively; the initial animation file includes N layers; the configuration file corresponding to the first bullet chat includes configuration information corresponding to each of the N layers; N is a positive integer;
[0007] Based on the bullet content information, the track height of the first bullet and the configuration information corresponding to each layer, each layer in the initial animation file is laid out respectively to obtain a first animation file; the first animation file is used to display the first bullet.
[0008] An embodiment of the present application provides a data processing device, including:
[0009] A content acquisition module, used to acquire the content information of the first bullet screen;
[0010] A file acquisition module, used for acquiring an initial animation file corresponding to the first barrage and a configuration file corresponding to the first barrage respectively based on the barrage style of the first barrage; the initial animation file includes N layers; the configuration file corresponding to the first barrage includes configuration information corresponding to each of the N layers; N is a positive integer;
[0011] The layout module is used to layout each layer in the animation file based on the barrage content information, the track height of the first barrage and the configuration information corresponding to each layer to obtain a first animation file; the first animation file is used to display the first barrage.
[0012] Among them, the barrage content information is synchronized by the server when it receives a barrage sending request sent by the business terminal device; the server stores M animation files sent by the operation terminal device and configuration files corresponding to the M animation files; M is a positive integer; the initial animation file is an animation file determined by the server from the M animation files that matches the barrage style of the first barrage; the configuration file corresponding to the first barrage is a configuration file determined by the server from the M configuration files that matches the barrage style of the first barrage.
[0013] Among them, the barrage style of the first barrage is determined by the barrage sending object when sending the barrage content information; or the barrage style of the first barrage is set by the operating object for the multimedia data corresponding to the first barrage.
[0014] The device is run on a target terminal device; the first bullet screen is displayed for multimedia data played by the target terminal device;
[0015] The layout module includes:
[0016] A track height determination unit, configured to determine a track height of the first bullet screen based on font size information in bullet screen setting information of multimedia data;
[0017] A first layer determining unit, configured to determine a first layer from an initial animation file based on the bullet content information and a configuration file corresponding to the first bullet; the N configuration information includes configuration information corresponding to the first layer;
[0018] A second layer determination unit, configured to configure the size attribute of the first layer based on the configuration information corresponding to the first layer, to obtain the second layer; the N configuration information includes a layer type of the second layer;
[0019] The displacement unit is used to determine the second layer whose layer type belongs to the composite layer type as the layer to be laid out when N second layers are obtained, and to perform a displacement operation on the layer to be laid out to obtain the first animation file.
[0020] The configuration file corresponding to the first bullet comment also includes data configuration information; the data configuration information includes a key text layer; the key text layer is used to specify a text layer that can carry text content;
[0021] The first layer determining unit includes:
[0022] A first determination subunit is used to determine a target animation file based on the barrage content information and the initial animation file if the barrage content information includes barrage text content, and determine (N-1) layers in the target animation file except the current key text layer as the first layer respectively;
[0023] The second determination subunit is used to determine the target animation file based on the barrage content information and the initial animation file if the barrage content information does not include barrage text content, and determine the N layers in the target animation file as the first layers respectively.
[0024] Wherein, when the bullet-screen content information includes bullet-screen text content, the N second layers include shifted key text layers;
[0025] The first layer determination unit also includes:
[0026] The text setting subunit is used to set the barrage text content according to the font size information and the text style in the barrage content information if the barrage content information includes the barrage text content;
[0027] The text replacement subunit is used to replace the initial text content in the key text layer with the set bullet text content;
[0028] The key layer displacement subunit is used to displace the replaced key text layer based on the track height of the first bullet screen to obtain a displaced key text layer; the displaced key text layer is located at the center of the track corresponding to the first bullet screen.
[0029] The configuration information corresponding to the first layer includes the layer index relationship of the first layer and the layer type of the first layer;
[0030] The second layer determination unit includes:
[0031] A scaling subunit, used for scaling the first layer based on the layer index relationship of the first layer to obtain the scaled first layer;
[0032] The width acquisition subunit is used to acquire the width of the scaled first layer based on the layer type of the first layer;
[0033] The size setting subunit is used to set the size attribute of the scaled first layer based on the layer type of the first layer and the width of the scaled first layer to obtain the second layer.
[0034] The scaling subunit is further specifically used for:
[0035] If the layer index relationship of the first layer does not include the parent index relationship of the first layer, scaling the first layer based on the track height of the first bullet chat to obtain the scaled first layer;
[0036] If the layer index relationship of the first layer includes the parent index relationship of the first layer, the parent layer of the first layer is determined based on the parent index relationship, and the first layer is scaled based on the layer height of the parent layer of the first layer to obtain the scaled first layer.
[0037] The width acquisition subunit further includes:
[0038] A first acquisition subunit, configured to acquire the width of the scaled first layer based on a layer interface if the layer type of the first layer is a non-composite layer type;
[0039] The second acquisition subunit is used to acquire the width of the scaled first layer based on the layout mode of the first layer and the layer index relationship of the first layer if the layer type of the first layer is a composite layer type.
[0040] The second acquisition subunit is further specifically used for:
[0041] If the layer type of the first layer is a composite layer type, and the layout mode of the first layer is horizontal linear arrangement, then based on the sub-index relationship in the layer index relationship of the first layer, the sub-layers of the scaled first layer are determined, and the sum of the current widths of the sub-layers of the scaled first layer is determined as the width of the scaled first layer;
[0042] If the layer type of the first layer is a composite layer type, and the layout mode of the first layer is a vertical linear arrangement, then based on the sub-index relationship in the layer index relationship of the first layer, the sub-layers of the scaled first layer are determined, and the maximum current width of the sub-layers of the scaled first layer is determined as the width of the scaled first layer;
[0043] If the layer type of the first layer is a composite layer type and the layout of the first layer is an overlay hierarchical arrangement, the size-specified layer is determined from the configuration information of the first layer, and the current width of the size-specified layer is determined as the width of the scaled first layer; the sub-index relationship in the layer index relationship of the first layer indicates that the sub-layers of the first layer include the size-specified layer.
[0044] Wherein, the displacement unit comprises:
[0045] The layer determination subunit is used to determine the second layer whose layer type belongs to the composite layer type as the layer to be laid out when the N second layers are obtained; the N configuration information includes the configuration information of the layer to be laid out; the configuration information of the layer to be laid out includes the layout mode of the layer to be laid out, the index value of the layer to be laid out and the layer index relationship of the layer to be laid out; the layer index relationship of the layer to be laid out includes the sub-index relationship of the layer to be laid out;
[0046] The first displacement subunit is used for obtaining the sublayers of the layer to be laid out based on the sub-index relationship of the layer to be laid out if the layout mode of the layer to be laid out is horizontal linear arrangement, and performing a horizontal displacement operation on each sublayer in turn according to the index value of the sublayer of the layer to be laid out;
[0047] The second displacement subunit is used for obtaining the sublayers of the layer to be laid out based on the sub-index relationship of the layer to be laid out if the layout mode of the layer to be laid out is vertical linear arrangement, and performing vertical displacement operation on each sublayer in turn according to the index value of the sublayer of the layer to be laid out;
[0048] The third displacement sub-unit is used to obtain the sub-layers of the layer to be laid out based on the sub-index relationship of the layer to be laid out if the layout mode of the layer to be laid out is a superimposed hierarchical arrangement, and to perform horizontal displacement operations on each sub-layer in turn according to the index value of the sub-layer of the layer to be laid out and the alignment mode of each sub-layer.
[0049] The configuration file corresponding to the first bullet chat also includes response rules corresponding to H layers respectively; H is a positive integer less than or equal to N;
[0050] The device also includes:
[0051] The bullet screen display module is used to display X bullet screens on the terminal interface playing multimedia data; the X bullet screens include the first bullet screen; X is a positive integer;
[0052] A coordinate determination module, used to respond to a trigger operation on a terminal interface and determine a trigger coordinate corresponding to the trigger operation; the trigger coordinate is used to determine a second bullet screen from the X bullet screens; the second bullet screen is the bullet screen corresponding to the trigger operation;
[0053] A layer determination module, for obtaining a target layer for responding to a trigger operation in the first bullet screen based on H layers if the second bullet screen is the first bullet screen;
[0054] The operation execution module is used to obtain the target response rule that matches the target layer from the H response rules and execute the business operation corresponding to the target response rule.
[0055] Among them, the layer determination module includes:
[0056] A coordinate conversion unit, for converting the trigger coordinates into relative coordinates for the first bullet screen if the bullet screen corresponding to the trigger operation is the first bullet screen;
[0057] An array determination unit, used to obtain the layer covered by the relative coordinates from the first bullet message, and determine the obtained layer as the layer array corresponding to the trigger operation;
[0058] The traversal unit is used to traverse the layer array based on H layers until the first layer that can respond to the trigger operation is found, and the found layer is determined as the target layer for responding to the trigger operation.
[0059] The device further comprises:
[0060] A search module, used for searching for a replacement layer if the target response rule includes a replacement layer;
[0061] A replacement module, used for replacing the target layer in the first bullet screen with the replacement layer in the first animation file to obtain the replaced first animation file;
[0062] The re-layout module is used to re-layout each layer in the replaced first animation file to obtain a second animation file; the second animation file is used to display the response barrage corresponding to the first barrage after refreshing the barrage player.
[0063] On one hand, the present application provides a computer device, including: a processor, a memory, and a network interface;
[0064] The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method provided in the embodiment of the present application.
[0065] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.
[0066] On the one hand, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium; a processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method in the embodiment of the present application.
[0067] In an embodiment of the present application, when the target terminal device obtains the bullet content information of a certain bullet (i.e., the first bullet), it is necessary to obtain the initial animation file corresponding to the first bullet and the configuration file corresponding to the first bullet based on the bullet style of the first bullet. Among them, the initial animation file here may include N layers, and the configuration file corresponding to the first bullet may include the configuration information corresponding to each of the N layers, where N is a positive integer. Then, the target terminal device can directly layout each layer in the initial animation file based on the bullet content information, the track height of the first bullet, and the configuration information corresponding to each layer, so as to quickly obtain the first animation file for displaying the first bullet. It can be seen that the bullet layout method provided in the embodiment of the present application does not require frequent interaction between the design side and the development side of the initial animation file, thereby greatly reducing time consumption, reducing R&D costs, and improving bullet layout efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] 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.
[0069] Figure 1 It is a structural diagram of a network architecture provided by an embodiment of the present application;
[0070] Figure 2 This is a schematic diagram of a scenario for performing bullet screen layout provided in an embodiment of the present application;
[0071] Figure 3 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0072] Figure 4 It is a schematic diagram of a bullet screen effect displayed by an initial animation file provided in an embodiment of the present application;
[0073] Figure 5 It is a schematic diagram of an abstract model described by a configuration file provided in an embodiment of the present application;
[0074] Figure 6 It is a schematic diagram of a scene for laying out an initial animation file based on a configuration file provided in an embodiment of the present application;
[0075] Figure 7 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0076] Figure 8This is a schematic diagram of a scenario in which a relevant area is clicked to respond to a bullet screen, provided in an embodiment of the present application;
[0077] Fig. 9 It is a flowchart of a bullet screen response and layer replacement provided by an embodiment of the present application;
[0078] Fig.10 This is a schematic diagram of a scenario in which a relevant area is clicked to respond to a bullet screen, provided in an embodiment of the present application;
[0079] Fig.11 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0080] Fig.12 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0081] Fig.13 It is a schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0082] 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.
[0083] See also Figure 1 , Figure 1 Schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 As shown, the network architecture may include a server 10F and a terminal device cluster. The terminal device cluster may include one or more terminal devices, and the number of terminal devices is not limited here. Figure 1 As shown, the terminal device cluster may specifically include terminal device 100a, terminal device 100b, terminal device 100c, ..., terminal device 100n. Figure 1 As shown, the terminal device 100a, the terminal device 100b, the terminal device 100c, ..., the terminal device 100n can be respectively connected to the server 10F through a network, so that each terminal device can exchange data with the server 10F through the network connection. The network connection here does not limit the connection method, and can be directly or indirectly connected through a wired communication method, directly or indirectly connected through a wireless communication method, or through other methods, which are not limited in this application.
[0084] Each terminal device in the terminal device cluster may include: smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, car terminals, smart TVs and other smart terminals with bullet screen layout functions. Figure 1 Each terminal device in the terminal device cluster shown in FIG. 1 may be installed with a service application (i.e., an application client). When the application client runs in each terminal device, it may be respectively connected to the above-mentioned Figure 1 Data is exchanged between the servers 10F shown. The application client may include a social client, a multimedia client (e.g., a video client), an entertainment client (e.g., a game client), an information stream client, an education client, a live broadcast client, and other application clients. The application client may be an independent client or an embedded sub-client integrated in a client (e.g., a social client, an education client, and a multimedia client, etc.), which is not limited here.
[0085] like Figure 1 As shown, the server 10F in the embodiment of the present application can be the server corresponding to the application client. The server 10F can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Among them, the embodiment of the present application will not limit the number of servers.
[0086] For ease of understanding, the embodiments of the present application can be Figure 1 Select one terminal device from the multiple terminal devices shown as the target terminal device. Figure 1 The terminal device 100a shown is used as a target terminal device, and a service application (eg, a video client) may be integrated into the target terminal device. At this time, the target terminal device can implement data interaction with the server 10F through the service data platform corresponding to the application client.
[0087] Among them, the embodiment of the present application introduces a workflow (e.g., PAG) that is designed, configured, and put online through AE (Adobe After Effects, a graphics and video processing software). PAG (Portable Animated Graphics) is a complete set of motion effect (animation effect) workflow solutions. Since it has the ability to control the position and size of layers and replace text / pictures, it can be used to create bullet screens. The goal is to reduce or eliminate the R&D costs related to motion effects. It can export the motion effect content created by the design object (e.g., designer) in AE software with one click, obtain animation files, and quickly put them online for application on most mainstream platforms.
[0088] It is understandable that single layers (PAGLayer), composite layers (PAGComposition) and animation files (PagFile) are all important concepts in PAG animation. PAGLayer corresponds to the layer in AE, which can describe a single motion effect element, such as text, pictures, video frames, etc. PAGComposition corresponds to the composition in AE, and is a container that contains multiple PAGLayer. PAGFile, as a special PAGComposition type, is the outermost container of the entire rendering tree in the exported PAG file. At the same time, PAGFile can also be added as a node to other rendering trees to achieve component reuse and decoupling between businesses. By configuring and combining PAGLayer and PAGComposition, the design object can quickly and efficiently produce various types of animation effects.
[0089] In PAG animation, each layer has its corresponding two-dimensional properties, including coordinates (position), scale (scale), rotation (rotate), size (size), etc. The setting of these properties is crucial to the presentation and smoothness of the animation effect. At the same time, PAGLayer exposes the corresponding interface, which can easily set the two-dimensional properties of each layer to achieve the desired effect. It should be noted that these two-dimensional properties all depend on the position of the anchor point. For example, when a layer is scaled, the layer is scaled for the anchor point. However, due to design reasons in PAG, the anchor point of PAGLayer cannot be set dynamically, and because the two-dimensional properties of PAGLayer are strongly dependent on the anchor point, if the anchor point properties are not set properly, it will cause a certain deviation in the position, scale, rotation and other properties of the layer. In order to avoid this situation, the design object needs to set the anchor point of each layer to a vertex of the parent layer of the layer (for example, the upper left corner) when designing the barrage.
[0090] Based on the above theory and actual application scenarios of bullet screens, we can analyze and summarize the following layout rules for multi-column bullet screens: except for the layers of the upper and lower layouts, the height of all layers is as large as possible, and the height of the outermost synthesis depends on the track height in the business. In addition, the aspect ratio of the layer should remain unchanged during layout, and the layer can be scaled by geometric scaling. The bottom layer layout should be a specific layer, not a synthesis.
[0091] For example, for a new type of barrage style, the designer can create dynamic effects for the barrage style in the AE software running on the design terminal device. Except for the layer that replaces the text, which will limit the use of special effects, the other layers can use various special effects, thereby realizing the diversification of the barrage effect display.
[0092] When designing an object using AE, the following preprocessing is also required, which may include property reset processing, layer replacement processing, layer pre-synthesis processing, and export optimization processing. Among them, the property reset processing here refers to resetting the coordinate position of the anchor point of all layers that need to be laid out, for example, setting the coordinate position of the anchor point to (0, 0), so that when the configuration file is subsequently laid out (for example, displacement, scaling, etc.), the normal position of the layer can be obtained more accurately. The layer replacement processing here refers to setting the layer that does not need to replace the content as a video frame layer, so as to improve the performance of the barrage playback and the stability of the layer in the future. The layer pre-synthesis processing here refers to the need to pre-synthesize layers with different business states (ie, AB states, for example, like state and unlike state), that is, wrapping two layers with different business states with one layer, so as to better handle and manage the state of the layer. The export optimization processing here refers to optimizing the animation file to be exported based on the file export conditions associated with the size and number of layers. Among them, the file export conditions here may include the maximum pixel threshold of layer height (for example, 60 pixels), the maximum pixel threshold of layer width (for example, 600 pixels), and the maximum layer quantity threshold of video frame layer type (for example, 5), so as to effectively ensure the performance of the final exported PAG animation file and effectively avoid the subsequent occurrence of barrage playback freezes.
[0093] After the design is completed, the design terminal device can export it through PAG's AE plug-in (i.e., material export plug-in, such as PAGExporter) to obtain an animation file that matches the style of the bullet screen. The animation file can be a file with PAG as the suffix (e.g., PAG file), and the animation file can be previewed through a desktop preview tool (e.g., PAGViewer). However, when PAG is exported from AE to a .pag file, the length, width and position of all files are fixed, and there is no "relative layout" function in PAG (such as allowing a certain number of layers to be laid out closely from left to right). The length of the text of the bullet screen will be modified depending on the content of the bullet screen, that is, the bullet screen is a scenario where the width of the text layer needs to be modified, and other layers are strongly dependent on the width of the bullet screen layer. The existing functions of PAG cannot meet this scenario. For example, in a common left-middle-right layout, when the number of middle text decreases, there will be a gap between the middle text and the right button, so secondary development is required to implement the "relative layout" function.
[0094] In order to allow the design object to freely select the layout mode and parameters in the PAG animation file, thereby realizing the free design and adjustment of the bullet screen style and layout, the design terminal device can send the animation file to the operation terminal device corresponding to the operation object (for example, terminal device 100b). Since the YAML format is a readable data serialization language, it is usually used to write configuration files, which can simply express data forms such as lists, hash tables, and scalars. Therefore, the operation object can use the YAML format to write a configuration file for the received animation file, which is mainly used to express the relative relationship between each layer. The configuration file can be modified and operated with any text editor.
[0095] When the editing is completed, the operation terminal device can send the animation file and the configuration file to Figure 1 The server 10F shown is used to store the animation file corresponding to the bullet screen style and the configuration file corresponding to the bullet screen style. It can be understood that the server 10F can store M animation files sent by the operating terminal device and the configuration files corresponding to the M animation files, where M is a positive integer.
[0096] For the sake of distinction, the embodiment of the present application may refer to a certain bullet screen to be displayed that is obtained by the target terminal device as the first bullet screen. When the target terminal device obtains the bullet screen content information of the first bullet screen, it may obtain the animation file (i.e., the initial animation file) corresponding to the first bullet screen and the configuration file corresponding to the first bullet screen respectively based on the bullet screen style of the first bullet screen. Among them, the bullet screen content information here may be various information determined by the bullet screen sending object (for example, a user watching a certain multimedia data) in the playback interface displayed by the multimedia data, and may specifically include the object identifier of the bullet screen sending object (for example, an account in the video client), text style (for example, text color, text font, etc.), bullet screen display position (for example, top of the interface, bottom of the interface, etc.), bullet screen text content, and one or more of the bullet screen style.
[0097] It is understandable that the initial animation file corresponding to the first bullet screen acquired by the target terminal device may include N layers, and the configuration file corresponding to the first bullet screen may include the configuration information corresponding to each layer in the N images. Among them, the configuration information of a layer may include the layer name of the layer, the layer type of the layer (for example, picture layer type, synthetic layer type, video frame layer type, text layer type, etc.), the layer index value of the layer, the layer index relationship of the layer (for example, parent index relationship and child index relationship, etc.), and the alignment of the layer to its parent layer (for example, left alignment, center alignment, and right alignment, etc.). When the layer type of the layer belongs to the synthetic layer type, the configuration information of the layer may also include the layout mode of the layer (for example, horizontal linear arrangement, vertical linear arrangement, superimposed hierarchical arrangement, etc.), the size of the layer, etc. The layer specifies the layer. Of course, in order to realize the functions of triggering response and dynamically replacing layers in different areas, the configuration information of the layer may also include the response rules corresponding to the layer to improve the interactivity and user experience of the bullet screen.
[0098] Then, the target terminal device can layout each layer in the initial animation file based on the barrage content information, the track height of the first barrage, and the configuration information corresponding to each layer to obtain the laid out initial animation file (i.e., the first animation file), wherein the first animation file can be used to display the first barrage.
[0099] It can be seen that the embodiment of the present application proposes a PAG-type barrage with a multi-column layout. By supporting the use of PAG layers and the setting of configuration files based on the YAML format, a highly customizable and diversified barrage effect display can be achieved. At the same time, in the barrage layout process, there is no need for frequent interaction between the design side and the development side of the initial animation file, which can greatly reduce the time consumption, reduce R&D costs, and improve the efficiency of barrage layout. In addition, the embodiment of the present application can also support the trigger response and dynamic replacement of layers in different areas, thereby increasing the fun and playability of the barrage.
[0100] For further understanding, please refer to Figure 2 , Figure 2 Schematic diagram of a scenario for performing bullet screen layout provided by an embodiment of the present application. Figure 2 As shown, the terminal device 200Z in the embodiment of the present application may be a target terminal device with a bullet screen layout function, and the target terminal device may be the above Figure 1 Any terminal device in the terminal device cluster, for example, terminal device 100a.
[0101] Among them, the server 200F corresponding to the terminal device 200Z (for example, the above Figure 1The server 10F shown in the figure can store M animation files sent by the operating terminal device, and configuration files corresponding to the M animation files, where M is a positive integer; one bullet screen style corresponds to one animation file, and one bullet screen style corresponds to one configuration file, and the configuration file here can be mainly used to express the relative relationship between the layers in the corresponding animation file. For the sake of convenience, the number of types of bullet screen styles in the embodiment of the present application can be 6 as an example, which can specifically include the first bullet screen style, the second bullet screen style, the third bullet screen style, the fourth bullet screen style, the fifth bullet screen style and the sixth bullet screen style.
[0102] like Figure 2 As shown, animation file 20D1 and configuration file 20P1 both match the first barrage style (e.g., flame barrage style); animation file 20D2 and configuration file 20P2 both match the second barrage style (e.g., lightning barrage style); animation file 20D3 and configuration file 20P3 both match the third barrage style (e.g., light board barrage style); animation file 20D4 and configuration file 20P4 both match the fourth barrage style (e.g., no text barrage style); animation file 20D5 and configuration file 20P5 both match the fifth barrage style (e.g., pure text barrage style); animation file 20D6 and configuration file 20P6 both match the sixth barrage style (e.g., regular barrage style).
[0103] Among them, the barrage sending object in the embodiment of the present application can be a target object that watches multimedia data on the target terminal device, or it can be another object (for example, a business object) that watches the same multimedia data as the target object. The barrage sending object will not be limited here. For ease of understanding, the object 2y in the embodiment of the present application can be used as an example of the target object corresponding to the terminal device 200Z to illustrate the layout process of the barrage 2v. For example, when the object 2y wants to send a barrage for the multimedia data played on the terminal interface 2J1 of the terminal device 200Z, it can be on a barrage publishing interface independent of the terminal interface 2J1 (for example, interface 2J 10 ), after determining the bullet content information of the bullet 2V to be displayed (for example, the bullet text content, text font, text color, avatar data of the bullet sending object, etc.), the bullet sending operation is performed so that the terminal device 200Z obtains the bullet content information determined by the object 2y. Among them, the interface 2J 10 It is an interface superimposed on the terminal interface 2J1, and the interface 2J 10 The size of the barrage sending operation here may include contact triggering operations such as clicking and long pressing, and may also include non-contact operations such as voice and gestures, which will not be limited here. For example, the barrage sending operation here can be object 2y for the barrage sending control (for example, Figure 2 The Send control shown in the figure) performs the triggering action.
[0104] Then, the terminal device 200Z can send the barrage content information to the server 200F, so that the server 200F determines the barrage style (for example, the flame barrage style) of the barrage 2V to be displayed based on the barrage content information. Then, the server 200F can Figure 2 Among the 6 animation files shown, determine the animation file 20D1 (i.e., the initial animation file) that matches the bullet screen style of the bullet screen 2V to be displayed, and Figure 2 Among the six configuration files shown, the configuration file 20P1 matching the barrage style of the barrage 2V to be displayed is determined, and the animation file 20D1 and the configuration file 20P1 are returned to the terminal device 200Z. The animation file 20D1 here may include N layers, and the configuration file 20P1 may include configuration information corresponding to each of the N layers; N is a positive integer.
[0105] At this time, the terminal device 200Z can layout each layer in the animation file 20D1 based on the bullet content information determined by the object 2y, the track height of the bullet 2V to be displayed, and the configuration information corresponding to each layer in the configuration file 20P1, so as to obtain the layout animation file 20D1 (i.e., the first animation file). Among them, the layout animation file 20D1 can be used to display on the terminal interface 2J2 of the terminal device 200Z. Figure 2 The barrage 2V shown.
[0106] It can be seen that in the process of barrage layout, the embodiment of the present application can directly customize the layout of each layer in the animation file 20D1 according to the barrage content information and the configuration file 20P1, without the need for frequent interaction between the design side and the development side of the animation file 20D1, thereby greatly reducing time consumption, reducing R&D costs, and improving barrage layout efficiency.
[0107] It should be noted that Figure 2 The interfaces and controls shown are only some forms of expression for reference. In actual business scenarios, developers can make relevant designs according to product requirements. The embodiments of the present application do not limit the specific forms of the interfaces and controls involved.
[0108] Among them, the initial animation file matching the barrage style is exported by the design terminal device corresponding to the design object through a video processing plug-in (for example, an AE plug-in), which can be used to display the initial barrage effect. The target terminal device quickly performs a secondary layout of the initial animation file based on the barrage content information of the barrage to be displayed and the configuration file matching the barrage style obtained to display the final barrage effect. For the specific implementation method, please refer to the following Figure 3-Figure 10 The corresponding embodiment.
[0109] For further information, see Figure 3 , Figure 3 is a flow chart of a data processing method provided in an embodiment of the present application. Figure 3 As shown, the method can be executed by a target terminal device having a bullet screen layout function, and the target terminal device can be the above Figure 1 Any terminal device in the terminal device cluster shown, for example, terminal device 100a. The method may at least include the following steps S101-S103:
[0110] Step S101, obtaining the bullet screen content information of the first bullet screen.
[0111] Among them, the barrage content information obtained by the target terminal device can be determined by the target object for the multimedia data played on the terminal interface of the target terminal device, or it can be synchronized by the server when receiving the barrage sending request sent by the service terminal device. The method of obtaining the barrage content information will not be limited here. In other words, the barrage sending object of the barrage content information can be the target object watching the multimedia data on the target terminal device, or it can be another object (for example, a service object) watching the same multimedia data as the target object.
[0112] Among them, when the target object of the barrage is the target object, the method for the target terminal device to obtain the barrage content information can refer to the above Figure 2 The method in which the terminal device 200Z obtains the barrage content information will not be further described here.
[0113] Optionally, when the bullet screen sending object is a business object that is watching the same multimedia data as the target object, the business object can Figure 1On the terminal device 100c shown in the figure, the barrage content information of the barrage to be displayed for the multimedia data is determined. After the determination is completed, the service terminal device can generate a barrage sending request based on the barrage content information, and send the barrage sending request to the server, so that when the server receives the barrage sending request, it can obtain the barrage content information carried by the barrage sending request, and then synchronize the barrage content information to other terminal devices (for example, target terminal devices) watching the multimedia data.
[0114] Step S102, based on the bullet screen style of the first bullet screen, respectively obtain an initial animation file corresponding to the first bullet screen and a configuration file corresponding to the first bullet screen.
[0115] Among them, the server corresponding to the target terminal device can store M animation files sent by the operating terminal device and configuration files corresponding to the M animation files respectively; M is a positive integer. The initial animation file here is an animation file that the server determines from the M animation files to match the barrage style of the first barrage; the configuration file corresponding to the first barrage is a configuration file that the server determines from the M configuration files to match the barrage style of the first barrage. The initial animation file here includes N layers; the configuration file corresponding to the first barrage can include configuration information corresponding to each of the N layers; N is a positive integer.
[0116] It should be understood that when the server receives the first bullet screen content information determined by the bullet screen sending object, it can determine the bullet screen style of the first bullet screen based on the bullet screen content information of the first bullet screen. For example, if the bullet screen content information received by the server includes the bullet screen sending object from the bullet screen publishing interface (for example, Figure 2 The interface shown in 2J 10 ), the server can determine the barrage style included in the barrage content information as the barrage style of the first barrage. Among them, the barrage publishing interface can block part of the content in the terminal interface that plays the multimedia data. Optionally, if the barrage content information received by the server does not include the barrage style, the server can determine the barrage style set by the operation object for the multimedia data (for example, the default flame barrage style) as the barrage style of the first barrage. In other words, the barrage style of the first barrage here can be determined by the barrage sending object, or it can be set by the operation object for the multimedia data corresponding to the first barrage, and it will not be limited here.
[0117] Then, the server can determine the animation file that matches the barrage style of the first barrage (i.e., the initial animation file corresponding to the first barrage) from the M animation files stored in itself, and determine the configuration file that matches the barrage style of the first barrage (i.e., the configuration file corresponding to the first barrage) from the M configuration files, and then return the initial animation file and the configuration file corresponding to the first barrage to the target terminal device together.
[0118] For further understanding, please refer to Figure 4 , Figure 4 Schematic diagram of the bullet screen effect displayed by an initial animation file provided in an embodiment of the present application. Figure 4 As shown, the animation file 40D is an initial animation file obtained by the target terminal device and matches the bullet screen style of the first bullet screen (for example, the flame bullet screen style). The animation file 40D can be used to display a common multi-column layout bullet screen.
[0119] like Figure 4 As shown, the number of layers in the animation file 40D may be 6, for example, and may specifically include 4 single layers (eg, left layer 4L1, background layer 4L2, and left layer 4L3). 21 , Text layer 4L 22 , right layer 4L3) and two composite layers. The two composite layers may include an intermediate composite layer and a root layer (also known as the outermost composite layer). The intermediate composite layer is composed of the background layer 4L 21 and text layer 4L 22 Composited; the root layer is composited by the left layer 4L1, the middle composite layer and the right layer 4L3.
[0120] in, Figure 4 The rendering tree shown is derived from the animation file 40D, and the rendering tree can clearly show the hierarchical relationship between the layers. For example, the sublayers of the root layer include the left layer 4L1, the middle composite layer, and the right layer 4L3. The sublayers of the middle composite layer include the background layer 4L 21 and text layer 4L 22 These two layers. In other words, the background layer 4L 21 and text layer 4L 22 The parent layers of the left layer 4L1, the middle composite layer, and the right layer 4L3 are all root layers.
[0121] It is understandable that the configuration file generated for the animation file is not a code, but a file that stores program settings and parameters. Unlike code, it does not contain specific control logic and calculation operations. In short, the configuration file is like a guidebook, providing guidance and rules for the program to follow, while the code is a tool to implement these guidance and rules.
[0122] For ease of understanding, further, please refer to Table 1, which is a schematic table of the contents of a configuration file provided in an embodiment of the present application. The configuration file shown in Table 1 can be for the above Figure 4 The configuration file generated by the corresponding animation file 40D may include configuration information corresponding to each layer in the animation file 40D. Specifically, as shown in Table 1:
[0123] Table 1
[0124]
[0125]
[0126] Among them, the 1st to 4th lines shown in Table 1 can be used to represent data configuration information (for example, Data), which is mainly used to define all the properties of the barrage, among which the main TextLayer property determines which text layer in this barrage needs to be used to carry the text content of the barrage. The embodiment of the present application can call the text layer used to specify that can carry text content a key text layer.
[0127] The 5th to 37th lines shown in Table 1 can be used to represent multi-column layer configuration information (e.g., MultiPag), which is mainly used to represent the hierarchical relationship and layout type between different layers. Figure 4 , lines 6 to 11 can be used to represent the configuration information of the root layer; lines 12 to 16 can be used to represent the configuration information of the left layer 4L1; lines 17 to 23 can be used to represent the configuration information of the middle composite layer; lines 24 to 28 can be used to represent the configuration information of the text layer 4L 22 Configuration information; lines 29 to 33 can be used to represent the background layer 4L 21 Configuration information; lines 34 to 37 can be used to indicate Figure 4 The configuration information of the right layer 4L3 is shown.
[0128] It can be understood that the layer attributes in Table 1 may specifically include a layer name (name), a layer type (type), a layout mode (layout), an index value (index), a size specifying layer (sizingLayerName), and an alignment mode (align).
[0129] Among them, the layer name refers to the name of the layer, which corresponds to the name of a single layer or composite layer in AE, and is mainly used to obtain the specified sublayer from the root layer.
[0130] There are four main types of layer types: composition, imageLayer, textLayer, and bmp. The composition layer type here means that the layer is a composition layer, and the layer can include at least two sublayers. The image layer type means that the image in the layer is replaceable; the text layer type means that the text content in the layer is replaceable; the video frame layer type means that the content in the layer is not replaceable.
[0131] The layout mode is mainly used to indicate the layout mode of the internal sublayers of the composite layer type layer, including horizontal linear arrangement (linearHorizon), vertical linear arrangement (linearVertical), and overlay arrangement (overlay). Among them, horizontal linear arrangement can indicate that each sublayer is arranged linearly from left to right; vertical linear arrangement can indicate that each sublayer is arranged linearly from top to bottom; overlay arrangement can indicate that each sublayer is stacked up and down according to the hierarchical relationship.
[0132] The index value is used to represent the index number of the layer. When the parent layer is arranged horizontally in a linear manner, it represents the order from left to right; when the parent layer is arranged vertically in a linear manner, it represents the order from top to bottom; when the parent layer is arranged in a hierarchical manner, it represents the hierarchical order from the top layer to the bottom layer.
[0133] The size specification layer is used to indicate which sublayer of the composite layer is determined by the size of the composite layer arranged in an overlay layout. Since the overlay layer cannot be determined by all sublayers like the linear layout, a specific sublayer needs to be specified to facilitate subsequent cropping and alignment of other sublayers.
[0134] Alignment refers to the alignment of the layer relative to its parent layer. The main influence on the layout of the parent layer is the arrangement of the superimposed layers. Specifically, it can include left alignment (left), center alignment (middle) and right alignment (right).
[0135] For further understanding, please refer to Figure 5 , Figure 5 is a schematic diagram of an abstract model described by a configuration file provided in an embodiment of the present application. The abstract model may be described by the configuration file shown in Table 1 above. Figure 5As shown, the abstract model may specifically include a left layer, a text layer, a background layer, a right layer, a middle synthesis layer and a root layer.
[0136] in, Figure 5 The root layer shown is composed of the left layer, the middle composite layer, and the right layer; the middle composite layer is composed of the text layer and the background layer. Figure 5 The configuration file corresponding to the abstract model shown above is Figure 4 The configuration file corresponding to the animation file 40D shown in FIG. Figure 5 The left layer shown may be the left layer 4L1; the background layer may be the background layer 4L 21 ; The text layer can be text layer 4L 22 ; The right layer can be the right layer 4L3.
[0137] It is understandable that the configuration file is determined based on the scenario in which the bullet screen is used and the versatility of the design, and mainly reflects the layout method between the layers, specifically whether it is a linear arrangement or a superimposed hierarchical arrangement. In addition, the embodiment of the present application does not need to specify the specific relationship between the layers of the same level. For example, it is not necessary to specify the gap width between the layers in the linear layout, because the design object can add a blank area to each layer for the gap when designing the bullet screen.
[0138] Step S103, based on the bullet comment content information, the track height of the first bullet comment and the configuration information corresponding to each layer, each layer in the initial animation file is laid out to obtain a first animation file.
[0139] Among them, the first barrage here is displayed for the multimedia data played by the target terminal device. Specifically, the target terminal device can determine the track height of the first barrage based on the font size information in the barrage setting information of the multimedia data, and then determine the first layer from the initial animation file based on the barrage content information and the configuration file corresponding to the first barrage. Among them, the N configuration information here may include the configuration information corresponding to the first layer. Further, the target terminal device can configure the size attribute of the first layer based on the configuration information corresponding to the first layer to obtain the second layer. Among them, the N configuration information here includes the layer type of the second layer. When obtaining N second layers, the target terminal device can determine the second layer whose layer type belongs to the synthetic layer type as the layer to be laid out, and perform a displacement operation on the layer to be laid out to obtain the first animation file. Among them, the first animation file here can be used to display the first barrage.
[0140] Among them, the configuration information included in the configuration file is for the current layer. In other words, the current layer here may be the initial layers in the initial animation file, or it may be a replaceable layer whose content has been replaced (for example, a key text layer and an initial picture layer), or it may be a layer to be configured with size attributes (for example, the first layer), a layer with set size attributes (for example, the second layer), or a layer to be displaced (for example, a layer to be laid out). That is, no matter what operation is performed on the layer, this application can understand it as a layer. The layer before the operation and the layer after the operation only have content or position changes. Its configuration information can be obtained from the configuration file corresponding to the first barrage and will not change.
[0141] Since the scenario of bullet screen layout determines that the layer height of all layers depends on the layer height of their parent layer, and the height of the outermost layer is determined by the height of the track of the bullet screen in the business (i.e., the track height), the target terminal device needs to determine the height of the track of the first bullet screen before configuring each layer in the initial animation file. Among them, the track height of the first bullet screen here is determined by the font size information in the bullet screen setting information of the multimedia data.
[0142] It is understandable that the font size information can be adjusted by the target object of the target terminal device. For example, when the target terminal device plays multimedia data, the target object can perform a trigger operation on the terminal interface of the multimedia data to cause the target terminal device to display the bullet screen setting interface. The bullet screen setting interface can be independent of the terminal interface that plays multimedia data, and the bullet screen setting interface can be used to set the bullet screen setting information, which can specifically include font size information, the number of lines displayed by the bullet screen, the transparency of the bullet screen, and the display speed of the bullet screen.
[0143] For example, if the font size information is set to 24 pixels, the track height of the barrage displayed on the multimedia data can be 60 pixels; if the font size information is set to 20 pixels, the track height of the barrage displayed on the multimedia data can be 50 pixels, which means that the larger the font size indicated by the font size information, the higher the track height, and vice versa.
[0144] Among them, the configuration file corresponding to the first barrage also includes data configuration information. Since the target terminal device needs to start from the outermost layer and gradually move downward, and scale the layers except the text layer that needs to replace the text in order to determine the layer height, therefore, in order to prevent the size difference with other ordinary barrages, the target terminal device needs to determine which layers belong to the layers that need to configure the size attributes (i.e., the first layer) based on whether the barrage content information includes the barrage text content.
[0145] It is understandable that if the barrage content information includes barrage text content, the target terminal device can set the barrage text content according to the font size information and the text style in the barrage content information, and then replace the initial text content in the key text layer with the set barrage text content. Then, the target terminal device can shift the replaced key text layer based on the track height of the first barrage to obtain the shifted key text layer; the shifted key text layer is at the center of the track corresponding to the first barrage. For example, the target terminal device can perform a vertical shift operation on the replaced key text layer so that the shifted key text layer is at the center of the track corresponding to the first barrage in the vertical direction.
[0146] At the same time, if the bullet-screen content information includes bullet-screen text content, the target terminal device can also determine the target animation file based on the bullet-screen content information and the initial animation file, and determine the (N-1) layers in the target animation file other than the current key text layer as the first layer. Among them, when the bullet-screen content information includes bullet-screen text content, the current key text layer in the target animation file is the key text layer of the replaced text content after displacement in the initial animation file.
[0147] Among them, if the target terminal device determines, based on the configuration file corresponding to the first barrage, that the initial animation file does not contain a layer of the picture layer type, then the target animation file here refers to the animation file obtained after replacing the text content of the key text layer of the initial animation file and shifting it to the center of the track. If the target terminal device determines, based on the configuration file corresponding to the first barrage, that the initial animation file still contains a layer of the picture layer type (initial picture layer), then the target animation file here indicates the animation file obtained after replacing the content of the replaceable layer of the initial animation file, which may specifically include shifting the key text layer of the replaced text content and replacing the picture content of the initial picture layer.
[0148] like Figure 4 As shown, the layers included in the animation file 40D include layers belonging to the image layer type and key text layers. Among them, the layer belonging to the image layer type can be the left layer 4L1 for displaying the avatar of the object to whom the bullet screen is sent, and the key text layer can be the text layer 4L 22 Therefore, the target terminal device can replace the text content of the text layer 4L 22The target terminal device can also replace the image content in the left layer 4L1 by performing displacement to obtain the animation file 40D (i.e., the target animation file) after the content is replaced. When the target terminal device replaces the image content in the left layer 4L1, it can obtain the object avatar of the object to which the barrage is sent based on the object identifier of the barrage sending object in the barrage content information, and then replace the obtained layer belonging to the image layer type based on the image corresponding to the object avatar. Then, the target terminal device can replace all the layers in the target animation file except the current key text layer (the text layer 4L1 with the replaced text content after displacement). 22 ) are respectively determined as the first layer. For example, the first layer may include Figure 4 The root layer, the left layer 4L1 with replaced image content, the middle composite layer, the right layer 4L3, and the background layer 4L 21 .
[0149] If the barrage content information does not include barrage text content, the target terminal device can determine the target animation file based on the barrage content information and the initial animation file, and then can determine the N layers in the target animation file as the first layer. Among them, if the target terminal device determines that the initial animation file does not have a layer belonging to the picture layer type based on the configuration file corresponding to the first barrage, then the target animation file here refers to the initial animation file. If the target terminal device determines that the initial animation file still has a layer belonging to the picture layer type (initial picture layer) based on the configuration file corresponding to the first barrage, then the target animation file here indicates the animation file obtained after replacing the picture content of the initial picture layer in the initial animation file.
[0150] Among them, the N configuration information of the configuration file corresponding to the first barrage may include configuration information of the first layer; the configuration information of the first layer includes the layer index relationship of the first layer and the layer type of the first layer. It should be understood that the target terminal device can scale the first layer based on the layer index relationship of the first layer to obtain the scaled first layer, and then obtain the width of the scaled first layer based on the layer type of the first layer. Furthermore, the target terminal device can set the size attribute of the scaled first layer based on the layer type of the first layer and the width of the scaled first layer to obtain the second layer.
[0151] Among them, if the layer index relationship of the first layer does not include the parent index relationship of the first layer, the target terminal device can scale the first layer based on the track height of the first bullet message to obtain the scaled first layer. Optionally, if the layer index relationship of the first layer includes the parent index relationship of the first layer, the target terminal device can determine the parent layer of the first layer based on the parent index relationship, and then scale the first layer based on the layer height of the parent layer of the first layer to obtain the scaled first layer.
[0152] like Figure 4 As shown, the target terminal device needs to scale the layers except the text layer whose text needs to be replaced from the outermost layer downward step by step (for example, proportional scaling) in sequence until the layer height reaches the track height or the height of its parent layer. First, the target terminal device can use the root layer as the first layer. Since the layer index relationship of the root layer does not include the parent index relationship, the target terminal device can scale the layer height of the root layer proportionally so that the layer height of the scaled root layer reaches the track height of the first barrage.
[0153] Since the layer index relationships of the three layers, namely the left layer 4L1, the middle composite layer and the right layer 4L3, all include parent index relationships, and the parent layers determined based on the parent index relationships are all root layers, the target terminal device can determine them as the first layers respectively and scale them proportionally so that the layer height of each scaled layer reaches the layer height of the root layer.
[0154] Similarly, due to the background layer 4L 21 and text layer 4L 22 The layer index relationships of these two layers both include a parent index relationship, and the parent layers determined based on the parent index relationship are all intermediate composite layers. Therefore, the target terminal device can determine them as the first layers respectively in turn, and scale them proportionally so that the layer height of each layer after scaling reaches the layer height of the intermediate composite layer.
[0155] It should be noted that for layers with vertical linear layout, the layer heights of its sublayers should be scaled synchronously according to the proportions of each layer before scaling to ensure that the height ratios of each sublayer are consistent, thereby improving the accuracy of subsequent layout.
[0156] After scaling each first layer, the target terminal device can obtain the width of the scaled first layer based on the layer type of the first layer, and then set the size attribute of the scaled first layer based on the layer type of the first layer and the width of the scaled first layer to obtain the second layer.
[0157] Among them, if the layer type of the first layer is a non-composite layer type, the target terminal device can directly obtain the width of the scaled first layer based on the layer interface (for example, PAGLayer related interface). Optionally, if the layer type of the first layer is a composite layer type, the target terminal device can obtain the width of the scaled first layer based on the layout mode of the first layer and the layer index relationship of the first layer.
[0158] If the layer type of the first layer is a composite layer type and the layout of the first layer is a horizontal linear arrangement, the target terminal device can determine the sublayers of the scaled first layer based on the sub-index relationship in the layer index relationship of the first layer, and determine the sum of the current widths of the sublayers of the scaled first layer as the width of the scaled first layer.
[0159] If the layer type of the first layer is a composite layer type and the layout of the first layer is a vertical linear arrangement, the target terminal device can determine the sublayer of the scaled first layer based on the sub-index relationship in the layer index relationship of the first layer, and determine the maximum current width in the sublayer of the scaled first layer as the width of the scaled first layer.
[0160] If the layer type of the first layer is a composite layer type and the layout of the first layer is an overlay hierarchical arrangement, the target terminal device can determine the size specification layer from the configuration information of the first layer, and determine the current width of the size specification layer as the width of the scaled first layer; the sub-index relationship in the layer index relationship of the first layer indicates that the sub-layers of the first layer include the size specification layer.
[0161] like Figure 4 As shown, the target terminal device needs to start from the bottom layer and gradually move upwards, based on the layer type of each layer, to obtain the width of each layer after scaling. 21 , Text layer 4L 22 The layer types of the layer 4L3 on the right are all non-composite layer types, that is, these four layers do not include sub-layers. Therefore, the target terminal device can directly obtain the widths of these four scaled layers based on the layer interface.
[0162] Since the layer type of the intermediate composite layer belongs to the composite layer type, and the layout of the intermediate composite layer is an overlay layer arrangement, the target terminal device needs to determine the size-specified layer as a text layer (i.e. Figure 4 The text layer shown is 4L 22 ), therefore, the target terminal device can convert the text layer 4L 22The current width of the scaled intermediate composite layer is determined by the current width of the scaled intermediate composite layer.
[0163] Since the layer type of the root layer is a composite layer type and the layout of the root layer is a horizontal linear arrangement, the target terminal device can determine the sublayers of the scaled root layer (the left layer 4L1, the middle composite layer, and the right layer 4L3) based on the sub-index relationship in the layer index relationship of the root layer, and then determine the sum of the current widths of the sublayers of the scaled root layer as the width of the first layer after scaling.
[0164] For layers whose layer type is non-composite layer type, the width and height attributes of the scaled first layer have been set; and for layers whose layer type is composite layer type, the width and height attributes of the scaled first layer will cause its sublayers to be cropped. Therefore, after completing the width and height confirmation, the target terminal device can set the size attributes of each scaled first layer based on the confirmed width and layer height of the scaled first layer, so that the set layer (i.e., the second layer) can fully display all sublayers.
[0165] Since in PAG, the two-dimensional properties of a layer depend on the relative position of the parent layer, the target terminal device needs to layout from the bottom up. Among them, when N second layers are obtained, the target terminal device can determine the second layer whose layer type belongs to the synthetic layer type as the layer to be laid out. Among them, the N configuration information of the configuration file corresponding to the first barrage may include the configuration information of the layer to be laid out; the configuration information of the layer to be laid out includes the layout mode of the layer to be laid out, the index value of the layer to be laid out, and the layer index relationship of the layer to be laid out; the layer index relationship of the layer to be laid out includes the sub-index relationship of the layer to be laid out.
[0166] If the layout of the layer to be laid out is a horizontal linear arrangement, the target terminal device can obtain the sublayer of the layer to be laid out based on the sub-index relationship of the layer to be laid out, and perform horizontal displacement operations on each sublayer in turn according to the index value of the sublayer of the layer to be laid out. Among them, since the anchor point of each layer is a vertex (for example, the upper left corner) of the parent layer of the layer, if the coordinates of the upper left corner are represented by (a, b), where a is used to represent the coordinate value of the upper left corner in the vertical direction (or vertical direction), and b is used to represent the coordinate value of the upper left corner in the horizontal direction, then the displacement distance corresponding to the displacement operation can be the pixel corresponding to the coordinate value on the right side of the previous displaced sublayer of the layer to be laid out, so that the sublayers of the layer to be laid out are arranged in order from left to right.
[0167] If the layout of the layer to be laid out is a vertical linear arrangement, the target terminal device can obtain the sublayers of the layer to be laid out based on the sub-index relationship of the layer to be laid out, and perform vertical displacement operations on each sublayer in turn according to the index value of the sublayer of the layer to be laid out. The displacement distance corresponding to the displacement operation here can be the pixel corresponding to the coordinate value of the bottom (for example, the left side) of the previous displaced sublayer of the layer to be laid out, so that the sublayers of the layer to be laid out are arranged in order from top to bottom.
[0168] If the layout method of the layer to be laid out is a superimposed hierarchical arrangement, the target terminal device can obtain the sublayer of the layer to be laid out based on the sub-index relationship of the layer to be laid out, and perform horizontal displacement operations on each sublayer in turn according to the index value of the sublayer of the layer to be laid out and the alignment of each sublayer.
[0169] For further understanding, please refer to Figure 6 , Figure 6 Schematic diagram of a scene for laying out an initial animation file based on a configuration file provided by an embodiment of the present application. Figure 6 As shown, the initial animation file in the embodiment of the present application can be an animation file that matches the bullet screen style of the first bullet screen acquired by the target terminal device. The initial animation file can specifically include a root layer, a left layer, a middle synthesis layer, a right layer, a background layer, and a text layer. For example, the initial animation file can be the above Figure 4 Animation file 40D is shown.
[0170] in, Figure 6 The left layer 6L1 shown may be obtained after the target terminal device configures the size attribute of the left layer of the replaced image content (for example, scaling processing); the left layer of the replaced image content here is the target terminal device based on the barrage content information of the first barrage, and the left layer in the initial animation file (for example, Figure 4 The left layer 4L1) shown is obtained after replacing the image content.
[0171] Figure 6 The background layer 6L shown 21 The background layer in the original animation file can be modified for the target terminal device (for example, Figure 4 Background layer 4L shown 21 ) after configuring the size attributes (for example, scaling).
[0172] Figure 6 The text layer shown is 6L 22The target terminal device may shift the key text layer of the replaced text content based on the track height of the first bullet screen. The key text layer of the replaced text content here is the key text layer (for example, Figure 4 The text layer shown is 4L 22 ) is replaced; the set barrage text content here is obtained after the target terminal device sets the barrage text content in the barrage content information according to the font size information and the text style (for example, text font) in the barrage content information.
[0173] Figure 6 The right layer 6L3 shown can be the target terminal device's response to the right layer in the initial animation file (for example, Figure 4 The background layer 4L3 shown is obtained after the size attributes are configured (for example, scaling processing).
[0174] in, Figure 6 The intermediate composite layer 6L2 shown is a composite layer that the target terminal device uses according to its sub-layers (for example, the background layer 6L 21 and text layer 6L 22 ) index value, and then the background layer 6L 21 and text layer 6L 22 It is understood that since the configuration information of the intermediate composite layer indicates that its layer type belongs to the composite layer type, its layout is a superimposed hierarchical arrangement, and its layer index relationship can include not only a parent index relationship but also a child index relationship. Therefore, the target terminal device can first scale the intermediate composite layer in the initial animation file based on the layer height of its parent layer (i.e., the root layer), and determine the width of the scaled intermediate composite layer to be the current width of the size-specified layer, that is, the text layer 6L. 22 The width of the scaled intermediate composite layer is determined based on the determined width and height, and the intermediate composite layer after the setting is determined as the layer 1 to be laid out.
[0175] Since the index value of the text layer indicated in the configuration file of the first bullet comment is 1, and the alignment of the text layer relative to its parent layer is centered; the index value of the background layer is 2, and the alignment of the background layer relative to its parent layer is also centered, this means that the target terminal device can first determine the text layer 6L 22 The level is 1, and then the text layer 6L 22 Displace it horizontally so that the text layer after displacement is 6L 22 The target terminal device can then determine the background layer 6L.21 The layer level is 2, and then the background layer 6L 21 Displace it horizontally to make the background layer 6L 21 The layer 1 to be laid out is aligned with the center, so that the layer 1 to be laid out after displacement (i.e. Figure 6 The intermediate composite layer 6L2 shown).
[0176] in, Figure 6 The root layer 6L shown is determined by the target terminal device after performing displacement operations on the left layer 6L1, the middle composite layer 6L2 and the right layer 6L3 in turn according to the index values of its sub-layers (for example, the left layer 6L1, the middle composite layer 6L2 and the right layer 6L3). It can be understood that since the configuration information of the root layer indicates that its layer type belongs to the composite layer type, its layout method is horizontal linear arrangement, and its layer index relationship includes a sub-index relationship, the target terminal device can first scale the root layer in the initial animation file based on the track height of its first bullet screen, and determine that the width of the scaled root layer is the sum of the current widths of its sub-layers, that is, the sum of the widths of the three layers of the left layer 6L1, the middle composite layer 6L2 and the right layer 6L3, and then, based on the determined width and height, set the width and height attributes of the scaled root layer, and determine the set root layer as the layer 2 to be laid out.
[0177] Since the index value of the left layer indicated in the configuration file of the first bullet message is 1; the index value of the middle composite layer is 2; the index value of the right layer is 3; since the sublayer of the root layer has been scaled in advance, the height of the sublayer has reached the same level as the parent layer, so there is no need to perform vertical displacement, which means that the target terminal device can first perform a horizontal displacement operation on the left layer 6L1, so that the anchor point of the left layer 6L1 coincides with the upper left corner of the layer 2 to be laid out; then, the target terminal device needs to obtain the coordinate value of the right side of the layer 6L1 of the left layer after displacement, and based on the pixels corresponding to the obtained coordinate value, perform a horizontal displacement operation on the middle composite layer 6L2; finally, the target terminal device needs to obtain the coordinate value of the right side of the layer of the middle composite layer 6L2 after displacement, and based on the pixels corresponding to the obtained coordinate value, perform a horizontal displacement operation on the right layer 6L3, so that the three layers are arranged in order from left to right, thereby obtaining the layer 1 to be laid out after displacement (i.e. Figure 6 Root layer 6L shown).
[0178] In an embodiment of the present application, when the target terminal device obtains the bullet content information of a certain bullet (i.e., the first bullet), it is necessary to obtain the initial animation file corresponding to the first bullet and the configuration file corresponding to the first bullet based on the bullet style of the first bullet. Among them, the initial animation file here may include N layers, and the configuration file corresponding to the first bullet may include the configuration information corresponding to each of the N layers, where N is a positive integer. Then, the target terminal device can directly layout each layer in the initial animation file based on the bullet content information, the track height of the first bullet, and the configuration information corresponding to each layer, so as to quickly obtain the first animation file for displaying the first bullet. It can be seen that the bullet layout method provided in the embodiment of the present application does not require frequent interaction between the design side and the development side of the initial animation file, thereby greatly reducing time consumption, reducing R&D costs, and improving bullet layout efficiency.
[0179] For further information, see Figure 7 , Figure 7 is a flow chart of a data processing method provided by an embodiment of the present application. The method can be executed by a target terminal device having a bullet screen layout function, and the target terminal device can be the above Figure 1 Any terminal device in the terminal device cluster shown, for example, terminal device 100a. The method may at least include the following steps S201-S207:
[0180] Step S201, obtaining the bullet screen content information of the first bullet screen.
[0181] Step S202: based on the bullet screen style of the first bullet screen, respectively obtain an initial animation file corresponding to the first bullet screen and a configuration file corresponding to the first bullet screen.
[0182] Among them, the initial animation file includes N layers; the configuration file corresponding to the first barrage includes configuration information corresponding to each of the N layers; N is a positive integer.
[0183] Step S203, based on the bullet comment content information, the track height of the first bullet comment and the configuration information corresponding to each layer, each layer in the initial animation file is laid out to obtain a first animation file.
[0184] Among them, the first barrage here is displayed for the multimedia data played by the target terminal device. Specifically, the target terminal device can determine the track height of the first barrage based on the font size information in the barrage setting information of the multimedia data, and then determine the first layer from the initial animation file based on the barrage content information and the configuration file corresponding to the first barrage. Among them, the N configuration information here may include the configuration information corresponding to the first layer. Further, the target terminal device can configure the size attribute of the first layer based on the configuration information corresponding to the first layer to obtain the second layer. Among them, the N configuration information here includes the layer type of the second layer. When obtaining N second layers, the target terminal device can determine the second layer whose layer type belongs to the synthetic layer type as the layer to be laid out, and perform a displacement operation on the layer to be laid out to obtain the first animation file. Among them, the first animation file here can be used to display the first barrage.
[0185] It can be understood that when the barrage content information includes barrage text content, the N second layers may include the shifted key text layer, and (N-1) first layers for configuring the size attributes; when the barrage content information does not include barrage text content, the N second layers may include N first layers for configuring the size attributes.
[0186] The data processing method in the embodiment of the present application may include a bullet screen layout process and a bullet screen response process. It can be understood that step S201 to step S203 describe the bullet screen layout process. The specific implementation of the bullet screen layout process can be found in the above Figure 3 The description of step S101 to step S103 in the corresponding embodiment will not be repeated here.
[0187] The specific details of the barrage response process may refer to the description of steps S204 to S207 below.
[0188] Among them, the configuration file corresponding to the first bullet chat here also includes the response rules corresponding to H layers respectively; H is a positive integer less than or equal to N. For ease of understanding, please refer to Table 2, which is a content schematic table of a configuration file including response attributes provided in an embodiment of the present application. The configuration file shown in Table 2 can be for the above Figure 2 The configuration file (ie, configuration file 20P6) generated by the corresponding animation file 20D6 may include configuration information corresponding to each layer in the animation file 20D6. Specifically, as shown in Table 2:
[0189] Table 2
[0190]
[0191]
[0192] Among them, rows 1 to 3 shown in Table 2 can be used to represent data configuration information (for example, Data), which is mainly used to define all the properties of the barrage, and rows 4 to 47 shown in Table 2 can be used to represent multi-column layer configuration information (for example, MultiPag), which is mainly used to represent the hierarchical relationship between different layers and the layout type.
[0193] Among them, lines 5 to 10 can be used to represent the configuration information of the root layer (rootComposition); lines 11 to 18 can be used to represent the configuration information of the left layer (leftLayer); lines 19 to 22 can be used to represent the configuration information of the text layer (textLayer); lines 23 to 28 can be used to represent the configuration information of the right layer (rightLayer); lines 29 to 37 can be used to represent the configuration information of the right open layer (rightOnLayer); lines 38 to 47 can be used to represent the configuration information of the right closed layer (rightOffLayer).
[0194] It is understandable that the layer attributes in Table 2 may include response attributes associated with response rules in addition to layer name (name), layer type (type), layout mode (layout), index value (index), size specified layer (sizingLayerName), and alignment (align). For example, in the configuration file shown in Table 2, for some layers, a click response type (DMOperation) for specifying the current layer is added, which is attached to the layer type. The relevant fields of the click response type may include response type (operationType), business content (content), and replacement layer (changeLayer).
[0195] The response type refers to the response type after clicking, which is mainly linked to the business, and can include bullet screen likes, cancel likes, pull up the bullet screen publisher, open other pages (for example, H5 pages), etc. The bullet screen publisher here can be used to display the bullet screen publishing interface (for example, Figure 2 The interface shown in 2J 10 ), where the other pages may be another sub-interface independent of the terminal interface playing the multimedia data, and is used to display data information related to the multimedia data. For example, if the multimedia data includes a commodity, the other pages may display a shopping link corresponding to the commodity; if the multimedia data is video data including multiple objects, the other pages may display relevant data of a certain object in the video data (for example, information allowed to be disclosed by the object).
[0196] Business content refers to some content required for business, such as filling in the default copy of the publisher (for example, "Come and post a barrage" shown in line 18) or the web address of the H5 web page (for example, Uniform Resource Locator, referred to as url), etc.
[0197] The replacement layer is used to indicate the layer name of the layer to be replaced after clicking, as shown in Table 2. When the target object clicks rightOnLayer and responds, the target terminal device also needs to replace rightOnLayer with rightOffLayer.
[0198] Step S204, displaying X bullet screens on the terminal interface playing the multimedia data.
[0199] Specifically, on the terminal interface playing multimedia data, when the target object corresponding to the target terminal device performs a bullet screen display operation (for example, a trigger operation is performed on a "bullet screen open" control), the target terminal device can respond to the bullet screen display operation and display X bullet screens based on the bullet screen player on the video client running on the target terminal device. The X bullet screens here can include the first bullet screen displayed by the above-mentioned first animation file; X is a positive integer.
[0200] Step S205 , responding to a trigger operation on the terminal interface, and determining trigger coordinates corresponding to the trigger operation.
[0201] Specifically, the target object can perform a trigger operation (e.g., a click operation) on any one of the X bullet screens in the bullet screen display area of the terminal interface, so that the target terminal device determines the trigger coordinates corresponding to the trigger operation when responding to the trigger operation. The trigger coordinates here can be used to determine the second bullet screen from the X bullet screens; the second bullet screen is the bullet screen corresponding to the trigger operation.
[0202] Step S206: If the second bullet screen is the first bullet screen, based on H layers, a target layer for responding to the triggering operation is obtained in the first bullet screen.
[0203] Specifically, if the bullet screen corresponding to the trigger operation is the first bullet screen, the target terminal device can convert the trigger coordinates into relative coordinates for the first bullet screen. Further, the target terminal device can obtain the layer covered by the relative coordinates from the first bullet screen, and then determine the obtained layer as the layer array corresponding to the trigger operation. At this time, the target terminal device can traverse the layer array based on H layers until the first layer that can respond to the trigger operation is found, and the found layer is determined as the target layer for responding to the trigger operation.
[0204] In other words, when the target object executes a trigger operation on the barrage player corresponding to the multimedia data (i.e., executes a trigger operation in the barrage display area), the barrage system will determine the trigger coordinates and search all the barrages until the barrage clicked on the screen is determined. Then, the screen click coordinates, which is a global coordinate, needs to be converted into a relative position relative to the barrage.
[0205] It can be understood that in PAGComposition, passing in the coordinates of a point can obtain all PAGLayer located below this point, which is called a hit test. Therefore, if the barrage corresponding to the trigger operation is the first barrage, the target terminal device can pass the relative coordinates for the first barrage to the outermost synthetic layer (i.e., the root layer) of the first barrage, and can obtain all the layers covered by the relative coordinates to obtain a layer array (PAGLayer array). For example, if the relative coordinates correspond to a layer of a non-synthetic layer type in the first barrage, the layer array here can include the layer; if the relative coordinates correspond to a layer of a synthetic layer type in the first barrage, and the sublayers of the layer are all single layers, the layer data here can include the layer and the sublayers of the layer; if the relative coordinates do not correspond to any layer of the first barrage, the layer array can be empty.
[0206] Among them, the layer array here is filled in order from top to bottom according to the arrangement of the layers, so at this time you need to start from the beginning and judge in order until you find the first PAGLayer that can respond as the target layer, and then you can judge whether the target layer supports click response according to the configuration file corresponding to the first barrage.
[0207] Step S207, obtaining a target response rule that matches the target layer from the H response rules, and executing a business operation corresponding to the target response rule.
[0208] Specifically, when the target terminal device determines that the target layer supports click response, it can obtain the target response rule that matches the target layer from H response rules, and then execute the business operation corresponding to the target response rule based on the business content in the target response rule.
[0209] For further understanding, please refer to Figure 8 , Figure 8 Schematic diagram of a scenario in which a relevant area is clicked to respond to a bullet screen provided by an embodiment of the present application. Figure 8As shown, the interface 8J1 and the interface 8J2 are both terminal interfaces of the target terminal device playing the same multimedia data at different times. Among them, the interface 8J1 can display multiple bullet screens, and 3 bullet screens can be taken as an example here. Among them, the bullet screen styles of these three bullet screens can be the same or different, and they will not be limited here.
[0210] It should be understood that when the target object corresponding to the target terminal device is in the barrage display area of the interface 8J1, and a trigger operation (for example, a click operation) is performed on any of the three barrages, the target terminal device can respond to the trigger operation to determine the trigger coordinates corresponding to the trigger operation, and then determine the barrage 8V corresponding to the trigger coordinates (that is, the first barrage laid out according to the configuration file shown in Table 2 above).
[0211] Further, the target terminal device can convert the trigger coordinates into relative coordinates for the bullet screen 8V, and pass the relative coordinates into the root layer of the bullet screen 8V to obtain the layer covered by the relative coordinates, and then determine the obtained layer as the layer array corresponding to the trigger operation. Since the layer array here includes the left layer of the bullet screen 8V, the target terminal device can directly determine the left layer of the bullet screen 8V as the target layer. Further, the target terminal device needs to determine whether the target layer supports click response according to the configuration file corresponding to the first bullet screen shown in Table 2 above.
[0212] Since the configuration information of the left layer shown in Table 2 includes response attributes associated with the response rules, the target terminal device determines that the left layer of the barrage 8V supports click response. Then, the target terminal device can obtain a target response rule that matches the left layer of the barrage 8V from the H response rules shown in Table 2, and then can perform a business operation (for example, the operation of pulling up the barrage publisher) based on the business content in the target response rule, that is, display a barrage publishing interface independent of interface 8J2 (for example, Figure 8 The interface shown in 8J 20 ).
[0213] It can be seen that the hit test technology of the embodiment of the present application realizes the function of responding to different click hot zones. By clicking on an area of a PAG bullet screen on the screen, the name of the PAGLayer can be obtained, and then the configuration file sent by the server is compared to respond to the click. After the response is completed, the target terminal device may also need to replace the target layer with the layer specified by changeLayer in DMOperation.
[0214] For further understanding, please refer to Fig. 9 , Fig. 91 is a flow chart of a bullet screen response and layer replacement provided by an embodiment of the present application. Fig. 9 As shown, the flowchart may specifically include S91-S99:
[0215] like Fig. 9 As shown, the target terminal device can execute step S91, respond to the trigger operation of the target object on the terminal interface on the terminal interface displaying X bullet screens, determine the trigger coordinates (for example, global coordinates, globalPosition) corresponding to the trigger operation, and then execute step S92 to determine the second bullet screen corresponding to the trigger operation from the X bullet screens. When the second bullet screen is the first bullet screen, the target terminal device can execute step S93 to convert the trigger coordinates into relative coordinates for the first bullet screen. Then, the target terminal device can execute steps S94-S96 to obtain the layer covered by the relative coordinates from the first bullet screen, so as to find the first target layer that can respond to the trigger operation based on the configuration file, and when it is determined that the target layer supports click response, the business operation corresponding to the target response rule matching the target layer can be executed based on the configuration file.
[0216] Further, the target terminal device may execute step S97 to determine whether the target layer needs to be replaced. If the configuration file indicates that the response attribute of the target layer does not have a replacement layer, the target terminal device may determine that the target layer does not need to be replaced, and then jump to execute step S99 to end the barrage response process.
[0217] Optionally, if the configuration file indicates that there is a replacement layer for the response attribute of the target layer, the target terminal device can determine that the target layer needs to be replaced, and then can execute step S98 to replace the target layer based on the configuration file. For example, the target terminal device can search for the replacement layer, and replace the target layer in the first animation file used to display the first bullet screen with the replacement layer to obtain the replaced first animation file. Then, the target terminal device needs to re-layout each layer in the replaced first animation file to obtain a second animation file. Among them, the second animation file here can be used to display the response bullet screen corresponding to the first bullet screen after refreshing the bullet screen player. Then, the target terminal device can execute step S99 to end the bullet screen response process. Among them, the way in which the target terminal device re-layouts each layer in the replaced first animation file in the embodiment of the present application can refer to the way in which each layer of the initial animation file is laid out in the above-mentioned step S103, and it will not be repeated here.
[0218] For further understanding, please refer to Fig.10 , Fig.10 Schematic diagram of a scenario in which a relevant area is clicked to respond to a bullet screen provided by an embodiment of the present application. Fig.10 As shown, multimedia data and multiple bullet comments can be displayed on the terminal interface of the target terminal device, and 3 bullet comments can be taken as an example here.
[0219] It should be understood that when the target terminal device determines that the bullet screen corresponding to the trigger operation of the target object on the terminal interface is Fig.10 When the target terminal device receives the barrage 10V1 (for example, the first barrage laid out according to the configuration file shown in Table 2 above), the target terminal device can convert the trigger coordinates into relative coordinates for the barrage 10V1, and obtain the first layer that can respond to the trigger operation from the layer covered by the relative coordinates obtained from the barrage 10V1 (for example, the right layer of the barrage 10V1). The target terminal device can obtain a target response rule that matches the right layer of the barrage 10V1 from the H response rules shown in Table 2, and then can perform a business operation (for example, a like operation) based on the business content in the target response rule.
[0220] Furthermore, the target terminal device can determine that the target response rule includes a replacement layer (i.e., a closed layer on the right) based on the configuration information of the right layer shown in Table 2 above. Then, the target terminal device needs to replace the right layer of the barrage 10V1. At this time, the target terminal device can first search for the closed layer on the right (i.e., the image layer including the “Like” button), and replace the right layer in the barrage 10V1 (the image layer including the “Like” button) with the image layer including the “Like” button in the first animation file used to display the barrage 10V1, to obtain the replaced first animation file. Then, the target terminal device needs to re-layout each layer in the replaced first animation file to obtain the second animation file. Among them, the second animation file here can be used to display the response barrage corresponding to the barrage 10V1 after refreshing the barrage player (for example, Fig.10 The barrage 10V2 shown).
[0221] In the embodiment of the present application, by describing and configuring each layer in the animation file in the configuration file, the design of a new type of bullet screen no longer requires the intervention of development, but is directly operated by the design object. For example, when the design object launches a new bullet screen style, most of the time the design object needs to design an animation file of the new bullet screen style. Such a design scheme can improve development efficiency and reduce development costs. The target terminal device can achieve a variety of bullet screen performance effects by supporting PAG animation files with customized layouts, thereby improving user experience and visual effects. Since PAG animation files and configuration files support online configuration and can be modified at any time, the flexibility of bullet screen layout can be greatly improved. In addition, by supporting bullet screen partition click response, users can participate in the interaction of bullet screen more actively, increasing the fun and playability of bullet screen, and providing a more free and flexible way of use. By supporting interactive response and dynamic replacement of layers, functions such as changes in the heat of bullet screen or switching of interactive effects can be realized, which improves user experience and visual effects and increases the attractiveness and fun of bullet screen.
[0222] For further information, see Fig.11 , Fig.11 Schematic diagram of a data processing device provided in an embodiment of the present application. Fig.11 As shown, the data processing device 1 may include: a content acquisition module 100 , a file acquisition module 200 and a layout module 300 .
[0223] The content acquisition module 100 is used to acquire the content information of the first bullet screen;
[0224] The file acquisition module 200 is used to acquire the initial animation file corresponding to the first barrage and the configuration file corresponding to the first barrage respectively based on the barrage style of the first barrage; the initial animation file includes N layers; the configuration file corresponding to the first barrage includes configuration information corresponding to each layer in the N layers; N is a positive integer;
[0225] The layout module 300 is used to layout each layer in the animation file based on the barrage content information, the track height of the first barrage and the configuration information corresponding to each layer to obtain a first animation file; the first animation file is used to display the first barrage.
[0226] The specific implementation of the content acquisition module 100, the file acquisition module 200 and the layout module 300 can be found in the above Figure 3 The description of step S101 to step S103 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated.
[0227] For further information, see Fig.12 , Fig.12 Schematic diagram of a data processing device provided in an embodiment of the present application. Fig.12 As shown, the data processing device 2 may include: a content acquisition module 11, a file acquisition module 12, a layout module 13, a barrage display module 14, a coordinate determination module 15, a layer determination module 16, an operation execution module 17, a search module 18, a replacement module 19 and a re-layout module 20.
[0228] The content acquisition module 11 is used to obtain the content information of the first bullet screen;
[0229] The file acquisition module 12 is used to acquire the initial animation file corresponding to the first barrage and the configuration file corresponding to the first barrage respectively based on the barrage style of the first barrage; the initial animation file includes N layers; the configuration file corresponding to the first barrage includes configuration information corresponding to each layer in the N layers; N is a positive integer;
[0230] The layout module 13 is used to layout each layer in the animation file based on the barrage content information, the track height of the first barrage and the configuration information corresponding to each layer to obtain a first animation file; the first animation file is used to display the first barrage.
[0231] The device is run on a target terminal device; the first bullet screen is displayed for multimedia data played by the target terminal device;
[0232] The layout module 13 includes: a track height determination unit 131 , a first layer determination unit 132 , a second layer determination unit 133 and a displacement unit 134 .
[0233] The track height determining unit 131 is used to determine the track height of the first bullet screen based on the font size information in the bullet screen setting information of the multimedia data;
[0234] The first layer determination unit 132 is used to determine the first layer from the initial animation file based on the bullet comment content information and the configuration file corresponding to the first bullet comment; the N configuration information includes the configuration information corresponding to the first layer.
[0235] The configuration file corresponding to the first bullet comment also includes data configuration information; the data configuration information includes a key text layer; the key text layer is used to specify a text layer that can carry text content;
[0236] The first layer determination unit 132 includes: a first determination subunit 1321 , a second determination subunit 1322 , a text setting subunit 1323 , a text replacement subunit 1324 and a key layer displacement subunit 1325 .
[0237] The first determining subunit 1321 is used to determine the target animation file based on the barrage content information and the initial animation file if the barrage content information includes barrage text content, and determine the (N-1) layers in the target animation file except the current key text layer as the first layer respectively;
[0238] The second determining subunit 1322 is used to determine the target animation file based on the barrage content information and the initial animation file if the barrage content information does not include barrage text content, and determine N layers in the target animation file as the first layer respectively.
[0239] Wherein, when the bullet-screen content information includes bullet-screen text content, the N second layers include shifted key text layers;
[0240] The text setting subunit 1323 is used to set the barrage text content according to the font size information and the text style in the barrage content information if the barrage content information includes the barrage text content;
[0241] The text replacement subunit 1324 is used to replace the initial text content in the key text layer with the set bullet text content;
[0242] The key layer displacement subunit 1325 is used to displace the replaced key text layer based on the track height of the first bullet commentary to obtain a displaced key text layer; the displaced key text layer is located at the center of the track corresponding to the first bullet commentary.
[0243] The specific implementation methods of the first determination subunit 1321, the second determination subunit 1322, the text setting subunit 1323, the text replacement subunit 1324 and the key layer displacement subunit 1325 can be referred to in the above Figure 3 The description of the key text layer in the corresponding embodiment will not be repeated here.
[0244] The second layer determining unit 133 is used to configure the size attribute of the first layer based on the configuration information corresponding to the first layer to obtain the second layer; the N configuration information include the layer type of the second layer.
[0245] The configuration information corresponding to the first layer includes the layer index relationship of the first layer and the layer type of the first layer;
[0246] The second layer determining unit 133 includes: a scaling subunit 1331 , a width obtaining subunit 1332 , and a size setting subunit 1333 .
[0247] The scaling subunit 1331 is used to scale the first layer based on the layer index relationship of the first layer to obtain the scaled first layer;
[0248] The scaling subunit 1331 is further specifically used for:
[0249] If the layer index relationship of the first layer does not include the parent index relationship of the first layer, scaling the first layer based on the track height of the first bullet chat to obtain the scaled first layer;
[0250] If the layer index relationship of the first layer includes the parent index relationship of the first layer, the parent layer of the first layer is determined based on the parent index relationship, and the first layer is scaled based on the layer height of the parent layer of the first layer to obtain the scaled first layer.
[0251] The width obtaining subunit 1332 is used to obtain the width of the scaled first layer based on the layer type of the first layer.
[0252] The width acquiring subunit 1332 further includes: a first acquiring subunit 13321 and a second acquiring subunit 13322 .
[0253] The first acquisition subunit 13321 is configured to acquire the width of the scaled first layer based on a layer interface if the layer type of the first layer is a non-composite layer type;
[0254] The second acquisition subunit 13322 is used to acquire the width of the scaled first layer based on the layout mode of the first layer and the layer index relationship of the first layer if the layer type of the first layer is a composite layer type.
[0255] The second acquisition subunit 13322 is further specifically used for:
[0256] If the layer type of the first layer is a composite layer type, and the layout mode of the first layer is horizontal linear arrangement, then based on the sub-index relationship in the layer index relationship of the first layer, the sub-layers of the scaled first layer are determined, and the sum of the current widths of the sub-layers of the scaled first layer is determined as the width of the scaled first layer;
[0257] If the layer type of the first layer is a composite layer type, and the layout mode of the first layer is a vertical linear arrangement, then based on the sub-index relationship in the layer index relationship of the first layer, the sub-layers of the scaled first layer are determined, and the maximum current width of the sub-layers of the scaled first layer is determined as the width of the scaled first layer;
[0258] If the layer type of the first layer is a composite layer type and the layout of the first layer is an overlay hierarchical arrangement, the size-specified layer is determined from the configuration information of the first layer, and the current width of the size-specified layer is determined as the width of the scaled first layer; the sub-index relationship in the layer index relationship of the first layer indicates that the sub-layers of the first layer include the size-specified layer.
[0259] The specific implementation of the first acquisition subunit 13321 and the second acquisition subunit 13322 can refer to the above Figure 3 The description of the width of each layer in the corresponding embodiment will not be repeated here.
[0260] The size setting subunit 1333 is used to set the size attribute of the scaled first layer based on the layer type of the first layer and the width of the scaled first layer to obtain the second layer.
[0261] The specific implementation of the scaling subunit 1331, the width acquisition subunit 1332 and the size setting subunit 1333 can be found in the above Figure 3 The description of the second layer in the corresponding embodiment will not be repeated here.
[0262] The displacement unit 134 is used to determine the second layer whose layer type is a composite layer type as a layer to be laid out when N second layers are obtained, and to perform a displacement operation on the layer to be laid out to obtain a first animation file.
[0263] The displacement unit 134 includes: a layer determination subunit 1341 , a first displacement subunit 1342 , a second displacement subunit 1343 and a third displacement subunit 1344 .
[0264] The layer determination subunit 1341 is used to determine the second layer whose layer type belongs to the composite layer type as the layer to be laid out when the N second layers are obtained; the N configuration information includes the configuration information of the layer to be laid out; the configuration information of the layer to be laid out includes the layout mode of the layer to be laid out, the index value of the layer to be laid out and the layer index relationship of the layer to be laid out; the layer index relationship of the layer to be laid out includes the sub-index relationship of the layer to be laid out;
[0265] The first displacement subunit 1342 is used for obtaining the sublayers of the layer to be laid out based on the sub-index relationship of the layer to be laid out, and performing a horizontal displacement operation on each sublayer in turn according to the index value of the sublayer of the layer to be laid out, if the layout mode of the layer to be laid out is horizontal linear arrangement;
[0266] The second displacement subunit 1343 is used for obtaining the sublayers of the layer to be laid out based on the sub-index relationship of the layer to be laid out, and performing a vertical displacement operation on each sublayer in turn according to the index value of the sublayer of the layer to be laid out, if the layout mode of the layer to be laid out is a vertical linear arrangement;
[0267] The third displacement sub-unit 1344 is used to obtain the sub-layers of the layer to be laid out based on the sub-index relationship of the layer to be laid out if the layout mode of the layer to be laid out is a superimposed hierarchical arrangement, and to perform horizontal displacement operations on each sub-layer in turn according to the index value of the sub-layer of the layer to be laid out and the alignment mode of each sub-layer.
[0268] The specific implementation of the layer determination subunit 1341, the first shift subunit 1342, the second shift subunit 1343 and the third shift subunit 1344 can be referred to above. Figure 3 The description of the displacement operation performed on the layout layer in the corresponding embodiment will not be further elaborated here.
[0269] The specific implementation of the track height determination unit 131, the first layer determination unit 132, the second layer determination unit 133 and the displacement unit 134 can be referred to above. Figure 3 The description of step S103 in the corresponding embodiment will not be repeated here.
[0270] Among them, the barrage content information is synchronized by the server when it receives a barrage sending request sent by the business terminal device; the server stores M animation files sent by the operation terminal device and configuration files corresponding to the M animation files; M is a positive integer; the initial animation file is an animation file determined by the server from the M animation files that matches the barrage style of the first barrage; the configuration file corresponding to the first barrage is a configuration file determined by the server from the M configuration files that matches the barrage style of the first barrage.
[0271] Among them, the barrage style of the first barrage is determined by the barrage sending object when sending the barrage content information; or the barrage style of the first barrage is set by the operating object for the multimedia data corresponding to the first barrage.
[0272] The configuration file corresponding to the first bullet chat also includes response rules corresponding to H layers respectively; H is a positive integer less than or equal to N;
[0273] The bullet screen display module 14 is used to display X bullet screens on the terminal interface playing multimedia data; the X bullet screens include the first bullet screen; X is a positive integer;
[0274] The coordinate determination module 15 is used to respond to a trigger operation on the terminal interface and determine the trigger coordinates corresponding to the trigger operation; the trigger coordinates are used to determine the second bullet screen from the X bullet screens; the second bullet screen is the bullet screen corresponding to the trigger operation;
[0275] The layer determination module 16 is used to obtain a target layer for responding to a trigger operation in the first bullet screen based on H layers if the second bullet screen is the first bullet screen.
[0276] The layer determination module 16 includes: a coordinate conversion unit 161 , an array determination unit 162 and a traversal unit 163 .
[0277] The coordinate conversion unit 161 is used to convert the trigger coordinates into relative coordinates for the first bullet screen if the bullet screen corresponding to the trigger operation is the first bullet screen;
[0278] The array determination unit 162 is used to obtain the layer covered by the relative coordinates from the first bullet message, and determine the obtained layer as the layer array corresponding to the trigger operation;
[0279] The traversal unit 163 is used to traverse the layer array based on H layers until the first layer that can respond to the trigger operation is found, and the found layer is determined as the target layer for responding to the trigger operation.
[0280] The specific implementation of the coordinate conversion unit 161, the array determination unit 162 and the traversal unit 163 can be found in the above Figure 7 The description of step S206 in the corresponding embodiment will not be repeated here.
[0281] The operation execution module 17 is used to obtain a target response rule that matches the target layer from the H response rules and execute the business operation corresponding to the target response rule.
[0282] The search module 18 is used to search for a replacement layer if the target response rule includes a replacement layer;
[0283] The replacement module 19 is used to replace the target layer in the first bullet screen with the replacement layer in the first animation file to obtain the replaced first animation file;
[0284] The re-layout module 20 is used to re-layout each layer in the replaced first animation file to obtain a second animation file; the second animation file is used to display the response barrage corresponding to the first barrage after refreshing the barrage player.
[0285] The specific implementation methods of the content acquisition module 11, the file acquisition module 12, the layout module 13, the bullet screen display module 14, the coordinate determination module 15, the layer determination module 16, the operation execution module 17, the search module 18, the replacement module 19 and the re-layout module 20 can be referred to in the above Figure 3 In the corresponding embodiment, steps S101 to S103, the above Figure 7 In the corresponding embodiment, steps S201 to S207 and the above Fig. 9 The description of steps S91 to S99 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.
[0286] For further information, see Fig.13 , Fig.13 Schematic diagram of a computer device provided in an embodiment of the present application. Fig.13 As shown, the computer device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, a memory 1005, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As shown in FIG. Fig.13 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a device control application. In some embodiments, the computer device may also include Fig.13 The user interface 1003 shown, for example, if the computer device is Figure 1 The terminal device shown as having the bullet screen layout function (for example, the terminal device 100a) may further include the user interface 1003, wherein the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the like.
[0287] exist Fig.13 In the computer device 1000 shown, the network interface 1004 is mainly used for network communication; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:
[0288] Get the content information of the first bullet screen;
[0289] Based on the bullet chat style of the first bullet chat, an initial animation file corresponding to the first bullet chat and a configuration file corresponding to the first bullet chat are obtained respectively; the initial animation file includes N layers; the configuration file corresponding to the first bullet chat includes configuration information corresponding to each of the N layers; N is a positive integer;
[0290] Based on the bullet comment content information, the track height of the first bullet comment and the configuration information corresponding to each layer, each layer in the initial animation file is laid out respectively to obtain a first animation file; the first animation file is used to display the first bullet comment.
[0291] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 and Figure 7 The description of the data processing method in the corresponding embodiment can also be performed as described above. Fig.11 In the corresponding embodiment, the data processing device 1 and Fig.12 The description of the data processing device 2 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.
[0292] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, Figure 3 and Figure 7 For details on the data processing methods provided in each step, see Figure 3 as well as Figure 7 The implementation methods provided by each step will not be repeated here.
[0293] The computer-readable storage medium may be the data transmission device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smartmedia card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal 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 may also be used to temporarily store data that has been output or is to be output.
[0294] The present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device can execute the description of the data processing method or device in the above embodiments, which will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated.
[0295] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variation thereof 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.
[0296] 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.
[0297] 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 data processing method, characterized in that: include: Get the content information of the first bullet screen; Based on the bullet screen style of the first bullet screen, respectively obtain an initial animation file corresponding to the first bullet screen and a configuration file corresponding to the first bullet screen; The initial animation file includes N layers; the configuration file corresponding to the first bullet screen includes configuration information corresponding to each of the N layers; N is a positive integer; Based on the barrage content information, the track height of the first barrage and the configuration information corresponding to each layer, each layer in the initial animation file is laid out respectively to obtain a first animation file; the first animation file is used to display the first barrage.
2. The method according to claim 1, characterized in that The barrage content information is synchronized by the server when receiving a barrage sending request sent by a service terminal device; the server stores M animation files sent by the operation terminal device and configuration files corresponding to the M animation files; M is a positive integer; The initial animation file is an animation file determined by the server from the M animation files to match the barrage style of the first barrage; the configuration file corresponding to the first barrage is a configuration file determined by the server from the M configuration files to match the barrage style of the first barrage.
3. The method according to claim 1, characterized in that The barrage style of the first barrage is determined by the object to which the barrage is sent; or the barrage style of the first barrage is set by the operating object for the multimedia data corresponding to the first barrage.
4. The method according to claim 1, characterized in that: The method is executed by a target terminal device; the first bullet screen is displayed for multimedia data played by the target terminal device; The step of respectively laying out each layer in the initial animation file based on the bullet screen content information, the track height of the first bullet screen, and the configuration information corresponding to each layer to obtain a first animation file includes: Determining a track height of the first bullet screen based on the font size information in the bullet screen setting information of the multimedia data; Based on the barrage content information and the configuration file corresponding to the first barrage, determining a first layer from the initial animation file; the N configuration information includes configuration information corresponding to the first layer; Based on the configuration information corresponding to the first layer, the size attribute of the first layer is configured to obtain a second layer; the N configuration information includes a layer type of the second layer; When N second layers are obtained, a second layer whose layer type belongs to a composite layer type is determined as a layer to be laid out, and a displacement operation is performed on the layer to be laid out to obtain a first animation file.
5. The method according to claim 4, characterized in that The configuration file corresponding to the first bullet comment also includes data configuration information; the data configuration information includes a key text layer; the key text layer is used to specify a text layer that can carry text content; The determining the first layer from the initial animation file based on the bullet screen content information and a configuration file corresponding to the first bullet screen includes: If the barrage content information includes barrage text content, a target animation file is determined based on the barrage content information and the initial animation file, and (N-1) layers in the target animation file except the current key text layer are respectively determined as the first layer; If the barrage content information does not include barrage text content, a target animation file is determined based on the barrage content information and the initial animation file, and N layers in the target animation file are respectively determined as first layers.
6. The method according to claim 5, characterized in that When the barrage content information includes barrage text content, the N second layers include shifted key text layers; The method further comprises: If the barrage content information includes barrage text content, setting the barrage text content according to the font size information and the text style in the barrage content information; Replace the initial text content in the key text layer with the set barrage text content; Based on the track height of the first barrage, the replaced key text layer is displaced to obtain the displaced key text layer; the displaced key text layer is located at the center position of the track corresponding to the first barrage.
7. The method according to claim 4, characterized in that The configuration information corresponding to the first layer includes a layer index relationship of the first layer and a layer type of the first layer; The configuring the size attribute of the first layer based on the configuration information corresponding to the first layer to obtain the second layer includes: Based on the layer index relationship of the first layer, scaling the first layer to obtain a scaled first layer; Based on the layer type of the first layer, obtaining the width of the scaled first layer; Based on the layer type of the first layer and the width of the scaled first layer, a size attribute of the scaled first layer is set to obtain a second layer.
8. The method according to claim 7, characterized in that The scaling of the first layer based on the layer index relationship of the first layer and the layout mode of the first layer to obtain the scaled first layer includes: If the layer index relationship of the first layer does not include the parent index relationship of the first layer, scaling the first layer based on the track height of the first bullet comment to obtain the scaled first layer; If the layer index relationship of the first layer includes the parent index relationship of the first layer, the parent layer of the first layer is determined based on the parent index relationship, and the first layer is scaled based on the layer height of the parent layer of the first layer to obtain the scaled first layer.
9. The method according to claim 7, characterized in that: The acquiring, based on the layer type of the first layer, the width of the scaled first layer includes: If the layer type of the first layer is a non-synthesized layer type, obtaining the width of the scaled first layer based on a layer interface; If the layer type of the first layer is a composite layer type, the width of the scaled first layer is obtained based on the layout mode of the first layer and the layer index relationship of the first layer.
10. The method according to claim 9, characterized in that If the layer type of the first layer is a composite layer type, obtaining the width of the scaled first layer based on the layout mode of the first layer and the layer index relationship of the first layer includes: If the layer type of the first layer is a composite layer type, and the layout of the first layer is a horizontal linear arrangement, then based on the sub-index relationship in the layer index relationship of the first layer, the sub-layers of the scaled first layer are determined, and the sum of the current widths of the sub-layers of the scaled first layer is determined as the width of the scaled first layer; If the layer type of the first layer is a composite layer type, and the layout of the first layer is a vertical linear arrangement, then based on the sub-index relationship in the layer index relationship of the first layer, the sub-layers of the scaled first layer are determined, and the maximum current width of the sub-layers of the scaled first layer is determined as the width of the scaled first layer; If the layer type of the first layer is a composite layer type and the layout of the first layer is an overlay hierarchical arrangement, the size specifying layer is determined from the configuration information of the first layer, and the current width of the size specifying layer is determined as the width of the scaled first layer; the sub-index relationship in the layer index relationship of the first layer indicates that the sub-layers of the first layer include the size specifying layer.
11. The method according to claim 4, characterized in that When the N second layers are obtained, determining the second layer whose layer type belongs to the composite layer type as the layer to be laid out, and performing a displacement operation on the layer to be laid out includes: When N second layers are obtained, a second layer whose layer type belongs to a composite layer type is determined as a layer to be laid out; the N configuration information includes configuration information of the layer to be laid out; the configuration information of the layer to be laid out includes a layout mode of the layer to be laid out, an index value of the layer to be laid out, and a layer index relationship of the layer to be laid out; the layer index relationship of the layer to be laid out includes a sub-index relationship of the layer to be laid out; If the layout mode of the layer to be laid out is horizontal linear arrangement, then based on the sub-index relationship of the layer to be laid out, the sub-layers of the layer to be laid out are obtained, and according to the index value of the sub-layer of the layer to be laid out, a horizontal displacement operation is performed on each sub-layer in turn; If the layout mode of the layer to be laid out is vertical linear arrangement, then based on the sub-index relationship of the layer to be laid out, the sub-layers of the layer to be laid out are obtained, and according to the index value of the sub-layer of the layer to be laid out, a vertical displacement operation is performed on each sub-layer in turn; If the layout mode of the layer to be laid out is a superimposed hierarchical arrangement, the sublayers of the layer to be laid out are obtained based on the sub-index relationship of the layer to be laid out, and according to the index value of the sublayer of the layer to be laid out and the alignment mode of each sublayer, each sublayer is shifted horizontally in turn.
12. The method according to claim 1, characterized in that The configuration file corresponding to the first bullet comment also includes response rules corresponding to H layers respectively; H is a positive integer less than or equal to N; The method further comprises: On a terminal interface playing multimedia data, X bullet screens are displayed; the X bullet screens include the first bullet screen; X is a positive integer; In response to a trigger operation on the terminal interface, determining a trigger coordinate corresponding to the trigger operation; the trigger coordinate is used to determine a second bullet screen from the X bullet screens; the second bullet screen is the bullet screen corresponding to the trigger operation; If the second bullet screen is the first bullet screen, based on the H layers, obtaining a target layer for responding to the trigger operation in the first bullet screen; Obtain a target response rule that matches the target layer from the H response rules, and execute a business operation corresponding to the target response rule.
13. The method according to claim 12, characterized in that If the bullet screen corresponding to the trigger operation is the first bullet screen, obtaining a target layer for responding to the trigger operation in the first bullet screen based on the H layers includes: If the bullet screen corresponding to the trigger operation is the first bullet screen, converting the trigger coordinates into relative coordinates for the first bullet screen; Acquire the layer covered by the relative coordinates from the first bullet screen, and determine the acquired layer as the layer array corresponding to the trigger operation; Based on the H layers, the layer array is traversed until the first layer that can respond to the trigger operation is found, and the found layer is determined as the target layer for responding to the trigger operation.
14. The method according to claim 12, characterized in that The method further comprises: If the target response rule includes a replacement layer, searching for the replacement layer; In the first animation file, replacing the target layer in the first bullet screen with the replacement layer to obtain a replaced first animation file; Each layer in the replaced first animation file is re-layed out to obtain a second animation file; the second animation file is used to display the response barrage corresponding to the first barrage after refreshing the barrage player.
15. A data processing device, characterized in that: include: A content acquisition module, used to acquire the content information of the first bullet screen; A file acquisition module, used to acquire, based on the barrage style of the first barrage, an initial animation file corresponding to the first barrage and a configuration file corresponding to the first barrage; The initial animation file includes N layers; the configuration file corresponding to the first bullet screen includes configuration information corresponding to each of the N layers; N is a positive integer; A layout module is used to layout each layer in the animation file based on the barrage content information, the track height of the first barrage and the configuration information corresponding to each layer to obtain a first animation file; the first animation file is used to display the first barrage.
16. A computer device, characterized in that: include: processor and memory and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method described in any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 14.
18. A computer program product, characterized in that The computer program product comprises a computer program, which is stored in a computer-readable storage medium. The computer program is suitable for being read and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 14.
