CN107798718B - Animation playback method and device - Google Patents

Animation playback method and device Download PDF

Info

Publication number
CN107798718B
CN107798718B CN201711044117.XA CN201711044117A CN107798718B CN 107798718 B CN107798718 B CN 107798718B CN 201711044117 A CN201711044117 A CN 201711044117A CN 107798718 B CN107798718 B CN 107798718B
Authority
CN
China
Prior art keywords
animation
time
playback
alternative
starting time
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
CN201711044117.XA
Other languages
Chinese (zh)
Other versions
CN107798718A (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.)
Xiamen Black Mirror Technology Co., Ltd.
Original Assignee
Xiamen Black Mirror 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 Xiamen Black Mirror Technology Co ltd filed Critical Xiamen Black Mirror Technology Co ltd
Priority to CN201711044117.XA priority Critical patent/CN107798718B/en
Publication of CN107798718A publication Critical patent/CN107798718A/en
Application granted granted Critical
Publication of CN107798718B publication Critical patent/CN107798718B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2213/00Indexing scheme for animation
    • G06T2213/12Rule based animation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application discloses an animation playback method and device. One embodiment of the method comprises: in response to receiving a playback request for the target animation, extracting information indicating playback time included in the playback request; selecting alternative starting time as starting time from the alternative starting time set according to the extracted information; acquiring parameter values of parameters of target elements in an animation frame played at the starting moment; determining parameter values of parameters of target elements in each animation frame from the starting moment according to the acquired parameter values; playing back the animation from the playback time according to the determined parameter value. This embodiment improves the efficiency of animation playback.

Description

Animation playback method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for playing back an animation.
Background
Mobile terminals are becoming more and more necessary and various applications based on mobile terminals are increasing. One common mobile terminal application is to use and present animations on a mobile terminal. For example, using an instant messenger on a mobile phone, it is generally necessary to use various emotions to convey emotional information, and these emotions may be embodied in the form of 3D animation.
In the existing communication application, since the animation may be controlled by the multi-party instruction information, if a user wants to play back a historical animation, not only the animation to be played back needs to be calculated, but also a starting point which is not controlled by the multi-party instruction information needs to be found, so as to calculate the parameter value of the parameter of the target element in the animation from the starting point.
Disclosure of Invention
An object of the embodiments of the present application is to provide an improved animation playback method and apparatus, so as to solve the technical problems mentioned in the above background.
In a first aspect, an embodiment of the present application provides an animation playback method, where the method includes: in response to receiving a playback request for the target animation, extracting information indicating playback time included in the playback request; selecting alternative starting time as starting time from the alternative starting time set according to the extracted information; acquiring parameter values of parameters of target elements in an animation frame played at the starting moment; determining parameter values of parameters of target elements in each animation frame from the starting moment according to the acquired parameter values; playing back the animation from the playback time according to the determined parameter value.
In some embodiments, the alternative start times in the alternative start time set are determined by the following steps performed during the target animation play: responding to the continuous section played to the animation, determining the starting time of the continuous section as an alternative starting time, starting timing until the timing reaches a preset threshold value or playing the continuous section, wherein the adjacent instruction information in the continuous section overlaps the control time of the animation; and determining the current moment as the alternative starting moment in response to the timing reaching the preset threshold.
In some embodiments, the alternative start times in the alternative start time set are determined by the following steps performed during the target animation play: and in response to the discontinuous section of the animation is played, determining the starting control time of each piece of instruction information for controlling the discontinuous section as the alternative starting time.
In some embodiments, the alternative start times in the alternative start time set are determined by the following steps performed during the target animation play: and in response to receiving an instruction indicating that the current storage time is the third alternative starting time, determining the current time as the alternative starting time.
In some embodiments, the method further comprises: and storing the parameter values of the parameters of the target elements in the animation frames played at the determined alternative starting moments.
In some embodiments, selecting a starting time from a predetermined set of alternative starting times based on the extracted information comprises: and selecting the alternative starting time which is earlier than the playback time and is closest to the playback time in the alternative starting time set as the starting time.
In a second aspect, an embodiment of the present application provides an animation playback apparatus, where the apparatus includes: an extracting unit configured to extract, in response to receiving a playback request for the target animation, information indicating playback time included in the playback request; the selection unit is used for selecting the alternative starting time from the alternative starting time set as the starting time according to the extracted information; the acquisition unit is used for acquiring parameter values of parameters of target elements in the animation frames played at the starting moment; the determining unit is used for determining the parameter value of the parameter of the target element in each animation frame from the starting time according to the acquired parameter value; and the playback unit is used for playing back the animation from the playback moment according to the determined parameter value.
In some embodiments, the alternative start times in the alternative start time set are determined by the following steps performed during the target animation play: responding to the continuous section played to the animation, determining the starting time of the continuous section as an alternative starting time, starting timing until the timing reaches a preset threshold value or playing the continuous section, wherein the adjacent instruction information in the continuous section overlaps the control time of the animation; and determining the current moment as the alternative starting moment in response to the timing reaching the preset threshold.
In some embodiments, the alternative start times in the alternative start time set are determined by the following steps performed during the target animation play: and in response to the discontinuous section of the animation is played, determining the starting control time of each piece of instruction information for controlling the discontinuous section as the alternative starting time.
In some embodiments, the alternative start times in the alternative start time set are determined by the following steps performed during the target animation play: and determining the current time as the alternative starting time in response to receiving the instruction for indicating that the current time is determined as the third alternative starting time.
In some embodiments, the apparatus further comprises: and storing the parameter values of the parameters of the target elements in the animation frames played at the determined alternative starting moments.
In some embodiments, the selection unit is further configured to: and selecting the alternative starting time which is earlier than the playback time and is closest to the playback time in the alternative starting time set as the starting time.
In a third aspect, an embodiment of the present application provides an apparatus, where the apparatus includes: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the method according to the first aspect.
According to the animation playback method and device provided by the embodiment of the application, the information which is included in the received playback request and used for indicating the playback time is extracted, then the alternative starting time is selected from the alternative starting time set according to the extracted information to serve as the starting time, the parameter values of the parameters of the target elements in the animation frames played at the starting time are obtained, the parameter values of the parameters of the target elements in all the animation frames from the starting time are determined according to the obtained parameter values, and finally the animation is played back from the playback time according to the determined parameter values, so that the animation playback efficiency is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of an animation playback method according to the present application;
FIG. 3 is a schematic diagram of an application scenario of an animation playback method according to the present application;
FIG. 4 is a flow chart of alternative start time determination in an animation playback method according to the application;
FIG. 5 is a schematic diagram of the structure of one embodiment of an animation playback device according to the present application;
FIG. 6 is a block diagram of a computer system suitable for use in implementing a server or terminal according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
FIG. 1 illustrates an exemplary system architecture 100 to which embodiments of the animation playback methods or apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide the medium of transmission links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless transmission links, or fiber optic cables, among others.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may be installed with various applications that require animation display, such as an instant messaging application, a browser application, an e-commerce application, and the like.
The terminal devices 101, 102, 103 may be various electronic devices, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop and desktop computers, and the like.
The server 105 may be a server that provides various services, such as a background server that provides support for an application installed on the terminal device 101, 102, 103 that plays an animation.
The terminal devices 101, 102, and 103 may first extract information indicating playback time included in a received playback request generated in response to a user preset operation, then select an alternative start time from an alternative start time set according to the extracted information as a start time, obtain parameter values of parameters of a target element in an animation frame played at the start time, determine parameter values of parameters of the target element in each animation frame from the start time according to the obtained parameter values, and finally play back an animation from the playback time according to the determined parameter values. The playback request generated in response to the preset operation of the user may also be sent to the server 105, so that the server 105 may first extract information included in the received playback request and used for indicating the playback time, then select an alternative start time from an alternative start time set according to the extracted information as a start time, obtain a parameter value of a parameter of a target element in an animation frame played at the start time, determine a parameter value of a parameter of the target element in each animation frame from the start time according to the obtained parameter value, and finally instruct the terminals 101, 102, 103 to play back the animation from the playback time according to the determined parameter value.
It should be noted that the animation playback method provided in the embodiment of the present application may be executed by the terminal devices 101, 102, and 103 or by the server 105, and accordingly, the animation playback apparatus may be disposed in the terminal devices 101, 102, and 103 or in the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring to FIG. 2, a flow 200 of one embodiment of an animation playback method according to the present application is shown. It should be noted that the animation playback method provided in the embodiment of the present application is generally executed by the terminal devices 101, 102, and 103 or the server 105 in fig. 1. The method comprises the following steps:
in step 201, in response to receiving a playback request for a target animation, information included in the playback request and indicating playback time is extracted.
In the present embodiment, an electronic device (e.g., a terminal or a server shown in fig. 1) on which the animation playback method operates may first extract information indicating playback time included in a playback request in response to receiving the playback request for a target animation. The playback request may be generated in response to detecting a preset user operation for instructing playback of the animation, and the user operation for instructing playback of the animation may be dragging a progress bar of animation playing, clicking a button for playing back the animation, and the like, which is not limited by the present invention. The playback time may be a start time of playback of the animation, for example, if the playback time is 1 minute 50 seconds, the animation is played back from 1 minute 50 seconds.
Taking instant messaging software with a function of displaying animation as an example, when a terminal receives instruction information sent by an opposite terminal, the animation can be automatically played according to the received instruction information, and if a user needs to check the previously played animation in the instruction information playing process or after the instruction information playing is finished, the playback time can be specified through preset operation. The instruction information may include instruction information for instructing to output text, instruction information for instructing to output voice, instruction information for instructing to output a picture, instruction information for instructing to output a video, and instruction information for instructing an operation object to perform a predetermined action, where the operation object may be a pre-established 3D model, such as a virtual object in animation, a virtual character, a virtual article, and the like.
Step 202, selecting an alternative starting time as a starting time from the alternative starting time set according to the extracted information.
In this embodiment, the electronic device may select an alternative starting time from the alternative starting time set as the starting time according to the information extracted in step 201. The start time may be a start time at which a parameter value of a parameter of a target element in an animation frame to be played back is calculated. The parameter value of the parameter of the target element may be a parameter value required for animation playing, for example, the target element is a sphere, the parameter may include a shape parameter and a motion parameter of the sphere, and the motion parameter may include a position, a speed, an acceleration, and the like.
Taking instant messaging software with a function of displaying animation as an example, for frame-by-frame calculation type instruction information, parameter values of parameters of target elements in animation frames at playback time need to be obtained by frame-by-frame iterative calculation from a starting time (such as a starting point of instruction information control time). For example, an animation controlled by a piece of instruction information is the rolling of a basketball on a court. As can be seen from the equation of motion, the path of the basketball movement is dependent upon the position, velocity and acceleration of the basketball at each time, with the position and velocity being calculated at the previous time (the time interval between two adjacent times is sufficiently short), and the acceleration being dependent upon the force applied to the basketball at the current time. In order to reduce the complexity of prediction calculation, the calculation can be performed by adopting a thought of iteration frame by frame, namely, the position of the basketball is calculated frame by frame and is rendered into the picture.
For the case that more than two users simultaneously control the target element in the animation, taking two users as an example, because the instruction information sent by the two users can overlap in control time, the instruction information calculation of the two users can affect each other, for example, the instruction information of the iron ball sent by the user a and the instruction information of the iron ball sent by the user b can cause the situation that the iron balls collide with each other, so that the motion state of the iron ball is changed. Therefore, when determining the starting time of the frame-by-frame calculation type instruction information sent by multiple users, the condition whether the instruction information interferes with other frame-by-frame calculation type instruction information or not is considered; if yes, the user needs to continue to search for the starting time which is not interfered.
As shown in fig. 3, a1, a2 and a3 in the first row represent the instruction information sent by the user a, respectively, b1, b2 and b3 in the second row represent the instruction information sent by the user b, respectively, and the width of each piece of instruction information represents the control time of the instruction information. If the user wants to start playback from time a, in order to obtain the parameter value of the parameter of the target element in the animation frame at time a, calculation is required from the starting point of a3, since the state of the starting point of a3 is obtained under the influence of b1, calculation must be started from the state of the starting point of b1, the state of the starting point of b1 depends on a2, and so on, and finally calculation can be started only from the point O. In this case, the time length calculated on a frame-by-frame basis is lengthened.
The mutually-affected sections, that is, the adjacent instruction information overlaps the control time of the animation, and the adjacent instruction information may be instruction information adjacent to some time in the control time, for example, based on the starting time of the control time, the instruction information a1, a2, a2, b1, b1, a3, a3, b2, b2, b3 received by the electronic device in fig. 3 are adjacent respectively, where a2, b1, b1, a3, a3, b2 have overlapping sections, so the starting point of a2 to the ending point of b2 may be referred to as "continuous section", and as the continuous section is longer, the time length calculated by frame is longer. In order to reduce the frame-by-frame calculation time length, some alternative starting moments can be stored during animation playing according to a preset rule, and after the playback request is extracted to indicate the playback moment, the starting moment is selected according to the playback moment to perform calculation.
In some optional implementations of the present embodiment, the alternative starting time in the alternative starting time set may be determined by the following steps performed during the target animation playing: and in response to receiving an instruction indicating that the current storage time is the third alternative starting time, determining the current time as the alternative starting time. The instruction may be generated in response to detecting a preset user operation, and in this embodiment, the alternative time may also be set according to other rules, for example, one alternative playback time may also be set frame by frame or every predetermined number of frames.
In some optional implementations of this embodiment, selecting a starting time from a predetermined set of alternative starting times according to the extracted information includes: and selecting the alternative starting time which is earlier than the playback time and is closest to the playback time in the alternative starting time set as the starting time. Therefore, the calculation amount is minimum, and the animation playback efficiency is further improved.
In some optional implementations of this embodiment, the method further includes: and storing the parameter values of the parameters of the target elements in the animation frames played at the determined alternative starting moments. The more parameter values are stored, the less computation is required, but the storage overhead is excessive. From the perspective of optimized storage, when the stored parameter value of the alternative starting time exceeds a certain number, the parameter value of the alternative starting time stored earliest can be deleted according to the principle of first-in first-out when the parameter value of the new alternative starting time is stored. Alternatively, the cleaning may be performed periodically according to other rules, for example, the determined alternative starting time is not cleaned in response to receiving an instruction indicating that the current time of storage is the third alternative starting time.
In some optional implementations of the present embodiment, the alternative starting time in the alternative starting time set is determined by the following steps performed during the target animation playing: and in response to the discontinuous section of the animation is played, determining the starting control time of each piece of instruction information for controlling the discontinuous section as the alternative starting time. Non-consecutive segments correspond to consecutive segments, i.e. there are no inter-influencing segments, e.g. the segments where a1 and b3 control the playback in fig. 3.
Step 203, obtaining parameter values of parameters of the target elements in the animation frames played at the starting time.
In this embodiment, the electronic device may obtain the parameter value of the parameter of the target element in the animation frame played at the start time selected in step 202. The parameter values of the parameters of the target elements in the animation frames need to be calculated in the process of playing the animation for the first time, so that the parameters can be stored during playing the animation for the first time, and only the parameter values of the parameters of the target elements in the animation frames at important moments, for example, the parameter values of the parameters of the target elements in the animation frames played at alternative starting moments, can be stored in consideration of storage overhead.
And step 204, determining the parameter values of the parameters of the target elements in each animation frame from the starting time according to the acquired parameter values.
In this embodiment, the electronic device may determine the parameter value of the parameter of the target element in each animation frame from the start time according to the parameter value acquired in step 203. The electronic device can calculate by adopting a frame-by-frame iteration idea, namely calculating parameter values of parameters of target elements in each animation frame by frame from the starting time, and rendering the parameter values to a picture.
Step 205, playing back the animation from the playback time according to the determined parameter value.
In this embodiment, the electronic device may play back the animation from the playback time according to the parameter value determined in step 204. In order to optimize the playing experience, the calculation of the period from the starting time to the playback time can adopt a fast calculation mode, frame rate control can not be carried out during the fast calculation, preset prompt information such as loading characters can be displayed on a picture without direct rendering display, and after parameter values are determined, rendering display is carried out from the playback time according to the determined parameter values.
The method provided by the above embodiment of the application, by extracting the information included in the received playback request and used for indicating the playback time, then selecting the alternative start time from the alternative start time set according to the extracted information as the start time, obtaining the parameter value of the parameter of the target element in the animation frame played at the start time, determining the parameter value of the parameter of the target element in each animation frame from the start time according to the obtained parameter value, and finally playing back the animation from the playback time according to the determined parameter value, the efficiency of animation playback is improved.
With further reference to FIG. 4, a flow 400 for alternative start time determination in an animation playback method is shown. The alternative start time determination process 400 includes the following steps:
step 401, in response to the continuous segment played to the animation, determining the starting time of the continuous segment as an alternative starting time, and starting timing until the timing reaches a preset threshold or the continuous segment is played.
In this embodiment, an electronic device (e.g., the terminal or the server shown in fig. 1) on which the animation playback method operates may determine, in response to playing to a continuous segment of the animation, a start time of the continuous segment as an alternative start time, and start timing until the timing reaches a preset threshold or plays to a discontinuous segment. The timing may be accumulating the playing time according to the normal playing speed, the preset threshold may be set according to actual needs, the longer the threshold is set, the longer the frame-by-frame computing time is, but the storage cost is smaller, and the shorter the threshold is set, the shorter the frame-by-frame computing time is, but the storage cost is larger. The adjacent instruction information in the continuous section has an overlap to the control time of the animation. Referring to fig. 3, the starting point of the a2 control to the ending point of the b2 control are consecutive segments, and the timing may be started from the starting point of the a2 control until the ending point of the b2 control, or the timing reaches a preset threshold.
And 402, in response to the timing reaching a preset threshold, determining the current time as an alternative starting time.
In this embodiment, the electronic device may determine the current time as the alternative starting time in response to the timing reaching the preset threshold. And after the timing reaches the preset threshold, the timing can be re-timed until the timing reaches the preset threshold again, and the time of reaching the preset threshold again is also determined as the alternative starting time.
As can be seen from fig. 4, the alternative start time determination process 400 highlights the specific steps of timing the alternative start time in the middle continuous segment. Thus, the scheme described in the present embodiment avoids the problem that the playback time is too long in frame-by-frame calculation in the case of a continuous segment.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present application provides an embodiment of an animation playback apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the animation playback apparatus 500 of the present embodiment described above includes: an extracting unit 501 configured to extract, in response to receiving a playback request for a target animation, information indicating playback time included in the playback request; a selecting unit 502, configured to select an alternative starting time from the alternative starting time set as a starting time according to the extracted information; an obtaining unit 503, configured to obtain parameter values of parameters of target elements in an animation frame played at an initial time; a determining unit 504, configured to determine, according to the obtained parameter value, a parameter value of a parameter of a target element in each animation frame from the start time; a playback unit 505 for playing back the animation from the playback time according to the determined parameter value.
In this embodiment, for the specific processing of the extracting unit 501, the selecting unit 502, the obtaining unit 503, the determining unit 504, and the playback unit 505 in the animation playback device 500, reference may be made to the related description of the implementation manners of step 201, step 202, step 203, step 204, and step 205 in the corresponding embodiment of fig. 2, and details are not repeated here.
In some optional implementations of the present embodiment, the alternative starting time in the alternative starting time set is determined by the following steps performed during the target animation playing: responding to the continuous section played to the animation, determining the starting time of the continuous section as an alternative starting time, starting timing until the timing reaches a preset threshold value or playing the continuous section, wherein the adjacent instruction information in the continuous section overlaps the control time of the animation; and determining the current moment as the alternative starting moment in response to the timing reaching the preset threshold.
In some optional implementations of the present embodiment, the alternative starting time in the alternative starting time set is determined by the following steps performed during the target animation playing: and in response to the discontinuous section of the animation is played, determining the starting control time of each piece of instruction information for controlling the discontinuous section as the alternative starting time.
In some optional implementations of the present embodiment, the alternative starting time in the alternative starting time set is determined by the following steps performed during the target animation playing: and determining the current time as the alternative starting time in response to receiving the instruction for indicating that the current time is determined as the third alternative starting time.
In some optional implementations of this embodiment, the apparatus further comprises: and storing the parameter values of the parameters of the target elements in the animation frames played at the determined alternative starting moments.
In some optional implementations of the present embodiment, the selecting unit 502 is further configured to: and selecting the alternative starting time which is earlier than the playback time and is closest to the playback time in the alternative starting time set as the starting time.
According to the device provided by the above embodiment of the application, by extracting the information included in the received playback request and used for indicating the playback time, then selecting the alternative start time from the alternative start time set according to the extracted information as the start time, obtaining the parameter value of the parameter of the target element in the animation frame played at the start time, determining the parameter value of the parameter of the target element in each animation frame from the start time according to the obtained parameter value, and finally playing back the animation from the playback time according to the determined parameter value, the efficiency of animation playback is improved.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing the electronic device of an embodiment of the present application. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an extraction unit, a selection unit, an acquisition unit, a determination unit, and a playback unit. Here, the names of these units do not constitute a limitation to the unit itself in some cases, and for example, the extraction unit may also be described as "a unit that extracts information indicating playback time included in the playback request".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: in response to receiving a playback request for the target animation, extracting information indicating playback time included in the playback request; selecting alternative starting time as starting time from the alternative starting time set according to the extracted information; acquiring parameter values of parameters of target elements in an animation frame played at the starting moment; determining parameter values of parameters of target elements in each animation frame from the starting moment according to the acquired parameter values; playing back the animation from the playback time according to the determined parameter value.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (7)

1. A method for playing back an animation, the method comprising:
in response to receiving a playback request for a target animation, extracting information indicating playback time included in the playback request;
selecting alternative starting time as starting time from the alternative starting time set according to the extracted information; storing parameter values of parameters of target elements in the animation frames played at the determined alternative starting time;
acquiring parameter values of parameters of target elements in the animation frames played at the starting moment;
determining parameter values of parameters of target elements in each animation frame from the starting moment according to the acquired parameter values;
playing back the animation from the playback time according to the determined parameter value;
wherein, the determining the parameter value of the parameter of the target element in each animation frame from the starting time according to the obtained parameter value comprises:
iteratively calculating parameter values of parameters of target elements in each animation frame by frame from the starting moment, and rendering the parameter values into a picture;
wherein the alternative starting time in the alternative starting time set is determined by the following steps executed during the playing of the target animation:
responding to a continuous section played to the animation, determining the starting time of the continuous section as an alternative starting time, starting timing until the timing reaches a preset threshold value or playing the continuous section, wherein adjacent instruction information in the continuous section overlaps the control time of the animation;
and determining the current moment as the alternative starting moment in response to the timing reaching the preset threshold.
2. The method of claim 1, wherein the alternative start time in the alternative start time set is determined by the following steps performed during the target animation playback:
and in response to the discontinuous section of the animation is played, determining the starting control time of each piece of instruction information for controlling the discontinuous section as an alternative starting time.
3. The method of claim 1, wherein the alternative start time in the alternative start time set is determined by the following steps performed during the target animation playback:
and in response to receiving an instruction indicating that the current storage time is the third alternative starting time, determining the current time as the alternative starting time.
4. The method of claim 1, wherein selecting a starting time from a predetermined set of alternative starting times based on the extracted information comprises:
and selecting the alternative starting time which is earlier than the playback time and closest to the playback time in the alternative starting time set as the starting time.
5. An animation playback apparatus, characterized in that the apparatus comprises:
an extraction unit configured to extract, in response to receiving a playback request for a target animation, information indicating playback time included in the playback request;
the selection unit is used for selecting the alternative starting time from the alternative starting time set as the starting time according to the extracted information; storing parameter values of parameters of target elements in the animation frames played at the determined alternative starting time;
the acquisition unit is used for acquiring parameter values of parameters of target elements in the animation frames played at the starting moment;
the determining unit is used for determining the parameter value of the parameter of the target element in each animation frame from the starting moment according to the acquired parameter value;
a playback unit configured to play back the animation from the playback time point according to the determined parameter value;
wherein the determining unit determines the parameter value of the parameter of the target element in each animation frame from the start time according to the acquired parameter value, and includes:
iteratively calculating parameter values of parameters of target elements in each animation frame by frame from the starting moment, and rendering the parameter values into a picture;
wherein the alternative starting time in the alternative starting time set is determined by the following steps executed during the playing of the target animation:
responding to a continuous section played to the animation, determining the starting time of the continuous section as an alternative starting time, starting timing until the timing reaches a preset threshold value or playing the continuous section, wherein adjacent instruction information in the continuous section overlaps the control time of the animation;
and determining the current moment as the alternative starting moment in response to the timing reaching the preset threshold.
6. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-4.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201711044117.XA 2017-10-31 2017-10-31 Animation playback method and device Active CN107798718B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711044117.XA CN107798718B (en) 2017-10-31 2017-10-31 Animation playback method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711044117.XA CN107798718B (en) 2017-10-31 2017-10-31 Animation playback method and device

Publications (2)

Publication Number Publication Date
CN107798718A CN107798718A (en) 2018-03-13
CN107798718B true CN107798718B (en) 2021-12-07

Family

ID=61547719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711044117.XA Active CN107798718B (en) 2017-10-31 2017-10-31 Animation playback method and device

Country Status (1)

Country Link
CN (1) CN107798718B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111722896B (en) * 2019-03-21 2021-09-21 华为技术有限公司 Animation playing method, device, terminal and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2198938A2 (en) * 2008-12-16 2010-06-23 Kabushiki Kaisha Square Enix (also trading as Square Enix Co., Ltd.) Game apparatus, game replay displaying method, game program, and recording medium
CN104899912A (en) * 2014-03-07 2015-09-09 腾讯科技(深圳)有限公司 Cartoon manufacture method, playback method and equipment
CN105338297A (en) * 2014-08-11 2016-02-17 杭州海康威视系统技术有限公司 Video data storage and playback system, device and method
CN106933592A (en) * 2017-03-17 2017-07-07 武汉斗鱼网络科技有限公司 Interactive animation generation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2198938A2 (en) * 2008-12-16 2010-06-23 Kabushiki Kaisha Square Enix (also trading as Square Enix Co., Ltd.) Game apparatus, game replay displaying method, game program, and recording medium
CN104899912A (en) * 2014-03-07 2015-09-09 腾讯科技(深圳)有限公司 Cartoon manufacture method, playback method and equipment
CN105338297A (en) * 2014-08-11 2016-02-17 杭州海康威视系统技术有限公司 Video data storage and playback system, device and method
CN106933592A (en) * 2017-03-17 2017-07-07 武汉斗鱼网络科技有限公司 Interactive animation generation method and device

Also Published As

Publication number Publication date
CN107798718A (en) 2018-03-13

Similar Documents

Publication Publication Date Title
CN111245680B (en) Method, device, system, terminal and server for detecting cloud game response delay
CN112261459B (en) Video processing method and device, electronic equipment and storage medium
CN108647051A (en) Optimisation strategy acquisition methods, providing method, device and equipment
CN111436005B (en) Method and apparatus for displaying image
CN112261226A (en) Horizontal screen interaction method and device, electronic equipment and storage medium
CN110267113B (en) Video file processing method, system, medium, and electronic device
CN109271929B (en) Detection method and device
CN112423084B (en) Display method and device of hotspot list, electronic equipment and storage medium
CN109862100B (en) Method and device for pushing information
CN113810773B (en) Video downloading method and device, electronic equipment and storage medium
WO2023273562A1 (en) Video playback method and apparatus, electronic device, and medium
CN111726685A (en) Video processing method, video processing device, electronic equipment and medium
CN107798718B (en) Animation playback method and device
CN109542297B (en) Method and device for providing operation guide information and electronic equipment
CN111857482B (en) Interaction method, device, equipment and readable medium
US10834464B2 (en) Experience-directed dynamic steganographic content switching
CN110162394B (en) Media object playing method and device, electronic equipment and storage medium
CN111385599B (en) Video processing method and device
CN114584709B (en) Method, device, equipment and storage medium for generating zooming special effects
CN110087137B (en) Method, device, equipment and medium for acquiring video playing frame information
CN110225391B (en) Video playing control method and device, electronic equipment and storage medium
CN113658300A (en) Animation playing method and device, electronic equipment and storage medium
CN115988227A (en) Special effect playing method, system and equipment of live broadcast room
CN107066342B (en) Information display method and device
CN111385638B (en) Video processing method and device

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
TA01 Transfer of patent application right

Effective date of registration: 20190528

Address after: 361000 Fujian Xiamen Torch High-tech Zone Software Park Innovation Building Area C 3F-A193

Applicant after: Xiamen Black Mirror Technology Co., Ltd.

Address before: 9th Floor, Maritime Building, 16 Haishan Road, Huli District, Xiamen City, Fujian Province, 361000

Applicant before: XIAMEN HUANSHI NETWORK TECHNOLOGY CO., LTD.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant