CN115002495A - Animation processing method and device - Google Patents

Animation processing method and device Download PDF

Info

Publication number
CN115002495A
CN115002495A CN202210567156.2A CN202210567156A CN115002495A CN 115002495 A CN115002495 A CN 115002495A CN 202210567156 A CN202210567156 A CN 202210567156A CN 115002495 A CN115002495 A CN 115002495A
Authority
CN
China
Prior art keywords
animation
queue
priority
animations
attribute
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.)
Pending
Application number
CN202210567156.2A
Other languages
Chinese (zh)
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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202210567156.2A priority Critical patent/CN115002495A/en
Publication of CN115002495A publication Critical patent/CN115002495A/en
Pending legal-status Critical Current

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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26258Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application provides an animation processing method, which comprises the following steps: acquiring the attribute of the animation to be displayed; determining the priority of the animation according to the attributes, and putting the animation into a queue, corresponding to the priority of the animation, of a preset queue group, wherein the preset queue group comprises at least two queues, and each queue is used for placing the animation with one priority; and taking out the animation from each queue according to the priority sequence corresponding to the queue for displaying. The animation processing method provided by the embodiment of the application can reduce the complexity of setting a proper display sequence for the animation and reduce the maintenance difficulty of the live queue.

Description

Animation processing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an animation processing method and apparatus, a computer device, and a storage medium.
Background
In the live broadcast room, a wide variety of live broadcast animations can be set, and the activity degree of the live broadcast room can be improved by displaying various animations.
Currently, live animations are placed in a single queue and presented in a certain order. In order to distinguish different user sources (such as the user and other users) and animations with different values, the live broadcast room generally sets different priorities for the animations in the queue, so that the animations are displayed more flexibly, and various requirements of the users in the live broadcast room are met.
However, in this way of putting animations in a single queue, when the types of animations are many, setting a proper presentation order for the animations becomes complicated, and the live queue is difficult to maintain.
Disclosure of Invention
The application aims to provide an animation processing method, an animation processing device, computer equipment and a storage medium, which are used for solving the problems that in the existing mode of playing animation by adopting a single queue, setting a proper display sequence for the animation is complex when the types of the animation are more, and a live queue is difficult to maintain.
One aspect of the present embodiments provides an animation processing method, including: acquiring the attribute of the animation to be displayed; determining the priority of the animation according to the attributes, and putting the animation into a queue, corresponding to the priority of the animation, of a preset queue group, wherein the preset queue group comprises at least two queues, and each queue is used for placing the animation with one priority; and taking out the animation from each queue according to the priority sequence corresponding to the queue for displaying.
Optionally, the attributes of the animation include at least one of a user attribute, a resource attribute, a time attribute, and a custom attribute.
Optionally, the taking out the animation from each of the queues for displaying according to the priority order corresponding to the queues includes: and displaying the animation in each queue according to the priority sequence corresponding to the queue, returning to display the animation of the queue with the highest corresponding priority when the animation in the current queue is displayed completely and the priority corresponding to the current queue is the lowest, and otherwise, displaying the animation of the next queue with the corresponding priority smaller than the current queue.
Optionally, the taking out the animation from each of the queues for displaying according to the priority order corresponding to the queues includes: when the animation of one queue is displayed, if the queue with the priority higher than the priority corresponding to the current queue has new animation, the new animation is displayed first, and then the animation of the current queue is continuously displayed.
Optionally, the attribute includes a resource attribute, and the taking out the animation from each queue for display according to the priority order corresponding to the queue includes: determining the resource attribute of the currently taken target animation; and selecting a player corresponding to the resource attribute of the target animation to play and display the target animation.
Optionally, the preset queue group further includes a queue log, and the method further includes: periodically acquiring the queue log; and determining whether each queue normally runs according to the queue log.
Optionally, the method further comprises: acquiring the number of animations in the current queue;
and under the condition that the number of the animations is larger than or equal to the preset number, shortening the display time length of the animations in the current queue according to a preset proportion.
An aspect of an embodiment of the present application further provides an animation processing apparatus, including: the acquisition module is used for acquiring the attribute of the animation to be displayed; the enqueue module is used for determining the priority of the animation according to the attributes and putting the animation into a queue, corresponding to the priority of the animation, in a preset queue group, wherein the preset queue group comprises at least two queues, and each queue is used for placing the animation with one priority; and the display module is used for taking out the animation from each queue according to the priority sequence corresponding to the queue for displaying.
An aspect of the embodiments of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the animation processing method described above.
An aspect of the embodiments of the present application further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is executable by at least one processor to cause the at least one processor to execute the steps of the animation processing method.
The animation processing method, the animation processing device, the computer equipment and the storage medium provided by the embodiment of the application have the following advantages:
the method comprises the steps of determining the priority of the animation according to the attribute of the animation by obtaining the attribute of the animation to be displayed, putting the animation into a queue corresponding to the priority of the animation in a preset queue group, taking out the animation from each queue according to the priority sequence corresponding to the queue for displaying, and displaying the animation through a plurality of queues; because each queue corresponds to the animation with one priority, the proper display sequence can be set for the animation by determining the priority of the animation and putting the priority into the corresponding queue, and the display sequence can be adapted by increasing the number of the queues when the types of the animation are more, so that the complexity of setting the proper display sequence for the animation is reduced, and the maintenance difficulty of the live broadcast queue is also reduced.
Drawings
FIG. 1 schematically illustrates an environmental architecture diagram of an embodiment of the present application;
FIG. 2 is a flow chart schematically illustrating an animation processing method according to a first embodiment of the present application;
FIG. 3 is a flowchart of the substeps of step S430 in FIG. 2;
FIG. 4 is a flow chart of the addition step of FIG. 2;
FIG. 5 is another flow chart of the addition step of FIG. 2;
FIG. 6 is an exemplary diagram of an animation presentation;
FIG. 7 is a block diagram schematically showing an animation processing apparatus according to a second embodiment of the present application;
fig. 8 schematically shows a hardware architecture diagram of a computer device according to a third embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the descriptions relating to "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order of performing the steps, but merely serve to facilitate the description of the present application and to distinguish each step, and therefore should not be construed as limiting the present application.
The following are explanations of terms referred to in the present application:
MP4 animation: animation in MP4 format, wherein MP4 is a standard digital multimedia container format.
SVG animation: an SVG format animation, in which SVG (Scalable Vector Graphics) is a Graphics format based on an extensible markup language for describing two-dimensional Vector Graphics.
Blind box animation: animation in the form of blind boxes, one blind box may include one or more sub-animations.
The main state: the user's own associated operations or states within the live room.
Guest state: the relative operation or status of other users within the live room.
Fig. 1 schematically shows an environment architecture diagram of an embodiment of the present application, and as shown in fig. 1, the following two cases can be distinguished:
firstly, a queue is positioned in a server 100, a user triggers an animation (for example, a gift is sent to a live broadcast owner) by using a client 300, the animation is sent to the server 100 through a network 200, after receiving the animation, the server 100 acquires the attribute of the animation, determines the priority of the animation according to the attribute of the animation, and then puts the animation into a queue in a preset queue group of the server 100, wherein the queue corresponds to the priority of the animation; the server 100 fetches the animation from each queue according to the priority order corresponding to the queue, and the animation is displayed on the client 300 through the network 200. Among them, the client 300 may be one or more.
Secondly, the queues are located in the clients 300, the server 100 receives the animations triggered by the clients 300 through the network 200 and sends the animations triggered by the clients 300 to each client 300 through the network 200, each client 300 obtains attributes of the animations after receiving the animations sent by the server 100, determines priorities of the animations according to the attributes of the animations and then puts the animations into the queues, corresponding to the priorities of the animations, in the preset queue group of the clients 300; the client 300 takes the animation from each queue for display according to the priority order corresponding to the queue.
In an exemplary embodiment, the server 100 may index a data center, such as a single house, or be distributed over different geographic locations (e.g., over several houses). The server 100 may provide services through one or more networks 200.
Network 200 includes various network devices such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. Network 200 may include physical links such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and/or the like. The network 200 may include wireless links, such as cellular links, satellite links, Wi-Fi links, and/or the like.
The client 300 may include a device such as a mobile device, a tablet device, a laptop computer, a smart device (e.g., smart apparel, smart watch, smart glasses), a virtual reality headset, a gaming device, a set-top box, a digital streaming device, a robot, a vehicle terminal, a smart television, a television box, or an e-book reader.
In the related art, live animations are placed in a single queue, and when the types of animations are many, setting a proper display sequence for the animations becomes complicated, and the live queue is difficult to maintain.
According to the animation processing scheme provided by the embodiment of the application, when the types of the animations are more, the complexity of setting a proper display sequence for the animations and the maintenance difficulty of the live queue can be reduced.
The animation processing scheme will be described in the following through several embodiments, and for the sake of understanding, the following will exemplarily describe the client 300 in fig. 1 as an execution subject. It should be noted that the execution subject may also be the server 100 in fig. 1.
Example one
Fig. 2 schematically shows a flow chart of an animation processing method according to a first embodiment of the present application, including steps S410 to S430, which are specifically described as follows:
step S410, obtaining the attribute of the animation to be displayed.
The sources of the animation to be presented may include two types: one is an animation triggered by the user sending out a gift; one is a functional animation, such as an animation triggered by a user upgrade, or an animation triggered by a user purchasing a special order (e.g., an animation triggered by purchasing a captain identity).
For example, the attribute of the animation may include at least one of a user attribute, a resource attribute, a time attribute, a custom attribute, and the like, and the specifically obtained attribute may be set according to actual needs as long as the animation may be prioritized according to the attribute. The user attribute can be an attribute of the animation related to the user or the user state, such as a host state or a guest state; the resource attribute can be an attribute of the animation related to the aspect of the resource, such as a resource type; the time attribute may animate attributes related to aspects of time, such as duration; the custom attribute may be an attribute that is custom for the animation, such as whether it is a batch animation.
For example, if the attribute of the animation is the attribute of the user, the priority of the animation may be divided according to whether the animation is the main state or the guest state, specifically, the animation of the main state may be divided into high priority, and the animation of the guest state may be divided into low priority, so that the user may view the animation triggered by the user preferentially. For another example, if the main execution body of the animation processing method according to the first embodiment of the present application is the server 100, the priority of the animation may be divided according to whether the animation is a VIP user or a normal user.
The attribute of the animation can be obtained according to the associated information of the animation, for example, the user attribute can be determined according to the user triggered by the animation, or the resource attribute can be determined according to the format of the animation.
Step S420, determining the priority of the animation according to the attributes, and placing the animation into a queue corresponding to the priority of the animation in a preset queue group, where the preset queue group includes at least two queues, and each queue is used for placing the animation with one priority.
When determining the priority of the animation according to the attributes of the animation, the priority of the animation may be determined according to one or more attributes, and the specific determination manner may be set according to actual needs. Optionally, when the animation includes multiple attributes, the priorities of multiple dimensions may be set according to the multiple attributes, for example, the animation is divided into two priorities, namely a main state priority and a guest state priority according to the user attribute, and then the animation in the two priorities, namely the main state priority and the guest state priority, is divided into the priorities of other dimensions according to the attributes, such as a resource attribute or a time attribute, for example, the animation in the main state and the guest state is divided into a high-priority animation and a low-priority animation according to the resource attribute. The client 300 may pre-store a mapping relationship between the attribute of the animation and the priority of the animation, so that after the attribute of the animation is obtained, the priority of the animation may be determined according to the mapping relationship. Since each queue is used for placing one priority animation, i.e. each queue corresponds to one priority animation, after determining the priority of the animation, the animation can be placed into the queue corresponding to the priority of the animation. For example, if the priority of an animation is A and the a-queue is used to place animations with priority A, then the animation may be placed into the a-queue.
Step S430, the animation is taken out from each queue according to the priority order corresponding to the queue for displaying.
Since the queue is used for placing the animation with a priority, and the priority has a high-low score, the animation can be taken out from each queue for showing according to the high-low order of the priority.
In an exemplary embodiment, step S430 may include: and displaying the animation in each queue according to the priority sequence corresponding to the queue, returning to display the animation of the queue with the highest corresponding priority when the animation in the current queue is displayed completely and the priority corresponding to the current queue is the lowest, and otherwise, displaying the animation of the next queue with the corresponding priority smaller than the current queue.
Specifically, starting from the corresponding queue with the highest priority, the animation is taken out from the corresponding queue with the highest priority for display, after the animation of the queue with the highest priority is displayed, the animation of the queue with the second highest priority is displayed until the animation in all the queues in the preset queue group is displayed, and then the animation of the queue with the highest priority is displayed. When the animation display of one queue is finished, the client 300 may determine whether the current queue is the queue with the lowest priority, and if so, indicate that the animations of all queues in the preset queue group are completely displayed, return to display the animation of the corresponding queue with the highest priority; if not, the animation of other queues is shown, and the animation of the next queue with the corresponding priority lower than the current queue, namely the animation of the queue with the corresponding priority as the next priority, is shown. Before the animation of one queue is displayed, non-empty judgment can be carried out on the queue, and if the animation of the queue is empty, the queue can be skipped directly to directly display the animation of the next queue.
In this embodiment, the animations in each queue are displayed according to the priority order corresponding to the queue, and when the animation in the current queue is displayed and the priority corresponding to the current queue is the lowest, the animation with the highest priority corresponding to the display is returned, otherwise, the animation with the priority corresponding to the display is smaller than the animation of the next queue in the current queue, and the animations in each queue can be displayed in turn; because the animation display of one queue is not influenced by other queues, the realization is simpler, and the realization difficulty can be reduced.
In an exemplary embodiment, step S430 may include: when the animation of a certain queue is displayed, if the queue with the priority higher than the priority corresponding to the current queue has new animation, the new animation is displayed first, and then the animation of the current queue is continuously displayed.
For example, when the animation of the corresponding queue with the lowest priority is displayed, if a new animation is enqueued in another queue in the preset queue group, the client 300 displays the new animation first and then returns to continue displaying the animation of the current queue.
Because the animation with high priority should be displayed preferentially, if the animation of each queue is displayed in turn according to the corresponding priority sequence strictly, the animation display with high priority is delayed, and the characteristic of higher animation priority cannot be achieved; particularly, when more animations exist in the queue with the lower priority, the animation display delay with high priority is serious, so that when a queue with a priority higher than that of the current queue has new animations to be listed, the new animations are displayed first and then the animations in the current queue are returned to be displayed continuously, the display delay of the animations with high priority can be reduced, and the priority requirements of users on the animations are met. Of course, if new animations continuously come in the corresponding queue with higher priority, the animations in the current queue cannot be displayed in time, optionally, the time of the next animation to be displayed in the current queue may be compared with the time of the new animation, and if the time difference between the two times is greater than a preset threshold, the animation in the current queue is continuously displayed instead of the new animation being displayed first, so as to better ensure the display effect of the animations. Optionally, each queue can be set to display a predetermined number of animations and then automatically switch to the next queue for displaying, and the timeliness of each queue can be well balanced.
In this embodiment, when displaying the animation of a certain queue, if a queue higher than the priority corresponding to the current queue has a new animation, the new animation is displayed first, and then the animation of the current queue is displayed continuously, so that the display delay of the animation with a higher priority can be reduced, and the priority requirement of the user on the animation can be met.
According to the animation processing method provided by the embodiment of the application, the attributes of the animation to be displayed are obtained, the priority of the animation is determined according to the attributes of the animation, the animation is placed into the queues, corresponding to the priority of the animation, in the preset queue group, the animation is taken out from each queue according to the priority sequence corresponding to the queues for displaying, and the animation can be displayed through a plurality of queues; because each queue corresponds to the animation with one priority, the proper display sequence can be set for the animation by determining the priority of the animation and putting the priority into the corresponding queue, and the display sequence can be adapted by increasing the number of the queues when the types of the animation are more, so that the complexity of setting the proper display sequence for the animation is reduced, and the maintenance difficulty of the live broadcast queue is also reduced.
In an exemplary embodiment, step S420 may further include: acquiring the attribute of the sub-animation under the condition that the animation comprises the sub-animation; determining the priority of the sub-animation according to the attribute of the sub-animation; and putting the sub-animation into a queue corresponding to the priority of the sub-animation in a preset queue group.
When receiving an animation, the client 300 may determine whether the animation further includes a sub-animation, and if the animation includes the sub-animation, obtain an attribute of the sub-animation, otherwise, obtain the attribute of the animation. If the animation comprises a plurality of sub-animations, the attribute of each sub-animation is obtained. For example, if the a animation includes three sub-animations a, b, and c, the attributes of the three sub-animations a, b, and c are acquired, respectively.
Since the animation received by the client 300 is sent by the server 100, the server 100 may also determine whether the animation includes a sub-animation, and if the animation includes a sub-animation, the server 100 sends the sub-animation to the client 300, and the client 300 obtains the attribute of the sub-animation.
It is understood that only one of the general animations, i.e. the animation itself, does not include sub-animations; the blind box animation can comprise one or more sub-animations, so that the attributes of the animation can be obtained first, whether the animation is the blind box animation or not is judged according to the attributes of the animation, and the sub-animation and the attributes of the sub-animation are obtained under the condition of the blind box animation.
The attributes of the sub-animations can be the same or different; under the condition that the attributes of the sub-animations are different, the priorities of the sub-animations are different, and therefore the sub-animations are placed into different queues; under the condition that the attributes of the sub-animations are the same, the priorities of the sub-animations with the same attribute are the same, and the sub-animations with the same priority can be placed in the queue according to a random sequence.
For example, if animation A includes two sub-animations, a and b, the priority of the sub-animation is one level, and the priority of the sub-animation is two levels, the sub-animation a is placed in the queue with the corresponding priority of one level, and the sub-animation b is placed in the queue with the corresponding priority of two levels.
In the related art, all kinds of animations are placed in a single queue, and corresponding animations are displayed by setting different priorities, and when an animation is a blind box animation, since the blind box animation may include sub-animations with different priorities, it is difficult to implement a corresponding blind box animation function. In the animation processing method of the embodiment, because the sub-animations with different priorities of the blind box animation can be put into different queues, the corresponding blind box animation function can be realized easily, and even if the number of the blind box animations is large, the blind box animations can be handled easily, so that the batch display of the blind box animations is effectively supported.
In this embodiment, when the animation includes sub-animations, attributes of the sub-animations are obtained, priorities of the sub-animations are determined according to the attributes of the sub-animations, the sub-animations are placed in queues, corresponding to the priorities of the sub-animations, in a preset queue group, and the sub-animations with different priorities can be placed in corresponding queues, so that the function of blind box animation is effectively achieved.
In an exemplary embodiment, the attributes of the animation include resource attributes, and as shown in fig. 3, step S430 may include steps S431 to S432, specifically as follows:
in step S431, the resource attribute of the currently extracted target animation is determined.
The resource attribute of the animation may be determined according to the format of the animation, for example, if the animation is in MP4 format, the resource attribute of the animation may be determined to be MP 4; for another example, if the animation is in SVG format, it can be determined that the resource attribute of the animation is SVG.
And S432, selecting a player corresponding to the resource attribute of the target animation to play and display the target animation.
For example, if the resource attribute of the target animation is MP4, a player of MP4 is selected to play and display the target animation; and if the resource attribute of the target animation is the SVG, selecting a player of the SVG to play and display the target animation.
In this embodiment, the resource attribute of the currently taken target animation is determined, the player corresponding to the resource attribute of the target animation is selected to play and display the target animation, and the player corresponding to the target animation can be selected to play and display the target animation, so that animation compatibility of different resources is improved.
In an exemplary embodiment, the preset queue group further includes a queue log, and as shown in fig. 4, the animation processing method may further include steps S510 to S520, which are specifically as follows:
step S510, periodically obtains a queue log.
The queue log is used to record the show history of each queue animation. Optionally, the preset queue group may include a queue log, and the queue log records the display history of the animations in all queues; or each queue corresponds to a queue log, and the queue log records the display history of the animations in the corresponding queue.
Step S520, determining whether each queue normally operates according to the queue log.
When determining whether the queue normally operates, the determination may be performed through a specific field record in the queue log, for example, whether the queue normally operates is determined through a preset error code, and if no corresponding error code occurs, the queue normally operates, otherwise, the queue abnormally operates. Under the condition that the queue is determined to be abnormal in operation, the condition can be fed back to the server side 100, and operation and maintenance personnel of the server side 100 perform corresponding processing.
In the embodiment, the queue logs are periodically acquired, and whether each queue normally runs or not is determined according to the queue logs, so that the running condition of the queue can be effectively determined, the problem queue can be checked conveniently, and the running stability of the queue is improved.
In an exemplary embodiment, as shown in fig. 5, the animation processing method may further include steps S610 to S620, which are as follows:
step S610, acquiring the number of animations in the current queue.
The client 300 obtains the number of animations in the current queue when the animation in the current queue is just shown or during the process of showing the animation in the current queue.
And S620, under the condition that the number of the animations is larger than or equal to the preset number, shortening the display time length of the animations in the current queue according to the preset proportion.
The preset number can be set according to actual needs, and is not particularly limited herein. The preset number may be different for different queues. For the queues with higher priorities, the preset number can be set to be larger, so that the conditions that the number of the animations in the queues is larger than or equal to the preset number are less, and the display duration of the animations with higher priorities is better ensured to be less influenced; for example, if the preset number of the queue with the highest priority is set to infinity, the number of animations in the queue is not greater than or equal to the preset number, and thus the display duration of the animations in the queue remains the original display duration without being shortened. For the queues with lower priorities, the preset number can be set to be smaller, so that more animations in the queues are larger than or equal to the preset data, the comparison of the priorities of the animations can be more obvious, and the animation display process can be accelerated when the number of the animations is larger.
The preset ratio may be set according to practical applications, such as 0.9, 0.85, or 0.8, and is not limited herein. Optionally, the preset proportion may also be determined according to the number of animations in the queue, where the preset proportion is smaller when the number of animations is larger, and the preset proportion is larger when the number of animations is smaller. Because the display time of the animation is shortened more, the display effect of the animation is greatly influenced, and the preset proportion is not suitable to be too small. For some animations with the display duration incapable of being shortened, the animation can be continuously displayed according to the original display duration.
In this embodiment, by obtaining the number of animations in the current queue, and shortening the display duration of the animations in the current queue according to the preset proportion when the number of animations is greater than or equal to the preset number, the display process of the animations can be accelerated when the number of animations is large, and the display of the animations in the queue can be controlled conveniently.
In order to more clearly explain the animation processing method of the present embodiment, the following examples illustrate the implementation process and the presentation process thereof.
An example of the implementation process of the animation processing method is as follows:
1. downloading on each service terminal (namely client 300), deploying plug-ins corresponding to the animation queue method on a project code hosting platform, and installing through the project code hosting platform, for example, if a new full-screen animation service needs to be developed for a live broadcast related service, the animation queue method can be directly quoted on the terminal;
2. and (3) an animation queue method is instantiated, and a queue method file is introduced into the service code needing to use the queue. Taking full-screen animation of an interactive area of a live broadcast room as an example, the full-screen animation is instantiated as Fullscreen animation service;
3. introducing a fullscreen animation service (full-screen animation instance) at a scene needing a push queue, and calling an addAnimation method to push the queue, wherein parameters needing to be transmitted in the push queue can include: uid (gift user id), id (gift id), type (gift type), demarkation (priority), batchFlag (whether to play in bulk), giftNum (number of gifts), and attachData (business parameter); if the business is expanded, the business parameters can be continuously added in the AttachData;
4. introducing the Fullscreen animation service (full-screen animation example) into a player component, calling a getCurAnimation (obtaining current animation) method to obtain the animation which needs to be played currently, and transmitting the animation to different players for playing according to the resource attribute of the animation; for example, for MP4 animation, an MP4 player is called to play, and for SVG animation, an SVG player is called to play; if other types of animations are expanded, the corresponding player is selected.
An example of the presentation process of the animation processing method is as follows:
1. downloading plug-ins corresponding to the queue method at each service terminal, developing, and then online after development, so that multi-queue animations can be supported in the live related services, wherein the queues can be exemplarily divided into: the system comprises five queues, namely a master state high-priority queue, a master state low-priority queue, a function queue, a guest state high-priority queue and a guest state low-priority queue;
2. a user in a live broadcast room starts to give a gift, and different animations are triggered according to different gift-giving behaviors; for example, user 1 feeds a skyscraper, user 2 feeds a tea-clearing blind box, user 3 feeds a flower, user 4 feeds an interstellar walk, and these different gift-giving behaviors trigger different animations;
3. the terminal of the user 1-the user 4 sends the animation triggered by the gift sending behavior of each user to the server, and the server returns the corresponding animation to the gift sending user through the interface and returns the animation currently fed by other users in the room through broadcasting; monitoring related data of the animation by a queue instance of the terminal and putting the animation into a corresponding queue; for example, taking user 1 as the main state as an example, when monitoring a skyscraper animation returned by a server, an animation queue example pushes the skyscraper animation to the main state high-priority queue because the animation is triggered by a gift sent by the user himself, meanwhile, feeding broadcast data of users 2, 3 and 4 are received, and after monitoring corresponding broadcast data, the animation queue example pushes the animation in the broadcast data to the guest state high-priority queue and the guest state low-priority queue respectively after determining the priority of the animation according to attributes because the broadcast data is triggered by the gifts sent by other users;
4. the player component of the terminal plays the animation according to the animation queue data; for example: in step 3, the animation queue data of the user 1 is: the main state low-priority queue comprises 1 skyscraper animation, the guest state high-priority queue comprises 1 interstellar walking animation, the guest state low-priority queue comprises 1 tea blind box animation and 1 flower spreading animation, and then the terminal player corresponding to the user 1 plays in the order of priority: the animation in the main-state low-priority queue is played first, then the animation in the guest-state high-priority queue is played, and finally the animation in the guest-state low-priority queue is played, and an example of animation display is shown in fig. 6.
Example two
Fig. 7 schematically shows a block diagram of an animation processing apparatus 700 according to the second embodiment of the present application, where the animation processing apparatus 700 may be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the second embodiment of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of the program modules in the embodiments.
As shown in fig. 7, the animation processing apparatus 700 may include an obtaining module 710, an enlisting module 720, and a presentation module 730.
An obtaining module 710, configured to obtain an attribute of an animation to be displayed;
the enqueue module 720 is configured to determine a priority of the animation according to the attribute, and place the animation into a queue, corresponding to the priority of the animation, in a preset queue group, where the preset queue group includes at least two queues, and each queue is used for placing the animation of one priority;
and a display module 730, configured to take the animation from each queue according to the priority order corresponding to the queue for display.
In an exemplary embodiment, the attributes of the animation include at least one of a user attribute, a resource attribute, a time attribute, and a custom attribute.
In the exemplary embodiment, presentation module 730 is further configured to: and displaying the animation in each queue according to the priority sequence corresponding to the queue, returning to display the animation of the queue with the highest corresponding priority when the animation in the current queue is displayed completely and the priority corresponding to the current queue is the lowest, and otherwise, displaying the animation of the next queue with the corresponding priority smaller than the current queue.
In the exemplary embodiment, presentation module 730 is further configured to: when the animation of a certain queue is displayed, if the queue with the priority higher than the priority corresponding to the current queue has new animation, the new animation is displayed first, and then the animation of the current queue is continuously displayed.
In an exemplary embodiment, the attributes of the animation include resource attributes, and the presentation module 730 is further configured to: determining the resource attribute of the currently taken target animation; and selecting a player corresponding to the resource attribute of the target animation to play and display the target animation.
In an exemplary embodiment, the preset queue group includes a queue log, and the animation processing device 700 further includes a troubleshooting module (not shown in the figure) for: periodically acquiring a queue log; and determining whether each queue operates normally according to the queue log.
In an exemplary embodiment, the animation processing apparatus 700 further includes an optimization module (not shown in the figures) for: acquiring the number of animations in the current queue; and under the condition that the number of the animations is greater than or equal to the preset number, shortening the display time length of the animations in the current queue according to a preset proportion.
EXAMPLE III
Fig. 8 schematically shows a hardware architecture diagram of a computer apparatus 800 suitable for an animation processing method according to a third embodiment of the present application. The computer device 800 may be a device capable of automatically performing numerical calculations and/or data processing according to instructions set or stored in advance. For example, the server may be a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers), a gateway, and the like. As shown in fig. 8, computer device 800 includes at least, but is not limited to: memory 810, processor 820, and network interface 830 may be communicatively linked to each other by a system bus. Wherein:
the memory 810 includes at least one type of computer-readable storage medium including flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 810 may be an internal storage module of the computer device 800, such as a hard disk or memory of the computer device 800. In other embodiments, the memory 810 may also be an external storage device of the computer device 800, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 800. Of course, memory 810 may also include both internal and external memory modules of computer device 800. In this embodiment, the memory 810 is generally used for storing an operating system and various kinds of application software installed in the computer apparatus 800, such as program codes of animation processing methods, and the like. In addition, the memory 810 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 820 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 820 generally serves to control overall operation of the computer device 800, such as performing control and processing related to data interaction or communication with the computer device 800. In this embodiment, processor 820 is used to execute program codes stored in memory 810 or process data.
The network interface 830 may include a wireless network interface or a wired network interface, and the network interface 830 is typically used to establish communication links between the computer device 800 and other computer devices. For example, the network interface 830 is used to connect the computer apparatus 800 with an external terminal through a network, establish a data transmission channel and a communication link between the computer apparatus 800 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
It is noted that FIG. 8 only shows a computer device having components 810 and 830, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the animation processing method stored in the memory 810 may be further divided into one or more program modules, and executed by one or more processors (in this embodiment, the processor 820) to complete the embodiment of the present application.
Example four
Embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the animation processing method in the embodiments.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage units of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in the computer device, for example, the program code of the animation processing method in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different from that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. An animation processing method, comprising:
acquiring the attribute of the animation to be displayed;
determining the priority of the animation according to the attributes, and putting the animation into a queue, corresponding to the priority of the animation, of a preset queue group, wherein the preset queue group comprises at least two queues, and each queue is used for placing the animation with one priority;
and taking out the animation from each queue according to the priority sequence corresponding to the queue for displaying.
2. The animation processing method as claimed in claim 1, wherein the attribute of the animation includes at least one of a user attribute, a resource attribute, a time attribute, and a custom attribute.
3. The animation processing method as claimed in claim 1, wherein the fetching of the animation from each of the queues for presentation according to the priority order corresponding to the queue comprises:
and displaying the animation in each queue according to the priority sequence corresponding to the queue, returning to display the animation of the queue with the highest corresponding priority when the animation in the current queue is displayed completely and the priority corresponding to the current queue is the lowest, and otherwise, displaying the animation of the next queue with the corresponding priority smaller than the current queue.
4. The animation processing method according to claim 1, wherein the taking out the animation from each of the queues for display according to the priority order corresponding to the queues comprises:
when the animation of one queue is displayed, if the queue with the priority higher than the priority corresponding to the current queue has new animation, the new animation is displayed first, and then the animation of the current queue is continuously displayed.
5. The animation processing method as claimed in any one of claims 1 to 4, wherein the attributes include resource attributes, and the taking out the animation from each of the queues for presentation according to the priority order corresponding to the queues comprises:
determining the resource attribute of the currently taken target animation;
and selecting a player corresponding to the resource attribute of the target animation to play and display the target animation.
6. The animation processing method as claimed in any one of claims 1 to 4, wherein the preset queue group further includes a queue log, the method further comprising:
periodically acquiring the queue log;
and determining whether each queue normally runs according to the queue log.
7. The animation processing method according to any one of claims 1 to 4, further comprising:
acquiring the number of animations in the current queue;
and under the condition that the number of the animations is greater than or equal to the preset number, shortening the display time of the animations in the current queue according to a preset proportion.
8. An animation processing apparatus, comprising:
the acquisition module is used for acquiring the attribute of the animation to be displayed;
the enqueue module is used for determining the priority of the animation according to the attributes and putting the animation into a queue, corresponding to the priority of the animation, in a preset queue group, wherein the preset queue group comprises at least two queues, and each queue is used for placing the animation with one priority;
and the display module is used for taking out the animation from each queue according to the priority sequence corresponding to the queue for displaying.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the computer program, is adapted to carry out the steps of the animation processing method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which is executable by at least one processor to cause the at least one processor to perform the steps of the animation processing method as claimed in any one of claims 1 to 7.
CN202210567156.2A 2022-05-23 2022-05-23 Animation processing method and device Pending CN115002495A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210567156.2A CN115002495A (en) 2022-05-23 2022-05-23 Animation processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210567156.2A CN115002495A (en) 2022-05-23 2022-05-23 Animation processing method and device

Publications (1)

Publication Number Publication Date
CN115002495A true CN115002495A (en) 2022-09-02

Family

ID=83027201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210567156.2A Pending CN115002495A (en) 2022-05-23 2022-05-23 Animation processing method and device

Country Status (1)

Country Link
CN (1) CN115002495A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116721187A (en) * 2023-06-15 2023-09-08 广州极尚网络技术有限公司 Animation dynamic loading and unloading method, device, equipment and medium based on scene cutting

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391283A (en) * 2017-08-16 2017-11-24 郑州云海信息技术有限公司 A kind of message treatment method and device
WO2018113648A1 (en) * 2016-12-23 2018-06-28 腾讯科技(深圳)有限公司 Animation playing method and device, client, video live broadcast system, and storage medium
CN110764921A (en) * 2018-07-24 2020-02-07 北京京东尚科信息技术有限公司 Carousel graph display method and device, electronic equipment and computer readable medium
CN112188224A (en) * 2020-09-28 2021-01-05 广州华多网络科技有限公司 Interface message flow control method, device, equipment and storage medium
CN112770128A (en) * 2020-12-31 2021-05-07 百果园技术(新加坡)有限公司 Playing system, method and device of live gift and server
CN113157366A (en) * 2021-04-01 2021-07-23 北京达佳互联信息技术有限公司 Animation playing method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018113648A1 (en) * 2016-12-23 2018-06-28 腾讯科技(深圳)有限公司 Animation playing method and device, client, video live broadcast system, and storage medium
CN108243151A (en) * 2016-12-23 2018-07-03 腾讯科技(深圳)有限公司 A kind of automatic animation playing method, device, client and video living transmission system
CN107391283A (en) * 2017-08-16 2017-11-24 郑州云海信息技术有限公司 A kind of message treatment method and device
CN110764921A (en) * 2018-07-24 2020-02-07 北京京东尚科信息技术有限公司 Carousel graph display method and device, electronic equipment and computer readable medium
CN112188224A (en) * 2020-09-28 2021-01-05 广州华多网络科技有限公司 Interface message flow control method, device, equipment and storage medium
CN112770128A (en) * 2020-12-31 2021-05-07 百果园技术(新加坡)有限公司 Playing system, method and device of live gift and server
CN113157366A (en) * 2021-04-01 2021-07-23 北京达佳互联信息技术有限公司 Animation playing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116721187A (en) * 2023-06-15 2023-09-08 广州极尚网络技术有限公司 Animation dynamic loading and unloading method, device, equipment and medium based on scene cutting
CN116721187B (en) * 2023-06-15 2024-01-30 广州极尚网络技术有限公司 Animation dynamic loading and unloading method, device, equipment and medium based on scene cutting

Similar Documents

Publication Publication Date Title
CN111045715B (en) Cloud game hot updating method, system and readable storage medium
US11200157B1 (en) Automated execution reporting for container builds
EP2989543B1 (en) Method and device for updating client
CN108721898B (en) Frame rate determination method and apparatus, storage medium, and electronic apparatus
CN113179206B (en) Session display method, session acquisition method, device, equipment, system and medium
CN109756766B (en) Virtual gift display method, storage medium, electronic device and system of live broadcast platform
CN111552550A (en) Task scheduling method, device and medium based on GPU (graphics processing Unit) resources
CN113225607B (en) Method and system for displaying gift in live broadcast room
CN107172501A (en) Recommend methods of exhibiting and system in a kind of live room
CN115002495A (en) Animation processing method and device
CN110297718A (en) Interface element linkage processing method, device and equipment
CN114979029A (en) Control method, device, equipment and storage medium of virtual robot
CN112148393A (en) User team forming method based on social platform mini-game
CN107018166B (en) Service display method and terminal
CN112084044A (en) Event processing method in system and related device
CN111052072B (en) Installation-free application program downloading method and device
EP4206886A1 (en) Method and apparatus for displaying an interface for emoji input
CN114296865B (en) Scheduling method and device for virtual machine threads, electronic equipment and storage medium
CN108829824B (en) Resource processing method and device in internet operation activity
CN113760581A (en) MQTT-based method and system for synchronizing attribute information of intelligent terminal
CN114584827B (en) Red packet processing method and device
CN112085226A (en) System maintenance method and device compatible with multi-model equipment
CN106445978A (en) Real-time information display method and apparatus
CN111026558B (en) Bullet screen processing method and system based on WeChat applet
CN112221158B (en) Game resource processing method and device, storage medium and electronic equipment

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