CN109104640B - Virtual gift presenting method and device and storage equipment - Google Patents

Virtual gift presenting method and device and storage equipment Download PDF

Info

Publication number
CN109104640B
CN109104640B CN201810709400.8A CN201810709400A CN109104640B CN 109104640 B CN109104640 B CN 109104640B CN 201810709400 A CN201810709400 A CN 201810709400A CN 109104640 B CN109104640 B CN 109104640B
Authority
CN
China
Prior art keywords
button
control area
movable
gift
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810709400.8A
Other languages
Chinese (zh)
Other versions
CN109104640A (en
Inventor
周文翊
朱明浩
张仁寿
梁志杰
王丽云
陈家龙
洪翀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810709400.8A priority Critical patent/CN109104640B/en
Publication of CN109104640A publication Critical patent/CN109104640A/en
Application granted granted Critical
Publication of CN109104640B publication Critical patent/CN109104640B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof

Abstract

The embodiment of the invention discloses a virtual gift giving method, a device and a storage device, wherein the virtual gift giving method is applied to a terminal, the interface of the terminal comprises a button control area and a gift giving area, the button control area comprises a movable graph and a plurality of buttons, and the method comprises the following steps: determining a button triggered by a user in the button control area, wherein the button is any one of the plurality of buttons; laying out a plurality of buttons and movable graphics of the button control area according to the determined buttons; and generating and displaying a corresponding gift-giving animation in the gift-giving area according to the determined button. The embodiment of the invention can provide rich and various presentation forms and vivid and changeable gift animation effects, and improve the user attraction.

Description

Virtual gift presenting method and device and storage equipment
Technical Field
The embodiment of the invention relates to the technical field of Internet, in particular to a virtual gift presenting method and device and storage equipment.
Background
To improve the interaction between users, many applications are provided with a virtual gift giving function. For example, in a live application, a viewer may present a virtual gift to a host via a virtual gift function, which is the primary way of interaction between the viewer and the host. The existing virtual gift presenting method generally has only one presenting button as shown in fig. 1, a user can only realize gift presentation by triggering the presenting button, the operation form is single, only one gift presenting animation is provided, the animation effect is monotonous, the user does not have interest, and the user is not attracted enough.
Disclosure of Invention
In view of this, embodiments of the present invention provide a virtual gift giving method, apparatus, and storage device, which can provide rich and various gift presentation forms and vivid and varied gift animation effects, and improve user appeal.
The virtual gift giving method provided by the embodiment of the invention is applied to a terminal, the interface of the terminal comprises a button control area and a gift giving area, the button control area comprises a movable graph and a plurality of buttons, and the method comprises the following steps:
determining a button triggered by a user in the button control area, wherein the button is any one of the plurality of buttons;
laying out a plurality of buttons and movable graphics of the button control area according to the determined buttons; and
and generating and displaying a corresponding gift-giving animation in the gift-giving area according to the determined button.
The virtual gift giving device provided by the embodiment of the invention is applied to a terminal, the interface of the terminal comprises a button control area and a gift giving area, and the button control area comprises a movable graph and a plurality of press keys
A knob, the device comprising:
the determining unit is used for determining a button triggered by a user in the button control area, wherein the button is any one of the plurality of buttons;
the layout unit is used for laying out the plurality of buttons and the movable graphics of the button control area according to the determined buttons; and
and the animation unit is used for generating and displaying corresponding gift-giving animations in the gift-giving area according to the determined buttons.
Embodiments of the present invention further provide a storage device, where the storage device is configured to store a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the virtual gift giving method provided in an embodiment of the present invention.
In the embodiment of the invention, a plurality of buttons are provided in the button control area, after a user triggers a certain button, the plurality of buttons and the movable graphics in the button control area can be arranged according to the button, and the corresponding gift-giving animation can be generated and displayed in the gift-giving area according to the button, so that different buttons are triggered, the button control area has different arrangements, the gift-giving area can display different gift-giving animations, the presentation forms of gifts are rich and varied, the animation effect of gifts is vivid and changeable, and the user attraction is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application interface of a virtual gift giving method of the related art.
Fig. 2 is a scene schematic diagram of a virtual gift-giving system provided by the embodiment of the invention.
Fig. 3 is a flowchart illustrating a virtual gift giving method according to an embodiment of the present invention.
Fig. 4 is a flowchart illustrating a layout method according to an embodiment of the present invention.
Fig. 5 is a schematic diagram illustrating comparison between the layout principle and the effect provided by the embodiment of the invention.
Fig. 6a to 6c are schematic diagrams of the layout principle provided by the embodiment of the present invention.
Fig. 7 is a flowchart illustrating an animation generation method according to an embodiment of the present invention.
Fig. 8 is another flowchart of an animation generation method according to an embodiment of the present invention.
Fig. 9 is another schematic flow chart of a layout method according to an embodiment of the present invention.
Fig. 10 is a schematic flow chart of a layout method according to an embodiment of the present invention.
Fig. 11 is a schematic flowchart of an animation generation method according to an embodiment of the present invention.
Fig. 12 is a schematic application interface diagram of a virtual gift giving method according to an embodiment of the present invention.
Fig. 13 is a schematic view of another application interface of the virtual gift giving method according to the embodiment of the present invention.
Fig. 14 is a schematic structural view of a virtual gift-giving device according to an embodiment of the present invention.
Fig. 15 is another structural view of the virtual gift-giving device according to the embodiment of the present invention.
Fig. 16 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
In the description that follows, specific embodiments of the present application will be described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the application have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, and it will be recognized by those of ordinary skill in the art that various of the steps and operations described below may be implemented in hardware.
The term module, as used herein, may be considered a software object executing on the computing system. The various components, modules, engines, and services described herein may be viewed as objects implemented on the computing system. The apparatus and method described herein may be implemented in software, or in hardware, and are within the scope of the present application.
The terms "first", "second", and "third", etc. in this application are used to distinguish between different objects and not to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules recited, but rather, some embodiments include additional steps or modules not recited, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Because the existing virtual gift giving method has the problems of single operation mode, monotonous gift giving animation and the like, the embodiment of the invention provides the virtual gift giving method which can provide rich and various gift presentation forms and vivid and changeable gift animation effects and improve the attraction of users. The virtual gift giving method provided by the embodiment of the invention can be realized in the virtual gift giving device provided by the embodiment of the invention, the virtual gift giving device can be a client, a proportional Application (APP) client, a social application client and the like, and the client can be installed in a terminal such as a mobile phone, a tablet computer, a personal computer and the like.
Taking the virtual gift giving device as a live application client as an example, a scene schematic diagram of the virtual gift giving system of the embodiment of the present invention may be as shown in fig. 2, where the system may include a terminal and a server, the terminal includes a terminal of a main broadcast (i.e., a main broadcast terminal on which the live application client is installed) and a terminal of an audience (i.e., an audience terminal on which the live application client is also installed), and the server may be a live server. The virtual gift giving method of the embodiment of the invention is mainly applied to the audience, the interface of the audience (which can be the interface of the live broadcast application program of the audience) comprises a button control area and a gift giving area, the button control area comprises a movable graph and a plurality of buttons, the button control area mainly provides giving buttons for the audience, the buttons and the movable graph of the button control area can be dynamically arranged along with the triggering of the audience, and the gift giving area is mainly used for displaying gift giving animation.
In specific implementation, a main broadcast can carry out live broadcast through a main broadcast end, for example, live broadcast of a game is carried out, the main broadcast end transmits live broadcast data to a spectator end through a server, spectators watch live broadcast through the spectator end, in the process of watching live broadcast, spectators can trigger a certain button (the triggered button can be any one of a plurality of buttons) in a button touch area of a live broadcast application program interface so as to give a virtual gift to the main broadcast, the spectator end determines the button triggered by the spectators in a button control area, and the buttons and movable graphics in the button control area are arranged according to the determined button, for example: keeping the display state of the button not triggered by the audience unchanged, amplifying and displaying the button triggered by the audience, and adjusting the position of the movable graph according to the button triggered by the audience so as to enable the button control area to present an aesthetic layout; and generating and displaying a corresponding gift-giving animation in the gift-giving area according to the determined button. In the embodiment of the invention, the audience triggers different buttons, the button control areas have different layouts, the gift-presenting areas can display different gift-presenting animations, the presentation forms of the gifts are rich and varied, the animation effects of the gifts are vivid and changeable, and the user attraction is greatly improved.
In addition, when the virtual gift-giving device is a social application client, the terminals in fig. 2 may include terminals of two social users who interact with each other, and the server may be a social server.
It should be noted that the scene schematic diagram of the virtual gift-giving system shown in fig. 2 is only an example, and the virtual gift-giving system and the scene described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention.
The following are detailed below.
The present embodiment will describe the virtual gift-giving method provided by the embodiment of the present invention from the perspective of a virtual gift-giving device that can be installed in a terminal having an interface including a button control area including a movable graphic and a plurality of buttons and a gift-giving area, as shown in fig. 3, the virtual gift-giving method of the present embodiment includes the steps of:
and step S101, determining a button triggered by a user in the button control area, wherein the button is any one of the plurality of buttons.
For example, in a live scene, when a viewer (i.e., user) wants to give a virtual gift to a main broadcast, the user may select a virtual gift to be given first in a gift shop, and the virtual gift may be: the method comprises the steps of simulating goose eggs, virtual fighters, virtual candies and the like, then triggering any one button in a plurality of buttons in a button control area according to the requirement of the terminal, and determining the button triggered by a user by the terminal.
For another example, in a social scenario, when a social user (i.e., user) wants to give a virtual gift to other social users, the user may select a virtual gift to be given by a gift shop, where the virtual gift includes: the method comprises the steps of simulating flowers, goose eggs, candies and the like, triggering any one button in a plurality of buttons in a button control area according to the requirement of the user, and determining the button triggered by the user by the terminal.
And S102, laying out a plurality of buttons and movable graphs of the button control area according to the determined buttons.
For example, the terminal may enlarge and display the button triggered by the user in the button control area, maintain the button not triggered by the user in the original display state to be distinguished from the button not triggered by the user, and adjust the position of the movable graphic in the button control area according to the display position of the button triggered by the user, so that the button control area presents an aesthetic layout.
In a specific embodiment, the button control area may be a circular control area, the plurality of buttons may be circular buttons, the movable graphic may be a movable circle, the position information mentioned below may refer to a circle center position, and the plurality of buttons and the movable graphic in the button control area may be arranged as follows:
keeping the display state of the button which is not triggered by the user unchanged, magnifying the button triggered by the user, internally cutting the button triggered by the user into the button control area for displaying, and adjusting the position of the movable graph, so that the movable graph is internally cut into the button control area and is externally cut with the button triggered by the user for displaying.
The specific layout implementation method can be seen in fig. 4, and includes the following steps:
and S1021, acquiring preset position information and a preset display radius of a button triggered by a user.
And step S1022, amplifying the button and internally cutting the button in the button control area for displaying according to the preset position information and the preset display radius of the button.
And S1023, calculating the position information of the movable graph according to the preset position information of the button, the preset display radius and the radius of the movable graph.
And step S1024, adjusting the display position of the movable graph according to the position information of the movable graph, so that the movable graph is internally tangent to the button control area and externally tangent to the button for display.
For example, taking the multiple buttons including the x1 button, the x2 button, and the x3 button as an example, please refer to fig. 5, where fig. 5 shows layout effects of the buttons and the movable graphics of the button control area when the user triggers the x1 button, triggers the x2 button, and triggers the x3 button, respectively.
In specific implementation, the display size and the display position of the button control area may be preset, and for fixed display, the display position and the display radius of each triggered button and the radius of the movable graphic may be preset, so as to achieve the layout effect of fig. 5, the key point is to obtain the position information of the movable graphic after each triggered button, which may specifically be as follows:
in order to facilitate the calculation of the position information, a plane coordinate system may be established, and specifically, the plane coordinate system may be established with the position of the button control area, for example: the y-axis may be established on a line vertically tangent to the button control area and the x-axis may be established on a line perpendicular to the y-axis and transversely through the center of the button control area. Of course, in practical applications, the plane coordinate system may also be established in other ways, which is not specifically limited herein.
When a user triggers the X1 button, as shown in fig. 6a, preset position information (X1, Y1) of the X1 button and a preset display radius R1 of the X1 button may be obtained, and the X1 button is enlarged and inscribed in the button control area to be displayed according to the preset position information (X1, Y1) and the preset display radius R1 of the X1 button; meanwhile, the position information of the movable graph is calculated according to the preset position information (X1, Y1) of the X1 button, the preset display radius R1 and the radius R of the movable graph, and the position information of the movable graph may be: (X1 + R1+ R, Y1), adjusting the circle center of the movable graph to (X1 + R1+ R, Y1), so that the movable graph is internally tangent to the button control area and is displayed in a circumscribed manner with the X1 button.
When the user triggers the X2 button, as shown in fig. 6b, the preset position information (X2, Y2) of the X2 button and the preset display radius R2 of the X2 button may be obtained, and the X2 button is enlarged and inscribed in the button control area to be displayed according to the preset position information (X2, Y2) and the preset display radius R1 of the X2 button; meanwhile, the position information of the movable graph is calculated according to the preset position information (X2, Y2) of the X2 button, the preset display radius R2 and the radius R of the movable graph, and the position information of the movable graph may be:
Figure GDA0003673237410000071
adjusting the center of a circle of the movable graph to
Figure GDA0003673237410000072
The movable graphic is thus inscribed within the button control area and displayed circumscribed to the x2 button.
When the user triggers the X3 button, as shown in fig. 6c, the preset position information (X3, Y3) of the X3 button and the preset display radius R3 of the X3 button may be obtained, and the X3 button is enlarged and inscribed in the button control area to be displayed according to the preset position information (X3, Y3) and the preset display radius R3 of the X3 button; meanwhile, the position information of the movable graph is calculated according to the preset position information (X3, Y3) of the X3 button, the preset display radius R3 and the radius R of the movable graph, the position information of the movable graph is the circle center position (X3, Y3-R3-R) of the movable graph, the circle center of the movable graph is adjusted to be (X3, Y3-R3-R), and therefore the movable graph is internally tangent to the button control area and externally tangent to the X3 button for display.
In a specific implementation, the preset display radii R1, R2, and R3 of the three buttons may be the same.
And step S103, generating and displaying a corresponding gift-giving animation in the gift-giving area according to the determined button.
For example, corresponding animation parameter files may be configured for different buttons in advance, after a button triggered by a user is determined, the animation parameter file corresponding to the button is acquired, and a gift-giving animation is generated according to the animation parameter file and displayed.
In a specific implementation, step S102 and step S103 may be executed synchronously without distinguishing a sequence.
In this embodiment, each button may support two triggering manners, namely a long press and a click, and when the triggered button of the user is determined, the identification information and the triggering manner of the button triggered by the user may be determined, and then a method for generating and displaying a corresponding gift-giving animation in the gift-giving area according to the determined button may be as shown in fig. 7, and includes the following steps:
and step S1031, determining gift giving quantity according to the identification information.
The gift-offering amount may be determined based on the identification information by directly determining a numerical value included in the identification information of the button as the gift-offering amount. Take the example that the plurality of buttons include an x1 button, an x2 button, and an x3 button. When the triggering mode is clicking, clicking the x1 button, wherein the gift presenting quantity clicked each time is 1, clicking the x2 button, wherein the gift presenting quantity clicked each time is 2, clicking the x3 button, and clicking the gift presenting quantity clicked each time is 3. When the triggering mode is long press, taking the long press time length of each button as the example, and taking the preset time length as the example, the x1 button is long pressed, the gift giving number of each long press is 1, the x2 button is long pressed, the gift giving number of each long press is 2, the x3 button is long pressed, and the gift giving number of each long press is 3.
In addition, when the trigger mode is long press, the gift giving speed can also be determined according to the identification information, the gift giving quantity is determined according to the gift giving speed and the long press time, and the gift giving quantity is equal to the product of the gift giving speed and the long press time. In this embodiment, the gift-giving speed is different by long-pressing different buttons. For example, if the x1 button is pressed for a long time, the gift-giving speed is N per second, the x2 button is pressed for a long time, the gift-giving speed is 2N per second, and if the x3 button is pressed for a long time, the gift-giving speed is 3N per second, where N is a positive integer.
And step S1032, determining a gift giving mode according to the triggering mode.
In a specific implementation, the gift presentation mode corresponding to the click may be determined as a double presentation mode, and the gift presentation mode corresponding to the long press may be determined as a one-by-one presentation mode. The double presenting mode may refer to a mode in which a predetermined number of gifts are presented at a time; the present-by-present mode may mean that one gift is presented at a time until the present presentation number reaches the preset number.
Taking triggering the x3 button as an example, the double-giving mode may be that when the user clicks the x3 button, 3 gifts are given at one time, if the initial value of the number of the gift-giving animations is 0, the number value of the gift-giving animations is directly switched to 3 after clicking, that is, the number change process of the gift-giving animations is: 0 to 3; the one-by-one presenting mode may be that when the user long-presses the x3 button, the gifts are presented one by one, the number of the gift-presenting animations is increased one by one from a certain initial value until 3 values are added, and if the initial value of the number of the gift-presenting animations is 0, the number of the gift-presenting animations is increased one by one until 3 values are added, that is, the number of the gift-presenting animations is changed as follows: 0-1-2-3.
In addition, the speed of change of the number of gift-giving animations is different when different buttons are pressed for a long time. For example, when the x2 button is pressed long, the rate of change in the number of gift-giving animations may be 2 times the rate of change in the number of gift-giving animations when the x1 button is pressed long, and when the x3 button is pressed long, the rate of change in the number of gift-giving animations may be 3 times the rate of change in the number of gift-giving animations when the x1 button is pressed long.
And step S1033 of generating and displaying a corresponding gift-giving animation in the gift-giving area according to the gift-giving quantity and the gift-giving mode.
In a specific implementation, as shown in fig. 8, when the user triggers a certain button in a click manner, multiple presenting animations may be generated in the present presenting area according to the present presenting quantity, and when the user triggers a certain button in a long-press manner, one-by-one presenting animations may be generated in the present presenting area according to the present presenting quantity.
Further, since the button control area provides a plurality of buttons, the user can switch to use other buttons according to the requirement during the gift giving process. For example, when the user wants to switch to give a gift using the x2 button after giving the gift using the x1 button, the user may directly click the x2 button after clicking the x1 button; or after the x1 button is pressed for a long time, releasing the x1 button and directly pressing the x2 button for a long time; or the user can also drag the x1 button directly to the position of the x2 button to switch to the x2 button.
In order to support the user to perform button switching in a dragging manner, in this embodiment, an effective control area may be set for each button, and the effective control area of each button may be calculated by using the preset position information of the button and the preset position information of an adjacent button of the button. Taking the multiple buttons including the X1 button, the X2 button, and the X3 button, the preset position information of the X1 button is (X1, Y1), the preset position information of the X2 button is (X2, Y2), and the preset position information of the X3 button is (X3, Y3), for example, the effective control area of the X1 button may be: (X1. Ltoreq. X < (X2-X1)/2, Y1. Ltoreq. Y < (Y2-Y1)/2), the effective control area of the X2 button may be: y ((X2-X1)/2. Ltoreq. X < (X3-X2)/2, (Y2-Y1)/2. Ltoreq. Y < (Y3-Y2)/2), the effective control area of the X3 button may be: ((X3-X2)/2. Ltoreq. X < X3, (Y3-Y2)/2. Ltoreq. Y < Y3). The division of the effective control area of the button in this embodiment is only an example, and in practical applications, other ways may also be used for division, which is not specifically limited herein.
In the process of button switching by dragging the buttons by a user, a dragging track can be obtained, the dragging track can be a motion track of the central point of the buttons, and the layout of the button control area is adjusted according to the dragging track and the effective control area of each button. The layout adjustment method may be as follows:
(1) When the dragging track does not exceed the effective control area of the button (namely the original button triggered by the user), the button is internally tangent to the button control area to be displayed according to the dragging track, and the position of the movable graph is adjusted according to the dragging track, so that the movable graph is always internally tangent to the button control area and externally tangent to the button to be displayed.
The specific adjustment implementation process may be as shown in fig. 9, and includes the following steps:
and S201, internally cutting the button into the button control area to display according to the dragging track and the preset display radius of the button.
Step S202, calculating a switching rate according to the dragging track, the preset position information of the button and the preset position information of the adjacent button of the button.
Step S203, calculating the motion trail of the movable graph according to the switching rate, the position information of the movable graph when the button is triggered and the position information of the movable graph when the adjacent button of the button is triggered.
And S204, adjusting the display position of the movable graph according to the motion track so that the movable graph is always internally tangent to the button control area and externally tangent to the button for display.
Taking the example of switching the x1 button into the x2 button in a dragging manner, during the dragging process, the x1 button can be inscribed in the button control area to be displayed according to a dragging track and a preset display radius R1 of the x1 button; assuming that the dragging distance of the X1 button on the X axis is X (the difference between the X value of the current dragging point and X1) and the dragging distance on the Y axis is Y (the difference between the Y value of the current dragging point and Y1), the switching rate may be calculated according to the preset position information (X1, Y1) of the dragging distance X, Y, X button and the preset position information (X2, Y2) of the X2 button, where the switching rate may include the switching rate in the X axis direction: rateX = X/(X2-X1), and switching rate in the y-axis direction: rateY = Y/(Y2-Y1), the motion trajectory of the movable graph during dragging may be:
Figure GDA0003673237410000111
and adjusting the circle center of the movable graph according to the calculated running track, so that the movable graph is always internally tangent to the button control area and externally tangent to and displayed by the button.
(2) When the dragging track exceeds the effective control area of the button and enters the effective control area of the adjacent button of the button, the button can be reduced, the adjacent button is enlarged and internally tangent to the button control area to be displayed, and the position of the movable graph is adjusted, so that the movable graph is internally tangent to the button control area and externally tangent to the adjacent button to be displayed.
The specific adjustment implementation process can be as shown in fig. 10, and includes the following steps:
and S301, acquiring preset position information and preset display radius of adjacent buttons.
And S302, amplifying and internally cutting the adjacent buttons into the button control area for display according to the preset position information and the preset display radius of the adjacent buttons.
Step S303, calculating the position information of the movable graph according to the preset position information of the adjacent buttons, the preset display radius and the radius of the movable graph.
And S304, adjusting the display position of the movable graph according to the position information of the movable graph, so that the movable graph is internally tangent to the button control area and is externally tangent to and displayed by the adjacent buttons.
The method shown in fig. 10, i.e., the layout method of the buttons and the movable graphics of the button control area when the x2 button is activated.
Still take the example of switching the X1 button into the X2 button in a dragging manner, in the dragging process, when the dragging track exceeds the effective control area of the X1 button, and after entering the effective control area of the X2 button, the X1 button can be reduced (that is, the X1 button is displayed according to the state before the X1 button is not triggered), the preset position information (X2, Y2) and the preset display radius R2 of the X2 button are obtained, the X2 button is enlarged and internally tangent to the button control area to be displayed according to the preset position information (X2, Y2) and the preset display radius R2 of the X2 button, and meanwhile, the position information of the movable graph is calculated according to the preset position information (X2, Y2) and the preset display radius R2 of the X2 button and the radius R of the movable graph, and the position information of the movable graph can be:
Figure GDA0003673237410000121
adjusting the center of a circle of the movable graph to
Figure GDA0003673237410000122
The movable graphic is thus inscribed within the button control area and displayed circumscribed to the x2 button.
In addition, when the user switches the buttons in a dragging manner, a corresponding gift-presenting animation can be generated and displayed in the gift-presenting area according to the dragging track and the effective control area of each button, and the specific generation method of the animation can be as follows:
(1) When the dragging track does not exceed the effective control area of the button, in the dragging process, a corresponding gift-giving animation can be generated and displayed in the gift-giving area according to the button.
Taking the example of switching the x1 button to the x2 button in a dragging manner, in the dragging process, when the dragging track is in the effective control area of the x1 button, the corresponding gift-giving animation is generated and displayed in the gift-giving area according to the x1 button. Specifically, during the dragging, the gift-giving animation may be generated and displayed one by one according to the identification information of the x1 button (i.e., the gift-giving animation may be generated in a manner of triggering by pressing the x1 button for a long time).
(2) When the dragging track exceeds the effective control area of the button and enters the effective control area of the adjacent button of the button, in the dragging process, the corresponding gift-giving animation can be generated and displayed in the gift-giving area according to the adjacent button.
Taking the example of switching the x1 button to the x2 button in a dragging manner, in the dragging process, when the dragging track enters the effective control area of the x2 button, the corresponding gift-giving animation may be generated and displayed in the gift-giving area according to the x2 button. Specifically, after entering the effective control area of the x2 button, gift-offering animations may be generated and displayed one by one according to the identification information of the x2 button (i.e., gift-offering animations are generated in a triggering manner of long pressing of the x2 button).
In a specific implementation, in the process of switching the x1 button to the x2 button in a dragging manner, as shown in fig. 11, the current position coordinate of the x1 button may be obtained, and whether the current position coordinate of the x1 button is within the effective control area of the x1 button is determined, if yes, the presenting animations are continuously generated and displayed one by one according to the identification information of the x1 button, that is, in the dragging process, the present presenting speed is the same as that when the x1 button is pressed for a long time, and is maintained unchanged; and when the current position coordinate of the x1 button exceeds the effective control area of the x1 button and enters the effective control area of the x2 button, the gifting animations are generated one by one according to the identification information of the x2 button and displayed, and the gifting speed of the gifts is doubled compared with that when the x1 button is pressed for a long time.
In this embodiment, a plurality of buttons are provided in the button control area, after a user triggers a certain button, the button control area can be arranged according to the button, and the corresponding gift-presenting animation can be generated in the gift-presenting area according to the button and displayed, so that different buttons are triggered, different layouts can be arranged in the button control area, different gift-presenting animations can be displayed in the gift-presenting area, the presentation forms of gifts are rich and diverse, the animation effect of gifts is vivid and changeable, and the user attraction is greatly improved.
The virtual gift giving method provided by the embodiment of the invention will be illustrated in a specific application scenario.
Taking a live application scenario as an example, if a button control area on a live application program interface of a viewer side includes three buttons x1, x2, and x3, if a user triggers the x3 button to send flowers to a main broadcast, the layout of the button control area may be as shown in fig. 12, where an x3 button is enlarged and internally displayed in the button control area, and a movable graphic is also internally displayed in the button control area and externally displayed with the x3 button. If the user is the x3 button triggered by clicking, the animation of the number of flowers of the gift-giving area will be changed from 21 in fig. 12 to 24 directly, if the user is the x3 button triggered by long-pressing, the animation of the number of flowers of the gift-giving area will be added by 1 from 21 in fig. 12 to 24 in sequence within a preset time period, and the rate of increase of the animation of the number of flowers when the x3 button is pressed by long is 3 times the rate of increase of the animation of the number of flowers when the x1 button is pressed by long. In addition, after the user triggers the x3 button, the user can drag the x3 button to the x2 button direction to switch to use the x2 button, and during the switching process, if the position of the x3 button is still in the effective control area of the x3 button, the movable graph moves along with the movement of the x3 button and is always tangent to the x3 button, and the increasing speed of the flower number animation is continuously increased as the increasing speed when the x3 button is pressed for a long time; and when the position of the x3 button exceeds the effective control area of the x3 button and enters the effective control area of the x2 button, the x3 button is displayed in a reduced mode, the x2 button is displayed in an enlarged mode, the movable graph is displayed in a circumscribed mode with the x2 button, and the increasing speed of the flower quantity animation is reduced.
Still taking the live application scenario as an example, if the button control area on the live application program interface of the viewer side includes three buttons x1, x10, and x20, if the user triggers the x10 button to present goose eggs to the anchor, the layout of the button control area may be as shown in fig. 13, where the x10 button is enlarged and internally displayed in the button control area, and the movable graphic is also internally displayed in the button control area and externally displayed with the x10 button. If the user is the x10 button triggered by clicking, the goose egg number animation of the gift-giving area is directly changed from 24 in fig. 13 to 34, if the user is the x10 button triggered by long-pressing, the goose egg number animation of the gift-giving area is gradually increased from 1 to 34 from 24 in fig. 13 within a preset time length, and when the x10 button is pressed for a long time, the increasing speed of the goose egg number animation is 10 times of the increasing speed of the goose egg number animation when the x1 button is pressed for a long time. In addition, after the user triggers the x10 button, the user can drag the x10 button to the direction of the x20 button to switch to use the x20 button, and during the switching process, if the position of the x10 button is still in the effective control area of the x10 button, the movable graph moves along with the movement of the x10 button and is always tangent to the x10 button, and the increasing speed of the goose egg number animation is continuously increased as the increasing speed when the x10 button is pressed for a long time; and when the position of the x10 button exceeds the effective control area of the x10 button and enters the effective control area of the x20 button, the x10 button is displayed in a shrinking mode, the x20 button is displayed in an enlarging mode, the movable graph is displayed in a circumscribed mode with the x20 button, and the increasing speed of the goose egg number animation is increased.
In order to better implement the above method, an embodiment of the present invention further provides a virtual gift-giving device, which is applied to a terminal having an interface including a button control area and a gift-giving area, the button control area including a movable graphic and a plurality of buttons, as shown in fig. 14, the device of the present embodiment includes a determination unit 401, a layout unit 402, and an animation unit 403, as follows:
a determining unit 401, configured to determine a button triggered by a user in the button control area, where the button is any one of the multiple buttons;
a layout unit 402 configured to lay out a plurality of buttons and movable graphics of the button control area according to the determined buttons; and
and an animation unit 403, configured to generate and display a corresponding gift-giving animation in the gift-giving area according to the determined button.
In one embodiment, the button control area is a circular control area, the plurality of buttons are circular buttons, and the movable figure is a movable circle;
the layout unit 402 is specifically configured to: and amplifying the button, internally cutting the button into the button control area for display, and adjusting the position of the movable graph so that the movable graph is internally cut into the button control area and externally cut with the button for display.
In one embodiment, as shown in fig. 15, the layout unit 402 includes:
the button layout unit 4021 is configured to acquire preset position information and a preset display radius of the button, and enlarge and internally contact the button in the button control area for display according to the preset position information and the preset display radius of the button;
a movable graphic layout unit 4022, configured to calculate position information of the movable graphic according to the preset position information of the button, the preset display radius, and the radius of the movable graphic, and adjust the display position of the movable graphic according to the position information of the movable graphic, so that the movable graphic is inscribed in the button control area and displayed while being circumscribed with the button.
In one embodiment, as shown in fig. 15, the apparatus further comprises:
an obtaining unit 404, configured to obtain a dragging track formed by the user dragging the button to perform button switching;
an adjusting unit 405, configured to adjust a layout of the button control area according to the dragged trajectory.
In an embodiment, each of the plurality of buttons has an effective control area, as shown in fig. 14, the adjusting unit 405 includes:
a first adjusting unit 4051, configured to, when the dragging track does not exceed the effective control area of the button, inscribe the button in the button control area according to the dragging track for display, and adjust a position of the movable graph according to the dragging track, so that the movable graph is always inscribed in the button control area and displayed externally tangent to the button.
In an embodiment, the first adjusting unit 4051 is specifically configured to,
according to the dragging track and the preset display radius of the button, the button is internally tangent to the button control area for display;
calculating a switching rate according to the dragging track, the preset position information of the button and the preset position information of the adjacent button of the button;
calculating the motion trail of the movable graph according to the switching rate, the position information of the movable graph when the button is triggered and the position information of the movable graph when the adjacent button of the button is triggered;
and adjusting the display position of the movable graph according to the motion track so that the movable graph is always internally tangent to the button control area and externally tangent to the button for display.
In an embodiment, as shown in fig. 15, the adjusting unit 405 further includes:
a second adjusting unit 4052, configured to, when the dragging track exceeds the effective control area of the button and enters the effective control area of an adjacent button of the button, reduce the button, enlarge and internally contact the adjacent button in the button control area for display, and adjust a position of the movable graphic, so that the movable graphic is internally contacted in the button control area and externally contacted with the adjacent button for display.
In an embodiment, each of the plurality of buttons has an effective control area, and when the dragging track does not exceed the effective control area of the button, the animation unit 403 is further configured to generate and display a corresponding gift-giving animation in the gift-giving area according to the button during the dragging process.
In an embodiment, when the dragging track exceeds the effective control area of the button and enters the effective control area of the adjacent button of the button, the animation unit 403 is further configured to generate and display a corresponding gift-giving animation in the gift-giving area according to the adjacent button during the dragging process.
In an embodiment, the determining unit is specifically configured to determine the identification information and the triggering manner of the button triggered by the user;
as shown in fig. 15, the animation unit 403 includes:
a first determination unit 4031 configured to determine a gift presentation amount based on the identification information;
a second determining unit 4032, configured to determine a gift presentation mode according to the trigger manner;
a generating unit 4033, configured to generate and display a corresponding gift-giving animation in the gift-giving area according to the gift-giving quantity and the gift-giving mode.
In an embodiment, the trigger mode includes a click or a long press, and the second determining unit 4032 is specifically configured to determine that the gift presenting mode corresponding to the click is a double-gift presenting mode; determining the gift presentation mode to be the one-by-one presentation mode according to the corresponding gift presentation mode.
It should be noted that, when the virtual gift-giving device provided in the foregoing embodiment implements virtual gift-giving, the division of the functional modules is merely used as an example, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the functions described above. In addition, the virtual gift giving device and the virtual gift giving method provided by the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, and will not be described again here.
The device of this embodiment, a plurality of buttons are provided in the button control area, after a user triggers a certain button, the determining unit 401 can determine the button triggered by the user, the layout unit 402 can arrange a plurality of buttons and movable graphics in the button control area according to the button, the animation unit 403 can generate corresponding gift-presenting animations in the gift-presenting area according to the button and display the corresponding gift-presenting animations, thus, different buttons are triggered, different layouts can be generated in the button control area, different gift-presenting animations can be displayed in the gift-presenting area, the presentation forms of gifts are rich and diverse, the animation effects of gifts are vivid and changeable, and the user attractiveness is greatly improved.
Accordingly, an embodiment of the present invention further provides a terminal, on which the virtual gift-giving apparatus provided in the embodiment of the present invention is installed, and as shown in fig. 16, the terminal may include a Radio Frequency (RF) circuit 501, a memory 502 including one or more computer-readable storage media, an input unit 503, a display unit 504, a sensor 505, an audio circuit 506, a Wireless Fidelity (WiFi) module 507, a processor 508 including one or more processing cores, a power supply 509, and other components. Those skilled in the art will appreciate that the terminal structure shown in fig. 16 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 501 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for receiving downlink information of a base station and then sending the received downlink information to the one or more processors 508 for processing; in addition, data relating to uplink is transmitted to the base station. In general, RF circuit 501 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 501 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), long Term Evolution (LTE), email, short Message Service (SMS), and the like.
The memory 502 may be used to store software programs and modules, and the processor 508 executes various functional applications and data processing by operating the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 508 and the input unit 503 access to the memory 502.
The input unit 503 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 503 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 508, and can receive and execute commands sent by the processor 508. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 503 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 504 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 504 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 508 to determine the type of touch event, and then the processor 508 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 16 the touch sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement input and output functions.
The terminal can also include at least one sensor 505, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the terminal moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of identifying the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration identification related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal, detailed description is omitted here.
Audio circuitry 506, a speaker, and a microphone may provide an audio interface between the user and the terminal. The audio circuit 506 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 506 and converted into audio data, which is then processed by the audio data output processor 508 and then sent to another terminal via the RF circuit 501, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earbud jack to provide communication of peripheral headphones with the terminal.
WiFi belongs to short-distance wireless transmission technology, and the terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 507, and provides wireless broadband internet access for the user. Although fig. 16 shows the WiFi module 507, it is understood that it does not belong to the essential constitution of the terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 508 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502. Optionally, processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 508.
The terminal also includes a power supply 509 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 508 via a power management system that may be used to manage charging, discharging, and power consumption. The power supply 509 may also include any component such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal may further include a camera, a bluetooth module, and the like, which will not be described herein. Specifically, in this embodiment, the application program interface of the terminal includes a button control area and a gift-giving area, the button control area includes a movable graphic and a plurality of buttons, the processor 508 in the terminal loads an executable file corresponding to one or more processes of the application program into the memory 502 according to the following instructions, and the processor 508 runs the application program stored in the memory 502, so as to implement various functions:
determining a button triggered by a user in the button control area, wherein the button is any one of the plurality of buttons;
laying out a plurality of buttons and movable graphics of the button control area according to the determined buttons; and
and generating and displaying a corresponding gift giving animation in the gift giving area according to the determined button.
In some embodiments, the button control area is a circular control area, the plurality of buttons are circular buttons, the movable graphic is a movable circle, and when the plurality of buttons and the movable graphic of the button control area are laid out according to the determined buttons, the processor 508 is specifically configured to perform the following steps:
and amplifying the button, internally cutting the button into the button control area for display, and adjusting the position of the movable graph so that the movable graph is internally cut into the button control area and externally cut with the button for display.
In some embodiments, when the button is enlarged and displayed within the button control area, and the position of the movable graphic is adjusted, so that the movable graphic is inscribed within the button control area and displayed circumscribed with the button, the processor 508 is specifically configured to perform the following steps:
acquiring preset position information and a preset display radius of the button;
amplifying and internally cutting the button in the button control area for display according to the preset position information and the preset display radius of the button;
calculating the position information of the movable graph according to the preset position information of the button, the preset display radius and the radius of the movable graph;
and adjusting the display position of the movable graph according to the position information of the movable graph, so that the movable graph is internally tangent to the button control area and externally tangent to the button for display.
In some embodiments, the processor 508 is further configured to perform the following steps:
acquiring a dragging track formed by the user dragging the button to switch the button;
adjusting the layout of the button control area according to the dragged trajectory.
In some embodiments, each of the plurality of buttons has an effective control area, and when the dragging trace does not exceed the effective control area of the button, the processor 508 is specifically configured to perform the following steps when adjusting the layout of the button control area according to the dragged trace:
and internally cutting the button into the button control area according to the dragging track for display, and adjusting the position of the movable graph according to the dragging track so that the movable graph is always internally cut into the button control area and externally cut with the button for display.
In some embodiments, when the button is inscribed in the button control area for display according to the dragging track and the position of the movable graphic is adjusted according to the dragging track, so that the movable graphic is always inscribed in the button control area and displayed circumscribed to the button, the processor 508 is specifically configured to perform the following steps:
according to the dragging track and the preset display radius of the button, the button is internally tangent to the button control area for display;
calculating a switching rate according to the dragging track, the preset position information of the button and the preset position information of the adjacent button of the button;
calculating the motion trail of the movable graph according to the switching rate, the position information of the movable graph when the button is triggered and the position information of the movable graph when the adjacent button of the button is triggered;
and adjusting the display position of the movable graph according to the motion track so that the movable graph is always internally tangent to the button control area and externally tangent to the button for display.
In some embodiments, when the dragging trace exceeds the effective control area of the button and enters the effective control area of the adjacent button of the button, the processor 508 is specifically configured to perform the following steps when adjusting the layout of the button control area according to the dragging trace:
and zooming out the buttons, enlarging and internally cutting the adjacent buttons into the button control area for display, and adjusting the position of the movable graph so that the movable graph is internally cut into the button control area and externally cut with the adjacent buttons for display.
In some embodiments, each of the plurality of buttons has an active control area, and when the dragging trajectory does not exceed the active control area of the button, the processor 508 is further configured to:
and in the dragging process, generating and displaying a corresponding gift-giving animation in the gift-giving area according to the button.
In some embodiments, when the dragging trajectory exceeds the effective control area of the button and enters the effective control area of the adjacent button of the button, the processor 508 is further configured to perform the following steps:
and in the dragging process, generating and displaying a corresponding gift giving animation in the gift giving area according to the adjacent button.
In some embodiments, upon determining the button triggered by the user in the button control region, the processor 508 is specifically configured to perform the following steps:
determining the identification information and the triggering mode of the button triggered by the user;
when the corresponding gift-giving animation is generated and displayed in the gift-giving area according to the determined button, the processor 508 is specifically configured to perform the following steps:
determining the gift presenting quantity according to the identification information;
determining a gift presentation mode according to the trigger mode;
and generating and displaying corresponding gift-giving animations in the gift-giving areas according to the gift-giving quantity and the gift-giving mode.
In some embodiments, the trigger mode includes a click or a long press, and when the gift giving mode is determined according to the trigger mode, the processor 508 is specifically configured to perform the following steps:
determining that the gift presenting mode corresponding to clicking is a multiple presenting mode;
determining the gift presentation mode to be the one-by-one presentation mode according to the corresponding gift presentation mode.
The terminal of this embodiment, button control area at application program interface provides a plurality of buttons, after the user triggers a certain button, can be right according to this button a plurality of buttons and the movable figure in button control area carry out the overall arrangement, and can generate corresponding gift presenting animation and show in gift presenting area according to this button, and like this, trigger different buttons, button control area will have different overall arrangements, gift presenting area will show different gift presenting animations, the presentation form of present will be abundant various, the animation effect of gift is vivid changeable, user's appeal has been improved greatly.
An embodiment of the present application further provides a storage device, where the storage device stores a computer program, and when the computer program runs on a computer, the computer is caused to execute the virtual gift giving method in any one of the above embodiments, such as: determining a button triggered by a user in the button control area, wherein the button is any one of the plurality of buttons; laying out a plurality of buttons and movable graphics of the button control area according to the determined buttons; and generating and displaying a corresponding gift-giving animation in the gift-giving area according to the determined button.
In the embodiment of the present application, the storage device may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

Claims (6)

1. A virtual gift giving method applied to a terminal having an interface including a button control area and a gift giving area, the button control area including an active graphic and a plurality of buttons, the virtual gift giving method comprising:
determining a target button triggered by a user in the button control area, wherein the target button is any one of the buttons;
controlling the display state of an un-triggered button in a plurality of buttons in the button control area to be kept unchanged, amplifying the target button and internally cutting the target button into the button control area for display, and adjusting the position of the movable graph according to the triggered button so that the movable graph is internally cut into the button control area and externally cut with the target button for display; and
when the triggering operation of the target button is clicking operation, generating a double-presenting animation based on the present presenting quantity corresponding to the identification information of the target button;
when the triggering operation of the target button is a long-time pressing operation, determining the quantity change speed of the gift giving animation according to the identification information of the target button;
generating presentation animations one by one according to the quantity change speed;
receiving the dragging operation of the target button, and acquiring the dragging track of the target button;
when the dragging track does not exceed the effective control area of the target button, generating and displaying a corresponding gift giving animation in the gift giving area according to the target button; and
according to the dragging track and the preset display radius of the target button, internally cutting the target button in the button control area for display;
calculating a switching rate according to the dragging track, the preset position information of the target button and the preset position information of the adjacent button of the target button;
calculating the motion trail of the movable graph according to the switching rate, the position information of the movable graph when the target button is triggered and the position information of the movable graph when the adjacent button of the button is triggered;
adjusting the display position of the movable graph according to the motion track so that the movable graph is always internally tangent to the button control area and is externally tangent to the triggered button for display;
when the dragging track exceeds the effective control area of the target button and enters the effective control area of the adjacent button of the target button, generating and displaying a corresponding gift giving animation in the gift giving area according to the adjacent button; and
and zooming out the target button, enlarging and internally cutting the adjacent button in the button control area for display, and adjusting the position of the movable graph so that the movable graph is internally cut in the button control area and externally cut with the adjacent button for display.
2. The virtual gift giving method of claim 1, wherein the button control area is a circular control area, the plurality of buttons are circular buttons, and the movable graphic is a movable circle.
3. The virtual gift giving method of claim 2, wherein the enlarging and internally displaying the target button in the button control area and adjusting the position of the movable graphic according to the triggered button such that the movable graphic is internally displayed in the button control area and externally displayed with the target button comprises:
acquiring preset position information and a preset display radius of the target button;
amplifying and internally cutting the button in the button control area for display according to the preset position information and the preset display radius of the target button;
calculating the position information of the movable graph according to the preset position information and the preset display radius of the target button and the radius of the movable graph;
and adjusting the display position of the movable graph according to the position information of the movable graph, so that the movable graph is internally tangent to the button control area and is externally tangent to the target button for display.
4. A virtual gift giving apparatus applied to a terminal having an interface including a button control area and a gift giving area, the button control area including a movable graphic and a plurality of buttons, the apparatus comprising:
a determining unit, configured to determine a target button triggered by a user in the button control area, where the target button is any one of the plurality of buttons;
the layout unit is used for controlling the display state of an unfired button in the plurality of buttons in the button control area to be kept unchanged, amplifying the target button and internally displaying in the button control area, and adjusting the position of the movable graph according to the triggered button so that the movable graph is internally displayed in the button control area and externally displayed with the target button; and
when the triggering operation of the target button is clicking operation, generating a double-presenting animation based on the present presenting quantity corresponding to the identification information of the target button;
when the triggering operation of the target button is a long-time pressing operation, determining the quantity change speed of the gift-giving animation according to the identification information of the target button;
generating presentation animations one by one according to the quantity change speed;
receiving the dragging operation of the target button, and acquiring the dragging track of the target button;
when the dragging track does not exceed the effective control area of the target button, generating and displaying corresponding gift-giving animation in the gift-giving area according to the target button; and
according to the dragging track and the preset display radius of the target button, internally cutting the target button into the button control area for display;
calculating a switching rate according to the dragging track, the preset position information of the target button and the preset position information of the adjacent button of the target button;
calculating the motion trail of the movable graph according to the switching rate, the position information of the movable graph when the target button is triggered and the position information of the movable graph when the adjacent button of the button is triggered;
adjusting the display position of the movable graph according to the motion track so that the movable graph is always internally tangent to the button control area and is externally tangent to the triggered button for display;
when the dragging track exceeds the effective control area of the target button and enters the effective control area of the adjacent button of the target button, generating and displaying a corresponding gift giving animation in the gift giving area according to the adjacent button; and
and zooming out the target button, enlarging and internally cutting the adjacent button in the button control area for display, and adjusting the position of the movable graph so that the movable graph is internally cut in the button control area and externally cut with the adjacent button for display.
5. The virtual gift giving device of claim 4, wherein the button control area is a circular control area, the plurality of buttons are circular buttons, and the movable graphic is a movable circle.
6. A memory device for storing instructions adapted to be loaded by a processor and to perform the steps of the virtual gift giving method of any one of claims 1 through 3.
CN201810709400.8A 2018-07-02 2018-07-02 Virtual gift presenting method and device and storage equipment Active CN109104640B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810709400.8A CN109104640B (en) 2018-07-02 2018-07-02 Virtual gift presenting method and device and storage equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810709400.8A CN109104640B (en) 2018-07-02 2018-07-02 Virtual gift presenting method and device and storage equipment

Publications (2)

Publication Number Publication Date
CN109104640A CN109104640A (en) 2018-12-28
CN109104640B true CN109104640B (en) 2023-02-28

Family

ID=64845371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810709400.8A Active CN109104640B (en) 2018-07-02 2018-07-02 Virtual gift presenting method and device and storage equipment

Country Status (1)

Country Link
CN (1) CN109104640B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656464A (en) * 2018-12-29 2019-04-19 北京字节跳动网络技术有限公司 A kind of processing method of interaction data, device, equipment and storage medium
CN110602513B (en) * 2019-08-20 2022-01-25 北京字节跳动网络技术有限公司 Information processing method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106060676A (en) * 2016-05-17 2016-10-26 腾讯科技(深圳)有限公司 Online interaction method and apparatus based on live streaming
CN106502554A (en) * 2015-09-08 2017-03-15 腾讯科技(深圳)有限公司 A kind of display control method and device
CN107241636A (en) * 2017-05-25 2017-10-10 北京潘达互娱科技有限公司 A kind of virtual gift display method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014028069A1 (en) * 2012-08-17 2014-02-20 Flextronics Ap, Llc Epg aggregation from multiple sources
US8667529B2 (en) * 2012-07-09 2014-03-04 EchoStar Technologies, L.L.C. Presentation of audiovisual exercise segments between segments of primary audiovisual content

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502554A (en) * 2015-09-08 2017-03-15 腾讯科技(深圳)有限公司 A kind of display control method and device
CN106060676A (en) * 2016-05-17 2016-10-26 腾讯科技(深圳)有限公司 Online interaction method and apparatus based on live streaming
CN107241636A (en) * 2017-05-25 2017-10-10 北京潘达互娱科技有限公司 A kind of virtual gift display method and device

Also Published As

Publication number Publication date
CN109104640A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
CN109905754B (en) Virtual gift receiving method and device and storage equipment
WO2016169465A1 (en) Method, apparatus and system for displaying screen information
US20170308263A1 (en) Progress bar with graphical effects to indicate download progress and connection state
WO2019024700A1 (en) Emoji display method and device, and computer readable storage medium
CN111010332A (en) Group chat method and electronic equipment
CN111596818A (en) Message display method and electronic equipment
WO2017129031A1 (en) Information acquisition method and device
CN106303733B (en) Method and device for playing live special effect information
CN110913066A (en) Display method and electronic equipment
CN110673770B (en) Message display method and terminal equipment
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
CN107908765B (en) Game resource processing method, mobile terminal and server
US20170064352A1 (en) Method and system for collecting statistics on streaming media data, and related apparatus
CN109407920B (en) Status icon display method, status icon processing method and related equipment
CN110471588B (en) Application icon sorting method and device and mobile terminal
CN110442279B (en) Message sending method and mobile terminal
CN108984142B (en) Split screen display method and device, storage medium and electronic equipment
CN110908757B (en) Method and related device for displaying media content
CN107944040B (en) Lyric display method and mobile terminal
CN110888568B (en) Notification bar display method and terminal equipment
CN109104640B (en) Virtual gift presenting method and device and storage equipment
CN112817501A (en) Method and related device for displaying media content
CN109800095B (en) Notification message processing method and mobile terminal
CN109889654B (en) Information display method and terminal equipment
CN116594616A (en) Component configuration method and device and computer readable storage medium

Legal Events

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