Live broadcast special effects processing method, device, computer equipment and storage medium
By detecting and calculating the position changes of the special effect interactive objects, a new special effect trajectory is generated, which solves the problem of poor effect caused by straight line trajectories, and improves the display effect and user experience of live special effects.
Patent Information
- Application Number
- CN202310669487.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-06-06
AI Technical Summary
Among the existing live broadcast special effects processing methods, the special effects trajectory is processed in a straight line, resulting in poor results and cannot adapt to changes in anchor positions.
By detecting the position changes of the special effect interactive object in the live broadcast page, the offset information of the target start point, end point and track point are calculated, and the changing track point positions are generated, and a new special effect track is generated based on these positions.
It improves the display effect of live broadcast special effects, makes the special effects track structure more natural, and improves the user's viewing experience.
Smart Images

Figure CN116567360B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and specifically to a method, apparatus, computer equipment, and storage medium for processing special effects for a live broadcast, wherein the storage medium is a computer-readable storage medium. Background Art
[0002] With the development of Internet technology and communication technology, watching live broadcasts has become a common entertainment activity. In order to improve the user's viewing experience, some live broadcast platforms provide functions that allow users to interact with the anchor in the live broadcast room, such as special effect gifts. After such gifts are sent, not only special effects will be played, but also the anchor can interact, improving the user experience. However, the anchor's position on the live broadcast page may change. Currently, in response to the situation of position changes, most special effects process the trajectory of the special effects as a straight line. The special effects processing of straight line trajectories is simple, but the special effects effect is poor. Summary of the Invention
[0003] The embodiments of the present application provide a live broadcast special effects processing method, apparatus, computer equipment, and computer-readable storage medium to improve the display effect of live broadcast special effects.
[0004] In a first aspect, an embodiment of the present application provides a live broadcast special effects processing method, which displays a live broadcast page through a user graphical interface provided by a terminal device, wherein the live broadcast page includes a special effect interaction object and a live broadcast special effect for the special effect interaction object, including:
[0005] Detecting the position of the special effect interactive object in the live broadcast page;
[0006] If the position of the special effect interaction object in the live broadcast page changes, determine the target starting position and target ending position of the live broadcast special effect according to the changed position of the special effect interaction object;
[0007] Obtaining first start-end offset information of an initial end position relative to an initial starting position in a special effect track of the live special effect, and track point offset information of a track point position in the middle of the special effect track relative to the initial starting position;
[0008] Calculating second start-end offset information of the target end position relative to the target starting position;
[0009] Calculating a changed track point position of the track point according to the track point offset information, the first start and end offset information, and the second start and end offset information;
[0010] The changed trajectory of the live broadcast special effect is generated according to the target starting position, the target ending position and the changed trajectory point position of the trajectory point, and the live broadcast special effect is displayed on the live broadcast page based on the changed trajectory.
[0011] In a second aspect, an embodiment of the present application further provides a live special effects processing device, comprising:
[0012] A detection unit, configured to detect the position of the special effect interactive object in the live broadcast page;
[0013] a position determining unit, configured to determine a target starting position and a target ending position of the live special effect according to the changed position of the special effect interactive object if the position of the special effect interactive object in the live page changes;
[0014] an acquiring unit, configured to acquire first start-end offset information of an initial end position relative to an initial starting position in a special effect track of the live special effect, and track point offset information of a track point position in the middle of the special effect track relative to the initial starting position;
[0015] an offset information calculation unit, configured to calculate second start-end offset information of the target end position relative to the target start position;
[0016] a position calculation unit, configured to calculate a changed position of the trajectory point according to the trajectory point offset information, the first start and end offset information, and the second start and end offset information;
[0017] A generating unit is used to generate a changed trajectory of the live broadcast special effect according to the target starting position, the target ending position and the changed trajectory point position of the trajectory point, and display the live broadcast special effect on the live broadcast page based on the changed trajectory.
[0018] In a third aspect, an embodiment of the present application also provides a computer device comprising a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any one of the live special effects processing methods provided in the embodiments of the present application.
[0019] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which is used to store a computer program, and the computer program is loaded by a processor to execute any live special effects processing method provided in the embodiment of the present application.
[0020] The embodiment of the present application detects the position of the special effect interaction object in the live broadcast page; if the position of the special effect interaction object in the live broadcast page changes, determines the target starting position and target ending position of the live broadcast special effect according to the changed position of the special effect interaction object; obtains the first start-end offset information of the initial ending position relative to the initial starting position in the special effect trajectory of the live broadcast special effect, and the trajectory point offset information of the trajectory point position in the middle of the special effect trajectory relative to the initial starting position; calculates the second start-end offset information of the target ending position relative to the target starting position; calculates the changed trajectory point position of the trajectory point according to the trajectory point offset information, the first start-end offset information and the second start-end offset information; generates a changed trajectory of the live broadcast special effect according to the target starting position, the target ending position and the changed trajectory point position of the trajectory point, and displays the live broadcast special effect on the live broadcast page based on the changed trajectory.
[0021] The embodiment of the present application determines the changed position of the trajectory point through the initial end point, the target end point and the offset information of the trajectory point, and generates a changed trajectory according to the target starting position, the target end point and the changed position of the trajectory point. The changed position of the trajectory point is determined based on the offset information, so that the offset information of the trajectory point corresponding to the changed position in the newly generated special effect trajectory matches the offset information of the trajectory point. The special effect trajectory generated based on the changed position can restore the trajectory structure of the special effect trajectory and improve the display effect of the live special effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 This is a flowchart of the live broadcast special effects processing method provided by an embodiment of the present application;
[0024] Figure 2 This is a schematic diagram of the special effect trajectory provided by the embodiment of the present application;
[0025] Figure 3 Schematic diagram of a live broadcast special effects processing device provided in an embodiment of the present application;
[0026] Figure 4 It is a structural diagram of the computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0028] The embodiments of the present application provide a method, apparatus, computer device, and computer-readable storage medium for processing live special effects. The live special effects processing apparatus can be integrated into a computer device, which can be a server or a terminal.
[0029] The terminal may include a mobile phone, a wearable smart device, a tablet computer, a laptop computer, a personal computer (PC), and a vehicle-mounted computer.
[0030] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.
[0031] It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
[0032] This embodiment will be described from the perspective of a live broadcast special effects processing device, which can be specifically integrated into a computer device, which can be a server, a terminal, or other device.
[0033] The embodiment of the present application provides a live broadcast special effect processing method, which displays a live broadcast page through a user graphical interface provided by a terminal device, wherein the live broadcast page includes a special effect interaction object and a live broadcast special effect for the special effect interaction object, such as Figure 1 As shown, the specific process of the live special effects processing method can be as follows:
[0034] 101. Detect the position of the special effect interactive object in the live broadcast page.
[0035] Among them, live broadcast special effects may include special effects used to increase the fun of live broadcasts. Users can interact with the host by giving virtual items (such as gifts and flowers, etc.) while watching the live broadcast. Live broadcast special effects may include moving the virtual items given by the user in a trajectory in front of the host. Therefore, the host can be the special effect interaction object of the host special effect. The special effect interaction object can also be other people in the live broadcast. The special effect interaction object can also be some objects, or a certain image area of a live broadcast window, etc. For example, the user can specify the end point of the virtual item's movement, and the image area where the user-specified end point is located is determined as the special effect interaction object.
[0036] Among them, the special effect trajectory is the trajectory of the movement of the live broadcast special effect. For example, the live broadcast special effect presentation effect can be a virtual gift moving on the live broadcast page, and its moving trajectory is the special effect trajectory.
[0037] The position of the special effect interactive object in the live broadcast page may change. For example, when the special effect interactive object in reality moves, the position of the special effect interactive object in the live broadcast page will change accordingly. The position of the special effect interactive object in the live broadcast page can be determined based on the object recognition result by performing object recognition on the live broadcast page. That is, in one embodiment, the step of "detecting the position of the special effect interactive object in the live broadcast page" may specifically include:
[0038] Perform object recognition on the live broadcast page to determine the object area on the live broadcast page that contains special effect interactive objects;
[0039] Determine the position of the special effect interactive object in the live broadcast page based on the position information of the object area.
[0040] For example, the target recognition algorithm can be used to detect the image area where the special effect interactive object is located from the live broadcast page, that is, the object area, and the position of the special effect interactive object in the live broadcast page is determined based on the information of the object area.
[0041] In addition to the fact that the movement of the special effect interactive object in reality causes the position of the special effect interactive object in the live broadcast page to change, the change in the size of the live broadcast page will also cause the position of the special effect interactive object in the live broadcast page to change. For example, the live broadcast page can be considered to be displayed through a software window provided by the client. The live broadcast page may include a live broadcast window, which is used to display live broadcast content. When the size of the live broadcast page changes, the size of the live broadcast window will also change adaptively. When the size of the live broadcast window changes, the position of the special effect interactive object also changes. Therefore, the position of the special effect interactive object can be detected according to the size of the live broadcast window. That is, in one embodiment, the live broadcast page includes a live broadcast window, and the live broadcast window displays live broadcast content. The step of "detecting the position of the special effect interactive object in the live broadcast page" may specifically include:
[0042] Detect the window size of the live broadcast window;
[0043] If the size of the live broadcast window changes, the position of the special effect interaction object in the live broadcast window after the change is determined according to the window size after the change.
[0044] Generally speaking, the software window, live broadcast window, and special effect display window belong to three different levels of windows. Among them, the scaling of the software window will affect the size and position of the live broadcast window and the special effect window. When the software window is scaled, the display position of the live broadcast window is determined by positioning logic, and the display position information indicates the display area of the live broadcast window. When the display position information of the live broadcast window changes, the window size of the live broadcast window changes, and the position of the special effect interactive object also changes accordingly. The position of the special effect object in the changed live broadcast window can be determined according to the scaling ratio.
[0045] And the display position information of the live broadcast window is passed to the special effect window to determine the starting position and the end position of the special effect track.
[0046] 102. If the position of the special effect interaction object in the live broadcast page changes, the target starting position and target ending position of the live broadcast special effect are determined according to the changed position of the special effect interaction object.
[0047] Among them, before the position of the special effect interactive object changes, the starting point of the special effect trajectory of the live broadcast special effect is the initial starting point, and the end point is the initial end point. Optionally, the initial starting point can also be the starting point when the live broadcast special effect is first displayed on the live broadcast page, and the initial end point can also be the end point when the live broadcast special effect is first displayed on the live broadcast page; optionally, the initial starting point can also be a preset starting point, and the initial end point can also be a preset end point.
[0048] After the position of the special effect interaction object changes, the starting point of the special effect trajectory of the live special effect is re-determined as the target starting point, and the end point is the target end point.
[0049] For example, if the position change of the special effect interactive object is caused by the movement of the special effect interactive object in reality, the position of the initial starting point can be used as the position of the target starting point, and the position of the special effect interactive object after the change can be used as the position of the target end point.
[0050] If the position change of the special effect interactive object is caused by the change in the size of the live broadcast window, the target starting position and the target end position can be determined based on the size of the live broadcast window after the change. It can be considered that the relative position of the special effect interactive object in the live broadcast window remains unchanged. That is, in one embodiment, the step of "determining the target starting position and the target end position of the live broadcast special effect based on the position of the special effect interactive object after the change" can specifically include:
[0051] The changed position of the special effect interaction object is determined as the target end position of the live special effect;
[0052] The target starting position of the live special effect is determined based on the window size of the live window after the change and the initial starting position of the live special effect.
[0053] For example, the position of the special effect interaction object after the change is determined as the target end position of the live special effect, and the target starting position of the special effect trajectory is determined after the window size of the live window changes based on the relative position of the initial starting point of the live special effect in the live window before the change.
[0054] 103. Obtain first start-end offset information of an initial end position relative to an initial start position in a special effect track of the live special effect, and track point offset information of a track point position in the middle of the special effect track relative to the initial start position.
[0055] The first start-end offset information may represent the degree of offset of the initial end point relative to the initial start point, and the track point offset information may represent the degree of offset of the track point in the special effect track relative to the initial start point.
[0056] For example, in a two-dimensional live broadcast scenario, the initial starting point position, the initial end point position and the trajectory point position can all be represented by two-dimensional coordinates. The offset information can include horizontal offset and vertical offset. For the horizontal offset in the first start-end offset information, it can be calculated based on the horizontal position of the initial end point and the horizontal position of the initial starting point.
[0057] Assume that the initial starting point position is (3, 2), the initial end point position is (9, 12), and the track point position of one of the track points is (-2, 8). For the initial end point, its horizontal offset is 9-3=6, and its vertical translation is 12-2=10. Therefore, the first start and end offset information includes 6 and 10, which means moving 6 units to the right and 10 units upward from the initial starting point position to reach the position of the initial end point.
[0058] For the track point, its horizontal offset is -2-3=-5, and its vertical translation is 8-2=6, so the track point offset information includes -5 and 6, which means moving 5 units to the left and 6 units upward from the initial starting position to reach the position of the track point.
[0059] It can be understood that the absolute value of the offset represents the offset distance, and the sign of the offset represents the direction of movement. The coordinate axis can be flexibly set according to the needs of the actual scene.
[0060] The special effects processing method provided in the embodiment of the present application can also be applied to three-dimensional live broadcast scenes. In the three-dimensional live broadcast scene, the position can be represented by three-dimensional coordinates, and the offset information can include the offset in three directions. The calculation method of the offset information can refer to the relevant instructions applied to the two-dimensional live broadcast scene, which will not be repeated here.
[0061] 104. Calculate second start-end offset information of the target end position relative to the target start position.
[0062] The second start-end offset information may represent the degree of offset of the target end point relative to the target start point.
[0063] The specific calculation method is referred to step 103 and will not be described in detail here.
[0064] 105. Calculate the changed position of the track point according to the track point offset information, the first start and end offset information, and the second start and end offset information.
[0065] In order to ensure that the deformation of the special effect track of the live special effect is small when the position of the special effect interactive object changes, this can be achieved by maintaining a consistent ratio of the offset degree of the track point to the overall offset of the special effect track. For example, the ratio of the track point in the special effect track before the change to the overall offset of the special effect track can be determined, and it is ensured that the ratio of the track point to the overall offset of the special effect track after the change remains unchanged. That is, in one embodiment, the offset information includes an offset and a vertical offset. The step of "calculating the position of the track point after the change based on the track point offset information, the first start-end offset information, and the second start-end offset information" can specifically include:
[0066] Calculating a first ratio between a horizontal offset of the track point and a horizontal offset of the initial end point, and calculating a second ratio between a vertical offset of the track point and a vertical offset of the initial end point;
[0067] Calculating the changed horizontal position of the trajectory point according to the horizontal offset of the second start and end offset information and the first ratio;
[0068] Calculating the changed vertical position of the trajectory point according to the vertical offset of the second start-end offset information and the second ratio;
[0069] The changed position of the trajectory point is obtained according to the changed horizontal position and the changed vertical position.
[0070] The ratio can be a positive number or a negative number. For example, for the horizontal direction, a positive number indicates movement to the right, and a negative number indicates movement to the left; for the vertical direction, a positive number indicates movement upward, and a negative number indicates movement downward.
[0071] For example, in the horizontal direction, a first ratio between the horizontal offset of the trajectory point and the horizontal offset of the initial end point is calculated, the absolute value of the ratio is the horizontal offset ratio, and the sign of the ratio is the horizontal offset direction.
[0072] The horizontal offset in the first start-end offset information is multiplied by the first ratio of the track point to obtain the changed horizontal position of the track point.
[0073] For example, in the vertical direction, a second ratio between the vertical offset of the trajectory point and the vertical offset of the initial end point is calculated, the absolute value of the ratio is the vertical offset ratio, and the sign of the ratio is the vertical offset direction.
[0074] The vertical offset in the first start-end offset information is multiplied by the second ratio of the track point to obtain the changed vertical position of the track point.
[0075] for example, Figure 2 The special effect trajectory on the left is the special effect trajectory of the live special effect before the position of the special effect interactive object changes, where the starting point is (x1, y1) and the end point is (x2, y2). One of the trajectory points is (x0, y0). Assuming that the special effect trajectory of the live special effect after the position of the special effect interactive object changes, the starting point is (x′1, y′1) and the end point is (x′2, y′2). The position of the trajectory point after the change can be calculated based on the following formula (x′0, y′0).
[0076] (x0-x1) / (x2-x1)=(x′0-x′1) / (x′2-x′1)
[0077] (y0-y1) / (y2-y1)=(y′0-y′1) / (y′2-y′1)
[0078] The special effect trajectory can be sampled to obtain multiple trajectory points, and the changed position of each trajectory point is calculated. According to the changed position of each trajectory point and the target starting position and target end position, the following can be obtained: Figure 2 The special effect track on the right side of the picture shows the changed track.
[0079] Since the overall offset ratio of the trajectory point relative to the special effect trajectory is the same before and after the change, and the offset direction of the trajectory point remains unchanged relative to the overall offset direction of the special effect trajectory, the newly generated special effect trajectory can restore the original trajectory structure of the special effect trajectory, and the live broadcast special effect presentation effect is natural, which can improve the display effect of the live broadcast special effect and enhance the user's viewing experience.
[0080] 106. Generate a changed trajectory of a live broadcast special effect according to the target starting position, the target ending position, and the changed trajectory point position of the trajectory point, and display the live broadcast special effect on the live broadcast page based on the changed trajectory.
[0081] For example, based on the target starting point position, the target end point position and the changed trajectory point position of the trajectory point, a changed trajectory of a live broadcast special effect including the target starting point, the target end point and the trajectory point can be generated, and the live broadcast special effect can be displayed on the live broadcast page based on the changed trajectory.
[0082] The changed trajectory may be generated by interpolation, or by a neural network model. Optionally, the changed trajectory may be generated by curve fitting. That is, in one embodiment, the step of "generating a changed trajectory of a live broadcast special effect according to the changed positions of the target starting position, the target end position, and the intermediate sampling points, and displaying the live broadcast special effect on the live broadcast page based on the changed trajectory" may specifically include:
[0083] Perform curve fitting based on the target starting position, target end position and the changed position of the trajectory point to obtain the changed trajectory of the live special effect;
[0084] Display live effects on the live page based on the changed trajectory.
[0085] For example, a Bezier curve formula can be used to fit the target starting point, target end point, and trajectory points to obtain the changed trajectory of the live special effect. The live special effect is displayed based on the changed trajectory.
[0086] Optionally, since the special effect interaction object may change position at the beginning of the live broadcast special effect, or it may change position after the live broadcast special effect starts, if the special effect interaction object changes position after the live broadcast special effect starts, then the first track point corresponding to the current display progress of the live broadcast special effect when the special effect interaction object changes position can be determined. For example, the live broadcast special effect is to move the gift given by the user along the special effect track to the front of the anchor. When the gift moves to point A, the anchor's position changes. Point A is the first track point corresponding to the current display progress of the live broadcast special effect.
[0087] According to step 105 , the changed position of the first track point can be calculated to obtain the second track point, and then the live broadcast special effect can be displayed starting from the second track point of the changed track.
[0088] Optionally, if the position change of the special effect interactive object is caused by the change in the size of the live broadcast window, the live broadcast special effect can be displayed based on the changed trajectory according to the above method; if the position change of the special effect interactive object is caused by the movement of the special effect interactive object in reality, the first trajectory point and the second trajectory point can be curve fitted to obtain a curved trajectory from the first trajectory point to the second trajectory point, and then the live broadcast special effect is displayed based on the curved trajectory, and then the live broadcast special effect is displayed starting from the second trajectory point of the changed trajectory.
[0089] Optionally, the closest track point to the first track point in the changed track can also be determined. After the position of the special effect object changes, the special effect track moves from the first track point to the closest track point, and then moves from the closest track point to the target track point. That is, in one embodiment, the step of "displaying the live special effect on the live broadcast page based on the changed track" can specifically include:
[0090] Determine the target trajectory point corresponding to the display progress of the live special effect when the position of the special effect interactive object changes;
[0091] According to the trajectory point position of the target trajectory point, the nearest trajectory point with the shortest distance to the target trajectory point is selected from the changed trajectory;
[0092] Perform curve fitting on the target trajectory point and the nearest trajectory point to obtain the target special effect trajectory from the target trajectory point to the nearest trajectory point;
[0093] Splicing the special effect track of the part of the changed track that is later than the nearest track point with the target special effect track to obtain a spliced special effect track;
[0094] After the position of the special effect interaction object changes, the live special effect is displayed based on the spliced special effect track.
[0095] When determining that the position of the special effect interactive object has changed, the display progress of the live special effect is determined, and the displayed trajectory segment is determined according to the display progress. The end point of the trajectory segment is the target trajectory point, and the nearest trajectory point closest to the target trajectory point is selected from the changed trajectory according to the trajectory point position of the target trajectory point.
[0096] Then, curve fitting is performed on the target trajectory point and the nearest trajectory point to obtain the target special effect trajectory from the target trajectory point to the nearest trajectory point; the special effect trajectory of the part of the changed trajectory that is displayed later than the nearest trajectory point is spliced with the target special effect trajectory to obtain a spliced special effect trajectory; after the position of the special effect interactive object changes, the live broadcast special effect is displayed based on the spliced special effect trajectory.
[0097] It is understandable that the special effect interactive object may undergo multiple position changes. For each position change, the corresponding special effect trajectory after the position change can be determined based on steps 101-106. The starting point of the special effect trajectory most recently displayed before the position change can be used as the initial starting point, and the end point of the special effect trajectory most recently displayed can be used as the initial end point.
[0098] As can be seen from the above, the embodiment of the present application detects the position of the special effect interaction object in the live broadcast page; if the position of the special effect interaction object in the live broadcast page changes, the target starting position and target ending position of the live broadcast special effect are determined according to the changed position of the special effect interaction object; the first start and end offset information of the initial ending position relative to the initial starting position in the special effect trajectory of the live broadcast special effect, and the trajectory point offset information of the trajectory point position in the middle of the special effect trajectory relative to the initial starting position are obtained; the second start and end offset information of the target ending position relative to the target starting position is calculated; the changed trajectory point position of the trajectory point is calculated according to the trajectory point offset information, the first start and end offset information and the second start and end offset information; the changed trajectory of the live broadcast special effect is generated according to the target starting position, the target ending position and the changed trajectory point position of the trajectory point, and the live broadcast special effect is displayed on the live broadcast page based on the changed trajectory.
[0099] The embodiment of the present application determines the changed position of the trajectory point through the initial end point, the target end point and the offset information of the trajectory point, and generates a changed trajectory according to the target starting position, the target end point and the changed position of the trajectory point. The changed position of the trajectory point is determined based on the offset information, so that the offset information of the trajectory point corresponding to the changed position in the newly generated special effect trajectory matches the offset information of the trajectory point. The special effect trajectory generated based on the changed position can restore the trajectory structure of the special effect trajectory and improve the display effect of the live special effect.
[0100] In order to facilitate the better implementation of the live special effects processing method provided in the embodiment of the present application, a live special effects processing device is also provided in one embodiment. The meanings of the terms are the same as those in the above live special effects processing method, and the specific implementation details can be referred to the description in the method embodiment.
[0101] The live special effects processing device can be integrated into a computer device, such as Figure 3 As shown, the live special effects processing device may include: a detection unit 301, a position determination unit 302, an acquisition unit 303, an offset information calculation unit 304, a position calculation unit 305 and a generation unit 306, specifically as follows:
[0102] (1) Detection unit 301: used to detect the position of the special effect interactive object in the live broadcast page.
[0103] In one embodiment, the live broadcast page includes a window, and the live broadcast window displays live broadcast content. The detection unit 301 may include a window detection subunit and a first position determination subunit. Specifically:
[0104] Window detection subunit: used to detect the window size of the live broadcast window;
[0105] The first position determination subunit is used to determine the position of the special effect interaction object in the live broadcast window after the size of the live broadcast window changes according to the changed window size of the live broadcast window.
[0106] In one embodiment, the first position determination subunit may include an end position determination module and a start position determination module, specifically:
[0107] End point position determination module: used to determine the changed position of the special effect interaction object as the target end point position of the live special effect;
[0108] Starting point position module: used to determine the target starting point position of the live special effect based on the window size after the live window changes and the initial starting point position of the live special effect.
[0109] In one embodiment, the detection unit 301 may include an identification subunit and a second position determination subunit, specifically:
[0110] Identification subunit: used to identify objects on the live page and determine the object area on the live page that contains special effect interactive objects;
[0111] The second position determination subunit is used to determine the position of the special effect interactive object in the live broadcast page according to the position information of the object area.
[0112] (2) Position determination unit 302: used to determine the target starting position and target ending position of the live special effect according to the changed position of the special effect interaction object if the position of the special effect interaction object in the live page changes.
[0113] (3) Acquisition unit 303: used to obtain first start-end offset information of the initial end position relative to the initial start position in the special effect trajectory of the live special effect, and track point offset information of the track point position in the middle of the special effect trajectory relative to the initial start position.
[0114] (4) Offset information calculation unit 304: used to calculate the second start-end offset information of the target end position relative to the target start position.
[0115] (5) Position calculation unit 305: used to calculate the position of the track point after the change according to the track point offset information, the first start and end offset information and the second start and end offset information.
[0116] In one embodiment, the offset information includes an offset and a vertical offset. The position calculation unit 305 may include a ratio calculation subunit, a horizontal position calculation subunit, a vertical position calculation subunit, and a changed position determination subunit. Specifically:
[0117] Ratio calculation subunit: used to calculate the ratio between the horizontal offset of the track point and the horizontal offset of the initial end point, and calculate the ratio between the vertical offset of the track point and the vertical offset of the initial end point;
[0118] A horizontal position calculation subunit: configured to calculate the changed horizontal position of the trajectory point according to the horizontal offset of the second start and end offset information and the first ratio;
[0119] A vertical position calculation subunit is configured to calculate the changed vertical position of the trajectory point according to the vertical offset of the second start-end offset information and the second ratio;
[0120] The changed position determination subunit is used to obtain the changed position of the trajectory point according to the changed horizontal position and the changed vertical position.
[0121] (6) Generating unit 306: used to generate a changed trajectory of a live broadcast special effect according to the target starting position, the target ending position and the changed trajectory point position of the trajectory point, and display the live broadcast special effect on the live broadcast page based on the changed trajectory.
[0122] In one embodiment, the generating unit 306 may include a fitting subunit and a display subunit, specifically:
[0123] Fitting subunit: used to perform curve fitting based on the target starting position, target end position and the changed position of the trajectory point to obtain the changed trajectory of the live special effect;
[0124] Display subunit: used to display live effects on the live page based on the changed trajectory.
[0125] In one embodiment, the display subunit may include a trajectory point determination module, a selection module, a curve fitting module, a splicing module, and a special effect display module. Specifically:
[0126] Track point determination module: used to determine the target track point corresponding to the display progress of the live special effect when the position of the special effect interactive object changes;
[0127] Selection module: used to select the nearest trajectory point with the closest distance to the target trajectory point from the changed trajectory according to the trajectory point position of the target trajectory point;
[0128] Curve fitting module: used to perform curve fitting on the target trajectory point and the nearest trajectory point to obtain the target special effect trajectory from the target trajectory point to the nearest trajectory point;
[0129] Splicing module: used to splice the special effect track of the changed track whose display timing is later than the nearest track point with the target special effect track to obtain the spliced special effect track;
[0130] Special effects display module: used to display live special effects based on the spliced special effects trajectory after the position of the special effects interactive object changes.
[0131] As can be seen from the above, in the embodiment of the present application, the live broadcast special effects processing device detects the position of the special effects interactive object in the live broadcast page through the detection unit 301; if the position of the special effects interactive object in the live broadcast page changes, the position determination unit 302 determines the target starting position and target ending position of the live broadcast special effect according to the changed position of the special effects interactive object; the acquisition unit 303 obtains the first start and end offset information of the initial ending position relative to the initial starting position in the special effects trajectory of the live broadcast special effect, and the trajectory point offset information of the trajectory point position in the middle of the special effects trajectory relative to the initial starting position; the offset information calculation unit 304 calculates the second start and end offset information of the target ending position relative to the target starting position; the position calculation unit 305 calculates the changed trajectory point position of the trajectory point according to the trajectory point offset information, the first start and end offset information and the second start and end offset information; the generation unit 306 generates the changed trajectory of the live broadcast special effect according to the target starting position, the target ending position and the changed trajectory point position of the trajectory point, and displays the live broadcast special effect on the live broadcast page based on the changed trajectory.
[0132] The embodiment of the present application determines the changed position of the trajectory point through the initial end point, the target end point and the offset information of the trajectory point, and generates a changed trajectory according to the target starting position, the target end point and the changed position of the trajectory point. The changed position of the trajectory point is determined based on the offset information, so that the offset information of the trajectory point corresponding to the changed position in the newly generated special effect trajectory matches the offset information of the trajectory point. The special effect trajectory generated based on the changed position can restore the trajectory structure of the special effect trajectory and improve the display effect of the live special effect.
[0133] Accordingly, the embodiment of the present application also provides a computer device, which can be a terminal or a server. Figure 4 As shown, Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 500 includes a processor 501 having one or more processing cores, a memory 502 having one or more computer-readable storage media, and a computer program stored in the memory 502 and executable on the processor. The processor 501 is electrically connected to the memory 502. Those skilled in the art will appreciate that the computer device structure shown in the figure does not constitute a limitation of the computer device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0134] The processor 501 is the control center of the computer device 500. It uses various interfaces and lines to connect various parts of the entire computer device 500. By running or loading software programs and / or modules stored in the memory 502 and calling data stored in the memory 502, it executes various functions of the computer device 500 and processes data, thereby monitoring the computer device 500 as a whole.
[0135] In the embodiment of the present application, the processor 501 in the computer device 500 loads instructions corresponding to one or more application processes into the memory 502 according to the following steps, and the processor 501 runs the application stored in the memory 502 to implement various functions:
[0136] Displaying a live broadcast page through a user graphical interface provided by a terminal device, the live broadcast page including special effect interaction objects and live broadcast special effects for the special effect interaction objects;
[0137] Detect the position of special effect interactive objects in the live broadcast page;
[0138] If the position of the special effect interaction object in the live broadcast page changes, the target starting position and target ending position of the live broadcast special effect are determined according to the changed position of the special effect interaction object;
[0139] Obtaining first start-end offset information of an initial end position relative to an initial start position in a special effect track of a live special effect, and track point offset information of a track point position in the middle of the special effect track relative to the initial start position;
[0140] Calculate the second start-end offset information of the target end position relative to the target start position;
[0141] Calculating the position of the track point after the change according to the track point offset information, the first start and end offset information, and the second start and end offset information;
[0142] A changed trajectory of a live broadcast special effect is generated according to the target starting position, the target ending position and the changed trajectory point position, and the live broadcast special effect is displayed on the live broadcast page based on the changed trajectory.
[0143] In one embodiment, the live broadcast page includes a window, the live broadcast window displays live broadcast content, and the live broadcast page is displayed through the live broadcast window. The step of "detecting the position of the special effect interactive object in the live broadcast page" may include:
[0144] Detect the window size of the live broadcast window;
[0145] If the size of the live broadcast window changes, the position of the special effect interaction object in the live broadcast window after the change is determined according to the window size after the change.
[0146] In one embodiment, the step of “determining the target starting position and target ending position of the live special effect based on the changed position of the special effect interactive object” may include:
[0147] The changed position of the special effect interaction object is determined as the target end position of the live special effect;
[0148] The target starting position of the live special effect is determined based on the window size of the live window after the change and the initial starting position of the live special effect.
[0149] In one embodiment, the step of “detecting the position of the special effect interactive object in the live broadcast page” may include:
[0150] Perform object recognition on the live broadcast page to determine the object area on the live broadcast page that contains special effect interactive objects;
[0151] Determine the position of the special effect interactive object in the live broadcast page based on the position information of the object area.
[0152] In one embodiment, the offset information includes an offset and a vertical offset. The step of “calculating the position of the track point after the change based on the track point offset information, the first start and end offset information, and the second start and end offset information” may include:
[0153] Calculate the ratio between the horizontal offset of the track point and the horizontal offset of the initial end point, and calculate the ratio between the vertical offset of the track point and the vertical offset of the initial end point;
[0154] Calculating the changed horizontal position of the trajectory point according to the horizontal offset of the second start and end offset information and the first ratio;
[0155] Calculating the changed vertical position of the trajectory point according to the vertical offset of the second start-end offset information and the second ratio;
[0156] The changed position of the trajectory point is obtained according to the changed horizontal position and the changed vertical position.
[0157] In one embodiment, the step of “generating a changed trajectory of a live broadcast special effect based on the changed positions of the target starting position, the target ending position, and the intermediate sampling points, and displaying the live broadcast special effect on the live broadcast page based on the changed trajectory” may include:
[0158] Perform curve fitting based on the target starting position, target end position and the changed position of the trajectory point to obtain the changed trajectory of the live special effect;
[0159] Display live effects on the live page based on the changed trajectory.
[0160] In one embodiment, the step of “displaying a live broadcast special effect on the live broadcast page based on the changed trajectory” may include:
[0161] Determine the target trajectory point corresponding to the display progress of the live special effect when the position of the special effect interactive object changes;
[0162] According to the trajectory point position of the target trajectory point, the nearest trajectory point with the shortest distance to the target trajectory point is selected from the changed trajectory;
[0163] Perform curve fitting on the target trajectory point and the nearest trajectory point to obtain the target special effect trajectory from the target trajectory point to the nearest trajectory point;
[0164] Splicing the special effect track of the part of the changed track that is later than the nearest track point with the target special effect track to obtain a spliced special effect track;
[0165] After the position of the special effect interaction object changes, the live special effect is displayed based on the spliced special effect track.
[0166] As can be seen from the above, the embodiment of the present application detects the position of the special effect interaction object in the live broadcast page; if the position of the special effect interaction object in the live broadcast page changes, the target starting position and target ending position of the live broadcast special effect are determined according to the changed position of the special effect interaction object; the first start and end offset information of the initial ending position relative to the initial starting position in the special effect trajectory of the live broadcast special effect, and the trajectory point offset information of the trajectory point position in the middle of the special effect trajectory relative to the initial starting position are obtained; the second start and end offset information of the target ending position relative to the target starting position is calculated; the changed trajectory point position of the trajectory point is calculated according to the trajectory point offset information, the first start and end offset information and the second start and end offset information; the changed trajectory of the live broadcast special effect is generated according to the target starting position, the target ending position and the changed trajectory point position of the trajectory point, and the live broadcast special effect is displayed on the live broadcast page based on the changed trajectory.
[0167] The embodiment of the present application determines the changed position of the trajectory point through the initial end point, the target end point and the offset information of the trajectory point, and generates a changed trajectory according to the target starting position, the target end point and the changed position of the trajectory point. The changed position of the trajectory point is determined based on the offset information, so that the offset information of the trajectory point corresponding to the changed position in the newly generated special effect trajectory matches the offset information of the trajectory point. The special effect trajectory generated based on the changed position can restore the trajectory structure of the special effect trajectory and improve the display effect of the live special effect.
[0168] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0169] Optional, such as Figure 4As shown, the computer device 500 further includes: a touch screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. Among them, the processor 501 is electrically connected to the touch screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507 respectively. It can be understood by those skilled in the art that Figure 4 The computer device structure shown in the figure does not constitute a limitation to the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0170] The touch display screen 503 can be used for displaying a graphical user interface and receiving the operation instructions generated by the user acting on the graphical user interface. The touch display screen 503 can include a display panel and a touch panel. Among them, the display panel can be used for displaying the information input by the user or the information provided to the user and various graphical user interfaces of the computer device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel can be used for collecting the touch operation of the user thereon or near it (such as the user uses any suitable object or accessory such as a finger, a stylus on the touch panel or near the touch panel), and generates corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 501, and can receive the command sent by the processor 501 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event, and then the processor 501 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 503 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize input and output functions. That is, the touch display screen 503 can also be used as part of the input unit 506 to realize the input function.
[0171] The radio frequency circuit 504 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other computer device through wireless communication, and to transmit and receive signals between the network device or other computer device.
[0172] Audio circuit 505 can be used to provide an audio interface between the user and the computer device through a speaker and microphone. Audio circuit 505 can convert received audio data into electrical signals and transmit them to the speaker, which then converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 505 and converted into audio data. The audio data is then output to processor 501 for processing, then transmitted via RF circuit 504 to, for example, another computer device, or to memory 502 for further processing. Audio circuit 505 may also include an earphone jack to allow communication between external headphones and the computer device.
[0173] The input unit 506 may be configured to receive input digital, character information, or user feature information (such as fingerprint, iris, or facial information), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0174] Power supply 507 is used to supply power to various components of computer device 500. Optionally, power supply 507 can be logically connected to processor 501 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 507 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0175] although Figure 4 Not shown in the figure, the computer device 500 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0176] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0177] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0178] To this end, embodiments of the present application provide a computer-readable storage medium storing a plurality of computer programs that can be loaded by a processor to execute the steps of any of the virtual item marking methods provided in embodiments of the present application. For example, the computer program may execute the following steps:
[0179] Displaying a live broadcast page through a user graphical interface provided by a terminal device, the live broadcast page including special effect interaction objects and live broadcast special effects for the special effect interaction objects;
[0180] Detect the position of special effect interactive objects in the live broadcast page;
[0181] If the position of the special effect interaction object in the live broadcast page changes, the target starting position and target ending position of the live broadcast special effect are determined according to the changed position of the special effect interaction object;
[0182] Obtaining first start-end offset information of an initial end position relative to an initial start position in a special effect track of a live special effect, and track point offset information of a track point position in the middle of the special effect track relative to the initial start position;
[0183] Calculate the second start-end offset information of the target end position relative to the target start position;
[0184] Calculating the position of the track point after the change according to the track point offset information, the first start and end offset information, and the second start and end offset information;
[0185] A changed trajectory of a live broadcast special effect is generated according to the target starting position, the target ending position and the changed trajectory point position, and the live broadcast special effect is displayed on the live broadcast page based on the changed trajectory.
[0186] In one embodiment, the live broadcast page includes a window, the live broadcast window displays live broadcast content, and the live broadcast page is displayed through the live broadcast window. The step of "detecting the position of the special effect interactive object in the live broadcast page" may include:
[0187] Detect the window size of the live broadcast window;
[0188] If the size of the live broadcast window changes, the position of the special effect interaction object in the live broadcast window after the change is determined according to the window size after the change.
[0189] In one embodiment, the step of “determining the target starting position and target ending position of the live special effect based on the changed position of the special effect interactive object” may include:
[0190] The changed position of the special effect interaction object is determined as the target end position of the live special effect;
[0191] The target starting position of the live special effect is determined based on the window size of the live window after the change and the initial starting position of the live special effect.
[0192] In one embodiment, the step of “detecting the position of the special effect interactive object in the live broadcast page” may include:
[0193] Perform object recognition on the live broadcast page to determine the object area on the live broadcast page that contains special effect interactive objects;
[0194] Determine the position of the special effect interactive object in the live broadcast page based on the position information of the object area.
[0195] In one embodiment, the offset information includes an offset and a vertical offset. The step of “calculating the position of the track point after the change based on the track point offset information, the first start and end offset information, and the second start and end offset information” may include:
[0196] Calculate the ratio between the horizontal offset of the track point and the horizontal offset of the initial end point, and calculate the ratio between the vertical offset of the track point and the vertical offset of the initial end point;
[0197] Calculating the changed horizontal position of the trajectory point according to the horizontal offset of the second start and end offset information and the first ratio;
[0198] Calculating the changed vertical position of the trajectory point according to the vertical offset of the second start-end offset information and the second ratio;
[0199] The changed position of the trajectory point is obtained according to the changed horizontal position and the changed vertical position.
[0200] In one embodiment, the step of “generating a changed trajectory of a live broadcast special effect based on the changed positions of the target starting position, the target ending position, and the intermediate sampling points, and displaying the live broadcast special effect on the live broadcast page based on the changed trajectory” may include:
[0201] Perform curve fitting based on the target starting position, target end position and the changed position of the trajectory point to obtain the changed trajectory of the live special effect;
[0202] Display live effects on the live page based on the changed trajectory.
[0203] In one embodiment, the step of “displaying a live broadcast special effect on the live broadcast page based on the changed trajectory” may include:
[0204] Determine the target trajectory point corresponding to the display progress of the live special effect when the position of the special effect interactive object changes;
[0205] According to the trajectory point position of the target trajectory point, the nearest trajectory point with the shortest distance to the target trajectory point is selected from the changed trajectory;
[0206] Perform curve fitting on the target trajectory point and the nearest trajectory point to obtain the target special effect trajectory from the target trajectory point to the nearest trajectory point;
[0207] Splicing the special effect track of the part of the changed track that is later than the nearest track point with the target special effect track to obtain a spliced special effect track;
[0208] After the position of the special effect interaction object changes, the live special effect is displayed based on the spliced special effect track.
[0209] As can be seen from the above, the embodiment of the present application detects the position of the special effect interaction object in the live broadcast page; if the position of the special effect interaction object in the live broadcast page changes, the target starting position and target ending position of the live broadcast special effect are determined according to the changed position of the special effect interaction object; the first start and end offset information of the initial ending position relative to the initial starting position in the special effect trajectory of the live broadcast special effect, and the trajectory point offset information of the trajectory point position in the middle of the special effect trajectory relative to the initial starting position are obtained; the second start and end offset information of the target ending position relative to the target starting position is calculated; the changed trajectory point position of the trajectory point is calculated according to the trajectory point offset information, the first start and end offset information and the second start and end offset information; the changed trajectory of the live broadcast special effect is generated according to the target starting position, the target ending position and the changed trajectory point position of the trajectory point, and the live broadcast special effect is displayed on the live broadcast page based on the changed trajectory.
[0210] The embodiment of the present application determines the changed position of the trajectory point through the initial end point, the target end point and the offset information of the trajectory point, and generates a changed trajectory according to the target starting position, the target end point and the changed position of the trajectory point. The changed position of the trajectory point is determined based on the offset information, so that the offset information of the trajectory point corresponding to the changed position in the newly generated special effect trajectory matches the offset information of the trajectory point. The special effect trajectory generated based on the changed position can restore the trajectory structure of the special effect trajectory and improve the display effect of the live special effect.
[0211] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0212] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0213] The above is a detailed introduction to a live broadcast special effects processing method, device, computer equipment and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A live broadcast special effects processing method, characterized in that: A live broadcast page is displayed through a user graphical interface provided by a terminal device, wherein the live broadcast page includes a special effect interaction object and a live broadcast special effect for the special effect interaction object, including: Detecting the position of the special effect interactive object in the live broadcast page; If the position of the special effect interaction object in the live broadcast page changes, determine the target starting position and target ending position of the live broadcast special effect according to the changed position of the special effect interaction object; Obtaining first start-end offset information of an initial end position relative to an initial starting position in a special effect track of the live special effect, and track point offset information of a track point position in the middle of the special effect track relative to the initial starting position; Calculating second start-end offset information of the target end position relative to the target starting position; Calculating a changed track point position of the track point according to the track point offset information, the first start and end offset information, and the second start and end offset information; The changed trajectory of the live broadcast special effect is generated according to the target starting position, the target ending position and the changed trajectory point position of the trajectory point, and the live broadcast special effect is displayed on the live broadcast page based on the changed trajectory.
2. The method according to claim 1, characterized in that The live broadcast page includes a live broadcast window, the live broadcast window displays live broadcast content, and the live broadcast page is displayed through the live broadcast window. The detecting the position of the special effect interactive object in the live broadcast page includes: Detecting the window size of the live broadcast window; If the size of the live broadcast window changes, the position of the special effect interaction object in the live broadcast window after the change is determined according to the window size of the live broadcast window after the change.
3. The method according to claim 2, characterized in that The determining of the target starting position and the target ending position of the live special effect according to the changed position of the special effect interaction object includes: Determining the changed position of the special effect interaction object as the target end position of the live special effect; The target starting position of the live broadcast special effect is determined according to the changed window size of the live broadcast window and the initial starting position of the live broadcast special effect.
4. The method according to claim 1, wherein The detecting the position of the special effect interactive object in the live broadcast page includes: Performing object recognition on the live broadcast page to determine an object area on the live broadcast page that contains the special effect interactive object; The position of the special effect interactive object in the live broadcast page is determined according to the position information of the object area.
5. The method according to claim 1, wherein The offset information includes a horizontal offset and a vertical offset. Calculating the changed position of the track point according to the track point offset information, the first start-end offset information, and the second start-end offset information includes: Calculating a first ratio between a horizontal offset of the track point and a horizontal offset of the initial endpoint, and calculating a second ratio between a vertical offset of the track point and a vertical offset of the initial endpoint; Calculating the changed horizontal position of the trajectory point according to the horizontal offset of the second start-end offset information and the first ratio; Calculating the changed vertical position of the trajectory point according to the vertical offset of the second start-end offset information and the second ratio; The changed position of the track point is obtained according to the changed horizontal position and the changed vertical position.
6. The method according to any one of claims 1 to 5, characterized in that Generating the changed trajectory of the live special effect according to the target starting position, the target ending position, and the changed position of the trajectory point, and displaying the live special effect on the live page based on the changed trajectory includes: Performing curve fitting according to the target starting position, the target ending position, and the changed position of the trajectory point to obtain the changed trajectory of the live special effect; A live broadcast special effect is displayed on the live broadcast page based on the changed trajectory.
7. The method according to claim 6, characterized in that The displaying of a live broadcast special effect on the live broadcast page based on the changed trajectory includes: Determine the target trajectory point corresponding to the display progress of the live special effect when the position of the special effect interaction object changes; Selecting a nearest trajectory point closest to the target trajectory point from the changed trajectory according to the trajectory point position of the target trajectory point; Performing curve fitting on the target trajectory point and the nearest trajectory point to obtain a target special effect trajectory from the target trajectory point to the nearest trajectory point; splicing a portion of the special effect track in the changed track whose display timing is later than the nearest track point with the target special effect track to obtain a spliced special effect track; After the position of the special effect interaction object changes, the live special effect is displayed based on the spliced special effect track.
8. A live broadcast special effects processing device, characterized in that: include: A detection unit, configured to detect the position of the special effect interactive object in the live broadcast page; a position determination unit, configured to determine a target starting position and a target ending position of the live special effect according to the changed position of the special effect interaction object if the position of the special effect interaction object in the live page changes; an acquiring unit, configured to acquire first start-end offset information of an initial end position relative to an initial starting position in a special effect track of the live special effect, and track point offset information of a track point position in the middle of the special effect track relative to the initial starting position; an offset information calculation unit, configured to calculate second start-end offset information of the target end position relative to the target start position; a position calculation unit, configured to calculate a changed position of the trajectory point according to the trajectory point offset information, the first start and end offset information, and the second start and end offset information; A generating unit is used to generate a changed trajectory of the live broadcast special effect according to the target starting position, the target ending position and the changed trajectory point position of the trajectory point, and display the live broadcast special effect on the live broadcast page based on the changed trajectory.
9. A computer device, characterized in that: It comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the live special effects processing method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute the live broadcast special effects processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Virtual object display method and terminal and computer readable storage medium
CN107509113A
Virtual gift display method, device and equipment and storage medium
CN111698570A