CN110007907B - Animation execution method and device - Google Patents
Animation execution method and device Download PDFInfo
- Publication number
- CN110007907B CN110007907B CN201910009346.0A CN201910009346A CN110007907B CN 110007907 B CN110007907 B CN 110007907B CN 201910009346 A CN201910009346 A CN 201910009346A CN 110007907 B CN110007907 B CN 110007907B
- Authority
- CN
- China
- Prior art keywords
- animation
- execution
- executed
- adaptation layer
- page element
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses an animation execution method and device, relates to the technical field of computers, and mainly aims to execute an animation in an application adaptation layer by using a specified animation execution instruction, reduce processing resources occupied by executing the animation and improve the processing efficiency of animation execution. The main technical scheme of the invention is as follows: acquiring an animation to be executed according to an animation execution instruction, wherein the animation to be executed comprises at least one page element animation which is declared independently; generating the animation object of the animation to be executed by the application engine according to the animation parameters of the page element animation; sending the animation object to an adaptation layer of an application by an application engine through a preset animation execution interface; parsing the animated object into executable objects in the adaptation layer; and executing the executable object at the adaptation layer, and displaying the animation to be executed. The method is mainly used for executing the page animation in the application.
Description
Technical Field
The invention relates to the technical field of computers, in particular to an animation execution method and device.
Background
With the increasing demand of users for experience, the demand for animation in applications is higher and higher, and continuous animation or simultaneous movement of multiple elements is often required. At present, most animations used in a page are JavaScript animations, and a timer is used to implement continuous operation of a screen.
However, if a continuous and complex piece of animation is to be implemented, using JavaScript code not only writes very redundantly, but also results in a deep nesting level that forms a "call-back prison". Meanwhile, since the animation execution requires the use of a large number of timers, the problem of occupying processing resources due to the excessive use of the timers is caused.
Disclosure of Invention
In view of the above problems, the present invention provides an animation execution method and apparatus, and a main object of the present invention is to execute an animation in an adaptation layer of an application by using a specified animation execution instruction, so as to reduce processing resources occupied by executing the animation and improve processing efficiency of executing the animation.
In order to achieve the purpose, the invention mainly provides the following technical scheme:
in one aspect, the present invention provides an animation executing method, which specifically includes:
acquiring an animation to be executed according to an animation execution instruction, wherein the animation to be executed comprises at least one page element animation which is declared independently;
generating the animation object of the animation to be executed by the application engine according to the animation parameters of the page element animation;
sending the animation object to an adaptation layer of an application by an application engine through a preset animation execution interface;
parsing the animated object into executable objects in the adaptation layer;
and executing the executable object at the adaptation layer, and displaying the animation to be executed.
In another aspect, the present invention provides an animation executing apparatus, including:
the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring an animation to be executed according to an animation execution instruction, and the animation to be executed comprises at least one independently declared page element animation;
the object generating unit is used for generating the animation object of the animation to be executed, which is acquired by the acquiring unit, by an application engine according to the animation parameters of the page element animation;
the sending unit is used for sending the animation object obtained by the object generating unit to an application adaptation layer by an application engine through a preset animation execution interface;
the analysis unit is used for analyzing the animation object sent by the sending unit into an executable object in the adaptation layer;
and the animation execution unit is used for executing the executable object obtained by the analysis unit in the adaptation layer and displaying the animation to be executed.
In another aspect, the present invention provides a storage medium for storing a computer program, where the computer program controls a device on which the storage medium is located to execute the above animation execution method when running.
In another aspect, the present invention provides an electronic device, where the electronic device includes a processor and a memory, and the processor is configured to call program instructions in the memory to execute the above animation execution method.
By means of the technical scheme, when an animation execution instruction is obtained, the animation to be executed is obtained, the animation object is generated by the application engine according to the animation parameters in the animation to be executed, the animation object is sent to the adaptation layer of the application, the animation object is analyzed into the executable object of the animation in the adaptation layer, and the corresponding animation is obtained through execution. Compared with the existing animation execution in the bottom layer of the application, which needs to be realized by a large number of timers and complex execution codes, the invention enables the animation execution process to be completed in the adaptation layer of the application by declaring a single page element animation and a self-defined animation execution instruction, and does not need to be realized by complex codes and repeated call-back functions at the bottom layer of the application, thereby greatly simplifying the code writing of the animation and improving the maintainability of the animation codes.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating a method for executing an animation according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another animation execution method proposed by an embodiment of the present invention;
FIG. 3 is a block diagram showing components of an animation executing apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram showing another animation execution apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention provides an animation execution method, which is used for realizing page animation in application, improving the execution efficiency of the animation and reducing the occupied processing resource. The specific steps of the method are shown in fig. 1, and the method comprises the following steps:
The animation execution instruction refers to a custom instruction called by the bottom layer code and used for calling and executing the corresponding animation to be executed when the animation needs to be displayed in an application page in the running process of the application. The animation to be executed comprises at least one individually declared page element animation, namely the animation to be executed is formed according to the defined animation content (including the page elements), and the animation corresponding to each page element is individually declared through presetting. That is, the animation to be executed may be one or a set of actions of one page element, or may be one or a set of actions collectively constituted by a plurality of page elements. Before the invention is executed, it is necessary to declare all the page elements in the page that are involved in the animation, where the declaration is used to define the relevant animation parameters and corresponding parameter values of the page elements during the animation process, for example, declare the change of the moving direction, size or color of a page element during the animation process.
And 102, generating an animation object of the animation to be executed by the application engine according to the animation parameters of the page element animation.
Generally, in the existing application animation, an animation code is executed by a business engine in an application engine layer, and the execution result of the animation is shown. In the invention, the business engine in the application engine layer only needs to create an animation object according to the animation parameters of the related page elements in the animation to be executed, and returns the animation object as a return value to the animation code of the bottom layer so as to inform the bottom layer that the animation object to be displayed in the application engine layer is created.
And 103, sending the animation object to an adaptation layer of the application by the application engine through a preset animation execution interface.
After receiving the animation object fed back by the application engine layer, the application bottom layer sends the animation object through an animation execution interface preset in the service engine, or sends the code or character string expressing the animation object to an adaptation layer of the application in the bottom layer.
It can be seen from the above two steps that the application engine layer in the present invention does not directly process the animation codes, but creates corresponding objects according to the animation to be executed and informs the bottom layer, and then transfers the objects to be executed with animation, or codes and character strings representing the objects, to the adaptation layer of the application through the preset interface, that is, the service engine in the application engine layer only provides a data transmission channel between the bottom layer and the adaptation layer for the animation to be executed, and the execution of the animation is completed in the adaptation layer.
Since the animation object is generated by the application engine layer according to the recognition method of the underlying code, the animation object, or the code or character string representing the animation object cannot be directly applied in the adaptation layer, and therefore, the content of the animation object needs to be analyzed and converted into an executable object capable of recognizing the application in the adaptation layer. The attribute value of the executable object comprises animation parameters corresponding to at least one page element animation.
And 105, executing the executable object in the adaptation layer, and displaying the animation to be executed.
After the application adaptation layer obtains the executable object, the page element animation contained in the executable object can be executed according to the value of the object attribute in the executable object, so that the animation display is realized.
As can be seen from the above example, the animation execution method provided in the embodiments of the present invention is a new animation implementation scheme proposed in a current application framework, and by declaring animations of each page element in a bottom layer code and declaring a complex animation to be executed with the animations of the individual page elements, when the animation to be executed is called and executed, an animation object corresponding to the animation to be executed is sent to an adaptation layer of an application through an animation execution interface preset in an application engine layer to be analyzed and executed, and an execution result of the animation to be executed is displayed. Therefore, the invention designs a set of new animation declaration mechanism, simplifies the existing complex animation codes by declaring single animation and combining the animation, and avoids the situation of 'call back to prison' in the existing animation codes.
To further explain the specific method for executing the animation, the following will specifically explain the implementation based on javascript technology by the embodiment shown in fig. 2, and the steps are shown in fig. 2 and include:
The page element animation refers to animation of one element or a combination of a plurality of elements in a page, when declaring the page element animation, animation parameters need to be determined according to the content of the animation, and the page element animation is declared based on the animation parameters, for example, statements declared to the page element animation in practical application are as follows:
wherein, the "accessibility" and the "color" respectively state the transparency and the color change of the page element in a certain animation process, the transparency is changed from 0 to 1, which means that the page element is not displayed to be displayed, and the color is changed from "# fff" to "# 000", and the execution process of the animation is also stated to be the duration of "2000" milliseconds.
As can be seen from the above description, animation parameters set in different animation processes for the same page element are different, so that when declaring a page element animation for the same page element, multiple animations can be declared, and for distinguishing between different animations, different identifiers, such as element _1. animation and element _2. animation, need to be marked for the different animations.
Furthermore, in addition to the animation declaration for a single page element, for an animation composed of a combination of a plurality of page elements, for ease of recall, one page element animation group may also be declared according to the execution order of the respective page element animations. In the embodiment of the present invention, the provided page element animation group includes common serial animation and parallel animation, for example, element _1. animation, element _2. animation, and element _3. animation are respectively declared 3 page element animations, and a statement corresponding to executing the 3 page element animations is:
var animate_1=element_1.animate(...);
var animate_2=element_2.animate(...);
var animate_3=element_3.animate(...);
wherein "(-) is a specific animation parameter required for the above statement, and is not listed here one by one. When a combined animation in which the first two page elements are parallel needs to be presented, it is declared as ajx.ui.parallelanimate ([ Animate _1, Animate _2]), and a statement corresponding to the parallel animation to be executed is var Animate ═ ajx.ui.parallelanimate ([ Animate _1, Animate _2 ]). Correspondingly, when a combined animation formed by the two last page elements is required to be presented, the statement is ajx.ui.serial animation ([ animation _2, animation _3]), and the statement corresponding to the parallel animation is var animation ═ ajx.ui.serial animation ([ animation _2, animation _3 ]).
Further, the string-parallel combination between the animations of the various page elements can also be declared independently, such as the following examples:
var serialAnimate=ajx.ui.serialAnimate([animate_2,animate_3]);
var animate=ajx.ui.parallelAnimate([animate_1,serialAnimate]);
the method comprises the steps that a serial interrupt statement is executed by interrupt _2 and interrupt _3 in series, an interrupt statement is executed by interrupt _1 and serial interrupt in parallel, when the execution process of each page element animation is correspondingly obtained, the execution of interrupt is executed in parallel with interrupt _1 while the serial interrupt _2 and interrupt _3 are executed, or when the execution sequence in the serial interrupt is that interrupt _2 is executed first and then interrupt _3 is executed, the execution of interrupt is executed in order that interrupt _1 and interrupt _2 are executed simultaneously, and interrupt _3 is executed after interrupt _2 is executed.
And step 202, acquiring the animation to be executed according to the animation execution instruction.
Corresponding to the example listed in step 201 above, the animation execution instruction is either var animate or var serial animate. The obtained animation to be executed is each page element animation of which the content contained in the animation execution instruction is a statement and the execution sequence relation among the page element animations.
In addition, the animation execution instructions in the present invention also include some conventional animation function instructions, such as instructions to execute animation, pause animation, cancel animation, etc. The specific steps are the same as the instruction codes written in the javascript in the prior art, and are not described here.
And step 203, generating an animation object of the animation to be executed by the application engine according to the animation parameters of the page element animation.
And step 204, sending an animation execution event to the adaptation layer through a preset animation execution interface.
In this embodiment, while the application engine generates an animation object, it sends an animation execution event to the adaptation layer, where the content in the animation execution event includes identification information of the animation object or information such as corresponding animation parameters, and the purpose of the animation execution event is to inform the adaptation layer that an animation needs to be executed by the current application, where the animation is an animation object with identification information, so that the adaptation layer processes an object corresponding to the identification information according to the animation execution event, and then displays a page animation.
And step 205, sending the animation object to an adaptation layer of the application through a preset animation execution interface.
After receiving the animation object generated by the application engine, the bottom layer of the application converts the animation object into a character string in a json format, and sends the character string in the json format to the adaptation layer of the application through an animation execution interface preset by the engine layer.
The parsing process is to parse the json-format character string into an executable object that can be executed in the adaptation layer, and since the embodiment is implemented based on javascript technology, parsing the json-format character string into the executable object is to convert the executable object into a js object, and the specific method may be implemented by any one of the existing conversion methods, which is not illustrated here.
And step 207, executing the executable object in the adaptation layer, and displaying the animation to be executed.
When the executable object is executed, the adaptation layer is based on the object attribute in the executable object, and the object attribute mainly includes animation parameters in each page element animation or page element animation group in the executable object, and may also include an execution sequence relationship between each page element animation and each page element animation group, i.e., a serial or parallel execution relationship.
Specifically, for an executable object corresponding to a page element animation, a specific example of execution includes the following main principles: setting a timer with the same refresh rate as the screen, wherein the screen is a display screen of the intelligent device where the application is located, and then executing the executable object according to the animation parameters corresponding to the animation of the page element and the execution sequence relation, namely refreshing the specific values in the animation parameters through the timer, thereby realizing the dynamic change operation of the page element in the page.
As can be seen from the specific steps of the embodiment shown in fig. 2, although the animation execution method provided by the present invention adopts javascript technology, the execution process and implementation principle of the animation execution method are completely different from the existing animation execution mode, and in the code writing process, the invention provides a separate declaration for elements in a page according to the required animation, so that when the animation is executed, the elements can be directly called according to the declared object, and thus a large number of callback functions are not required, and the written code has higher readability and maintainability; in the animation execution process, the invention provides the execution in the adaptation layer of the application instead of the business engine processing in the engine layer, so that the processing resources occupying the engine can be reduced, the application can run more smoothly, and the application experience of a user is improved. Meanwhile, since the animation is executed in the adaptation layer according to the animation execution event, a large number of timers are not required to be arranged, so that the requirement on processing resources is reduced, and the running efficiency of the application is improved.
Further, as an implementation of the method shown in fig. 1 and fig. 2, an embodiment of the present invention provides an animation executing apparatus, where the apparatus is used to display an animation in an application page. For convenience of reading, details in the foregoing method embodiments are not described in detail again in this apparatus embodiment, but it should be clear that the apparatus in this embodiment can correspondingly implement all the contents in the foregoing method embodiments. As shown in fig. 3, the apparatus specifically includes:
the acquiring unit 31 is configured to acquire an animation to be executed according to an animation execution instruction, where the animation to be executed includes at least one separately declared page element animation;
an object generating unit 32, configured to generate, by an application engine, an animation object of the animation to be executed, which is acquired by the acquiring unit 31, according to the animation parameters of the page element animation;
a sending unit 33, configured to send, by an application engine, the animation object obtained by the object generating unit 32 to an adaptation layer of an application through a preset animation execution interface;
a parsing unit 34, configured to parse the animation object sent by the sending unit 33 into an executable object in the adaptation layer, where the executable object can execute the animation of the page element in the executable object according to the object attribute in the adaptation layer;
and an animation executing unit 35, configured to execute the executable object obtained by the parsing unit 34 according to the object attribute.
Further, as shown in fig. 4, the apparatus further includes:
an event sending unit 36, configured to send an animation execution event to the adaptation layer through a preset animation execution interface after the object generating unit 32 executes the animation object of the animation to be executed, which is generated by the application engine according to the animation parameters of the page element animation;
the parsing unit 34 is further configured to, at the adaptation layer, perform the operation of parsing the animation object into an executable object according to the animation execution event sent by the event sending unit 36.
Further, as shown in fig. 4, the apparatus further includes:
the animation declaring unit 37 is used for declaring the animation of the page element according to the animation parameters of the page element, wherein the animation parameters at least comprise color, transparency and duration;
the animation declaration unit 37 is further configured to declare a page element animation group according to an execution order of the plurality of page element animations.
Further, the animation executing instructions at least comprise: serial animation instructions and parallel animation instructions.
Further, as shown in fig. 4, the animation executing unit 35 includes:
a setting module 351, configured to set a timer that is the same as the screen refresh rate;
an executing module 352, configured to execute the executable object according to the animation parameter set by the setting module 351 and corresponding to the page element animation.
In summary, the animation execution method and apparatus adopted in the embodiments of the present invention can implement efficient display of an animation in an application page, although the animation execution method provided by the present invention is also based on javascript technology, the execution process and implementation principle of the animation execution method are completely different from the existing animation execution mode, and in the code writing process, the present invention provides a separate declaration of elements in a page according to a required animation, so that when the animation is executed, the elements can be directly called according to the declared object, and thus a large number of callback functions are not required, and the written code has higher readability and maintainability; in the animation execution process, the invention provides the execution in the adaptation layer of the application instead of the business engine processing in the engine layer, so that the processing resources occupying the engine can be reduced, the application can run more smoothly, and the application experience of a user is improved. Meanwhile, since the animation is executed in the adaptation layer according to the animation execution event, a large number of timers are not required to be arranged, so that the requirement on processing resources is reduced, and the running efficiency of the application is improved.
Further, an embodiment of the present invention further provides a storage medium, where the storage medium is used for storing a computer program, where the computer program controls, when running, a device on which the storage medium is located to execute the above animation execution method.
In addition, the embodiment of the present invention further provides an electronic device, where the electronic device includes a processor and a memory, and the processor is configured to call program instructions in the memory to execute the above animation execution method.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In addition, the memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (12)
1.An animation execution method, characterized in that the method comprises:
acquiring an animation to be executed according to an animation execution instruction, wherein the animation to be executed comprises at least one page element animation which is declared independently;
generating the animation object of the animation to be executed by the application engine according to the animation parameters of the page element animation;
sending the animation object to an adaptation layer of an application by an application engine through a preset animation execution interface, wherein the adaptation layer comprises: transmitting an animation object of the animation to be executed to an adaptation layer of an application through a preset interface by an application engine or transmitting a code or a character string expressing the animation object to the adaptation layer of the application in the bottom layer after receiving the animation object fed back by the application engine layer by the application engine, wherein a service engine in the application engine layer only provides a data transmission channel between the bottom layer and the adaptation layer for the animation to be executed;
parsing the animated object into executable objects in the adaptation layer;
and executing the executable object at the adaptation layer, and displaying the animation to be executed.
2. The method of claim 1, wherein after generating, by an application engine, the animation object to be animated according to animation parameters of the page element animation, the method further comprises:
sending an animation execution event to the adaptation layer through a preset animation execution interface;
and the adaptation layer executes the operation of analyzing the animation object into an executable object according to the animation execution event.
3. The method of claim 1, further comprising:
declaring a page element animation according to animation parameters of the page element, wherein the animation parameters at least comprise color, transparency and duration;
the page element animation group is declared according to an execution order of the plurality of page element animations.
4. The method of any of claims 1-3, wherein the animation execution instructions comprise at least: serial animation instructions and parallel animation instructions.
5. The method according to claim 1, wherein the executing the executable object at the adaptation layer specifically comprises:
setting a timer with the same screen refresh rate;
and executing the executable object according to the animation parameters corresponding to the timer and the page element animation.
6. An animation execution apparatus, characterized in that the apparatus comprises:
the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring an animation to be executed according to an animation execution instruction, and the animation to be executed comprises at least one independently declared page element animation;
the object generating unit is used for generating the animation object of the animation to be executed, which is acquired by the acquiring unit, by an application engine according to the animation parameters of the page element animation;
a sending unit, configured to send, by an application engine, the animation object obtained by the object generation unit to an adaptation layer of an application through a preset animation execution interface, where the sending unit includes: transmitting an animation object of the animation to be executed to an adaptation layer of an application through a preset interface by an application engine or transmitting a code or a character string expressing the animation object to the adaptation layer of the application in the bottom layer after receiving the animation object fed back by the application engine layer by the application engine, wherein a service engine in the application engine layer only provides a data transmission channel between the bottom layer and the adaptation layer for the animation to be executed;
the analysis unit is used for analyzing the animation object sent by the sending unit into an executable object in the adaptation layer;
and the animation execution unit is used for executing the executable object obtained by the analysis unit in the adaptation layer and displaying the animation to be executed.
7. The apparatus of claim 6, further comprising:
the event sending unit is used for sending an animation execution event to the adaptation layer through a preset animation execution interface after the object generating unit executes the animation object of the animation to be executed generated by the application engine according to the animation parameters of the page element animation;
the analysis unit is further configured to, at the adaptation layer, execute the operation of analyzing the animation object into an executable object according to the animation execution event sent by the event sending unit.
8. The apparatus of claim 6, further comprising:
the animation declaration unit is used for declaring the animation of the page element according to the animation parameters of the page element, and the animation parameters at least comprise color, transparency and duration;
the animation declaration unit is further configured to declare the page element animation group according to an execution order of the plurality of page element animations.
9. The apparatus according to any of claims 6-8, wherein the animation execution instructions comprise at least: serial animation instructions and parallel animation instructions.
10. The apparatus of claim 6, wherein the animation execution unit comprises:
the setting module is used for setting a timer with the same screen refresh rate;
and the execution module is used for executing the executable object according to the timer set by the setting module and the animation parameters corresponding to the page element animation.
11. A storage medium comprising a stored program, wherein the program controls a device on which the storage medium is installed to execute the animation execution method according to any one of claims 1 to 5 when executed.
12. An electronic device, comprising a processor and a memory, wherein the processor is configured to call program instructions in the memory to execute the animation execution method according to any one of claims 1 to 5.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910009346.0A CN110007907B (en) | 2019-01-04 | 2019-01-04 | Animation execution method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910009346.0A CN110007907B (en) | 2019-01-04 | 2019-01-04 | Animation execution method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110007907A CN110007907A (en) | 2019-07-12 |
| CN110007907B true CN110007907B (en) | 2022-03-25 |
Family
ID=67165342
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910009346.0A Active CN110007907B (en) | 2019-01-04 | 2019-01-04 | Animation execution method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110007907B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111951355B (en) * | 2020-08-04 | 2025-01-17 | 抖音视界有限公司 | Animation processing method and device, computer equipment and storage medium |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103678631A (en) * | 2013-12-19 | 2014-03-26 | 华为技术有限公司 | Page rendering method and device |
| CN107562498A (en) * | 2017-08-18 | 2018-01-09 | 广州阿里巴巴文学信息技术有限公司 | Animation effect implementation method, device and terminal device based on Android platform |
| CN109002282A (en) * | 2018-07-26 | 2018-12-14 | 北京京东金融科技控股有限公司 | A kind of method and apparatus for realizing animation effect in web page exploitation |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7173623B2 (en) * | 2003-05-09 | 2007-02-06 | Microsoft Corporation | System supporting animation of graphical display elements through animation object instances |
-
2019
- 2019-01-04 CN CN201910009346.0A patent/CN110007907B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103678631A (en) * | 2013-12-19 | 2014-03-26 | 华为技术有限公司 | Page rendering method and device |
| CN107562498A (en) * | 2017-08-18 | 2018-01-09 | 广州阿里巴巴文学信息技术有限公司 | Animation effect implementation method, device and terminal device based on Android platform |
| CN109002282A (en) * | 2018-07-26 | 2018-12-14 | 北京京东金融科技控股有限公司 | A kind of method and apparatus for realizing animation effect in web page exploitation |
Non-Patent Citations (1)
| Title |
|---|
| "移动设备跨平台动画文件格式和播放技术的研究";张小伟;《中国优秀硕士学位论文全文数据库信息科技辑》;20150815;全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110007907A (en) | 2019-07-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20200118566A1 (en) | Human-computer interaction processing system, method, storage medium, and electronic device | |
| CN111045655A (en) | Page rendering method and device, rendering server and storage medium | |
| CN111158686B (en) | Webpage popup frame generation method and device, electronic equipment and storage medium | |
| CN106095417B (en) | A kind of prospect Application Program Interface refresh synchronization method and system | |
| CN109949391B (en) | Image-text drawing method, image-text drawing device, electronic equipment and storage medium | |
| CN110069312A (en) | A kind of method and device of UI component Configuration and generation UI Component Gallery | |
| CN110633959A (en) | Method, device, equipment and medium for creating approval task based on graph structure | |
| CN106933887A (en) | A kind of data visualization method and device | |
| CN109426415B (en) | Method and device for generating cascade selector | |
| CN110781180B (en) | Data screening method and data screening device | |
| CN109725885A (en) | An Application Development Architecture Based on Mobile Platform | |
| US10496423B2 (en) | Method for opening up data and functions of terminal application based on reconstruction technology | |
| Schroeder et al. | The book of Dash: build dashboards with Python and Plotly | |
| CN110488738A (en) | A kind of code generating method and device | |
| CN110007907B (en) | Animation execution method and device | |
| CN112328225A (en) | Page operation method and operation system thereof | |
| CN110262749B (en) | Webpage operation method, device, container, equipment and medium | |
| CN106708854A (en) | Data exporting method and apparatus | |
| CN108536696A (en) | A kind of database personalized self-service query platform and method | |
| CN106991191B (en) | Commodity screening method and device, storage medium and electronic equipment | |
| CN110968373A (en) | Page switching implementation method and device, storage medium and processor | |
| CN118608646A (en) | Image generation method and system, electronic device, and storage medium | |
| CN113961279A (en) | Page rendering method, device, server and storage medium | |
| CN111638927A (en) | Skin switching method and device | |
| CN117933217A (en) | Automatic report generation method and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |