Animation effect playing method and device, animation effect generating method and device, electronic equipment and storage medium

By introducing animation configuration files, users can personalize animation effects, solving the problem that animation effects cannot be customized in the existing technology, realizing independent loading and infinite reuse of animation effects, and improving display efficiency and user participation.

CN120091167APending Publication Date: 2025-06-03GUANGZHOU MIZAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411951912.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

It is difficult to personalize and customize animation effects in the prior art, and each animation effect requires a complete MP4 file to be downloaded again, and the display effects cannot be customized according to the environment and scene.

Method used

By introducing animation configuration files, users can select background animations and multimedia resources, enter resource information, and generate animation configuration files based on the drawing hierarchy relationship. During playback, play background animations according to MP4 files and multimedia resources according to animation configuration files to achieve independent loading and infinite reuse of animation effects.

Benefits of technology

It realizes the personalized and customized needs of animation effects, reduces the repeated download and generation of animation resources, and improves the efficiency of animation display and user participation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120091167A_ABST
    Figure CN120091167A_ABST
Patent Text Reader

Abstract

The invention provides an animation effect playing and generating method and device, electronic equipment and a storage medium, and relates to the technical field of animation processing.The animation effect playing and generating method comprises the steps that a playing file of a target animation effect is obtained, and the playing file comprises an MP4 file and an animation configuration file; playing the background animation in the player according to the MP4 file; the multimedia resources are sequentially played in a player according to resource information of the multimedia resources of the animation configuration file and the drawing hierarchical relation between the multimedia resources, the resource information comprises resource types, resource addresses and playing time information, and the resource types comprise resource types, resource addresses and playing time information. The writing sequence of the resource information of each multimedia resource in the animation configuration file is the sequence of drawing the hierarchical relationship. A new animation resource can be defined only through a configuration file, and background animations and multimedia resources can be reused infinitely; the personalized and customized requirements of the animation effect of the user can be met, the sense of participation of the user is enhanced, and the innovation ability of the user can be displayed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of animation processing, and in particular, to a method, apparatus, electronic device, and storage medium for playing and generating animation effects. Background Art

[0002] Animation effects are widely used in online social scenarios, such as the entry animation effects of users in voice rooms, chat rooms, and live broadcast rooms, virtual gift animation effects, and so on. Currently, whether it is a mobile APP or a PC desktop application, considering the display effect and performance, most animation effects are implemented using the mp4 format or a variant format based on mp4. The reason is that mp4 has advantages such as wide device support, high compression rate, and unrestricted animation effects.

[0003] Producing animation effects requires product designers and UI designers to negotiate and test, and then display them through dynamic downloads on the online client. For each different animation effect, a complete mp4 file needs to be downloaded again. Even if only a small difference in the effect is desired, different files must be re-exported to achieve it. In addition, the same effect detail cannot be applied to all scenarios and needs to be implemented once in each animation resource that needs to be implemented. If the effect is incorrect or needs to be modified, this process needs to be redone in its entirety; it is impossible to customize the display effect according to the environment and scenario. Summary of the Invention

[0004] The present invention provides a method, apparatus, electronic device, and storage medium for playing and generating animation effects, which realizes independent loading of each sub-effect of the animation effect, can be infinitely reused, and realizes the personalized and customized needs of users for animation effects.

[0005] The present invention provides a method for playing an animation effect, including:

[0006] Obtaining a playback file of a target animation effect, where the playback file includes an MP4 file and an animation configuration file;

[0007] Playing a background animation in a player according to the MP4 file;

[0008] Playing the multimedia resources in the player in sequence according to the resource information of the multimedia resources in the animation configuration file and the drawing hierarchy relationship between the multimedia resources, where the resource information includes: resource type, resource address, and playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing hierarchy relationship.

[0009] A method for playing an animation effect provided by the present invention, wherein the resource types include: static resources, dynamic resources, mask resources, and audio resources.

[0010] A method for playing an animation effect provided by the present invention, wherein the resource information of the static resources, the dynamic resources, and the mask resources further includes a display position and a display size.

[0011] A method for playing an animation effect provided by the present invention, wherein, according to the rendering layer relationship between the resource information of the multimedia resources in the animation configuration file and the multimedia resources, playing the multimedia resources in sequence in the player includes:

[0012] When the resource type is a static resource, obtaining the resource picture of the static resource according to the resource address;

[0013] Playing the resource picture according to the play time information.

[0014] A method for playing an animation effect provided by the present invention, wherein, according to the rendering layer relationship between the resource information of the multimedia resources in the animation configuration file and the multimedia resources, playing the multimedia resources in sequence in the player includes:

[0015] When the resource type is a dynamic resource, determining whether the configuration of the player supports playing the dynamic resource while downloading;

[0016] If so, downloading and playing the dynamic resource while downloading according to the resource address and the play time information; otherwise, obtaining and playing the preset static resource picture of the dynamic resource according to the resource address and the play time information, and replacing and playing the dynamic resource after the dynamic resource is downloaded.

[0017] The present invention further provides a method for generating an animation effect, including:

[0018] Obtaining the MP4 file of the background animation according to the selected background animation;

[0019] Obtaining the resource information of the multimedia resources and the rendering layer relationship between the multimedia resources according to the selected at least one multimedia resource;

[0020] Generating an animation configuration file according to the resource information and the rendering layer relationship, wherein the resource information includes: resource type, resource address, and play time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the rendering layer relationship;

[0021] Determine the MP4 file and the animation profile as the playback files for the target animation effect.

[0022] The present invention also provides a playback device for an animation effect, comprising:

[0023] An acquisition module, configured to acquire a playback file for a target animation effect, wherein the playback file includes an MP4 file and an animation profile;

[0024] A first playback module, configured to play a background animation in a player according to the MP4 file;

[0025] A second playback module, configured to sequentially play the multimedia resources in the player according to the resource information of the multimedia resources in the animation profile and the drawing layer relationship between the multimedia resources, wherein the resource information includes: resource type, resource address, playback time information, and the writing order of the resource information of each multimedia resource in the animation profile is the order of the drawing layer relationship.

[0026] The present invention also provides a generation device for an animation effect, comprising:

[0027] A first acquisition module, configured to acquire an MP4 file of the background animation according to the selected background animation;

[0028] A second acquisition module, configured to acquire the resource information of the multimedia resources and the drawing layer relationship between the multimedia resources according to the selected at least one multimedia resource;

[0029] A generation module, configured to generate an animation profile according to the resource information and the drawing layer relationship, wherein the resource information includes: resource type, resource address, playback time information, and the writing order of the resource information of each multimedia resource in the animation profile is the order of the drawing layer relationship;

[0030] A determination module, configured to determine the MP4 file and the animation profile as the playback files for the target animation effect.

[0031] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, it implements the playback method or the generation method of the animation effect as described in any one of the above.

[0032] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the playback method or the generation method of the animation effect as described in any one of the above.

[0033] A method, apparatus, electronic device, and storage medium for playing and generating an animation effect are provided. An animation effect playback file is set up. The playback file includes an MP4 file and an independent animation configuration file. The MP4 file is the resource file for the background animation, and the animation configuration file stores the resource information and drawing hierarchy relationship of the multimedia resources that need to be superimposed and rendered on the background animation. The user only needs to select the background animation, select the multimedia resources to be added to the background animation, and input the corresponding resource information. The order of selection and input determines the drawing hierarchy relationship of the multimedia resources in the animation effect, and an animation configuration file is generated based on the resource information and the drawing hierarchy relationship. When the animation effect is played, the playback file of the animation effect (including the MP4 file and the animation configuration file) is obtained. The background animation is played in the player according to the MP4 file, and the multimedia resources are played in sequence in the player according to the resource information and the drawing hierarchy relationship of the multimedia resources in the animation configuration file.

[0034] In this way, only through one configuration file, a new animation resource can be defined, and the background animation and multimedia resources can be infinitely reused. For the modification of the superimposed multimedia resources, only the resource information needs to be modified in the animation configuration file, and there is no need to generate a new playback file. In addition, it can meet the user's personalized and customized requirements for animation effects, greatly enhancing the user's sense of participation and demonstrating the user's own innovation ability. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0036] Figure 1 It is a schematic flowchart of the method for playing an animation effect provided by the present invention;

[0037] Figure 2 It is a schematic flowchart of the method for generating an animation effect provided by the present invention;

[0038] Figure 3 It is a schematic structural diagram of the apparatus for playing an animation effect provided by the present invention;

[0039] Figure 4 It is a schematic structural diagram of the apparatus for generating an animation effect provided by the present invention;

[0040] Figure 5 It is a schematic structural diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0042] It should be noted that in the description of the embodiments of the present invention, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element. The orientation or positional relationship indicated by terms such as "upper", "lower", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation of the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0043] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.

[0044] The following will be combined with Figures 1 - 5 Describe the method, device, electronic device, and storage medium for playing and generating the animation effect of the present invention.

[0045] As Figure 1 shown, the present invention provides a method for playing an animation effect, which may specifically include the following steps:

[0046] Step 110, obtain a playback file of the target animation effect, where the playback file includes an MP4 file and an animation configuration file.

[0047] Specifically, the animation effect of the prior art is only one MP4 file or a file based on a variant format of MP4. The MP4 file is obtained by packing all the multimedia resources of the animation effect into a single playback file. In contrast, the present invention introduces an independent animation configuration file. The playback file includes an MP4 file and an animation configuration file. Among them, the MP4 file is the MP4 file of the background animation, and the multimedia resources added by the user for personalized production on the basis of the background animation are written into the animation configuration file.

[0048] Step 120: Play the background animation in the player according to the MP4 file.

[0049] Step 130: Play the multimedia resources in the player in sequence according to the resource information of the multimedia resources in the animation configuration file and the drawing layer relationship between the multimedia resources. Among them, the resource information includes: resource type, resource address, playback time information. The writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing layer relationship.

[0050] Specifically, when the player plays the target animation effect, it decodes and plays the background animation according to the MP4, and then downloads, decodes and plays according to the resource information of each multimedia resource in the animation configuration file. The format of the animation configuration file can be a JSON file, which can ensure that the configuration file will not be too large. The animation configuration file records the resource information of the multimedia resources that need to be superimposed on the background animation MP4 file, and records the resource information of each multimedia resource in the form of a list. A record in the list represents the resource information of a multimedia resource. The resource information can specifically include resource type, resource address, playback time information, and can also include interaction operation definitions, etc.

[0051] Resource type: That is, the type of the multimedia resource, which can include: static resource, dynamic resource, mask resource, audio resource. Static resources are static picture resources; dynamic resources are resources such as videos and dynamic pictures, such as formats like mp4 / gif / sequence frames / webp / apng / svga, etc.; mask resources refer to resources using mask placeholders, and the mask placeholders are used to define the position, time frame, displacement deformation, etc. of the target resource. The resources inside the mask can be replaced according to requirements, and resources such as text and static picture resources can be added to the mask; audio resources are sound resources such as music and sound effects, and can default to support the AAC format.

[0052] Resource address: That is, the address for downloading the multimedia resource. Through this address, the corresponding multimedia resource can be downloaded for decoding and playing.

[0053] Play time information: For static resources, dynamic resources, and mask resources, it defines which time frames of the background animation these resources need to appear in; for audio resources, it defines the start and end times of audio playback.

[0054] Definition of interaction operations: It defines the behaviors that multimedia resources will trigger under gestures such as clicking, double-clicking, dragging, long-pressing, etc. The triggered behaviors are, for example, jumping to an h5 page, entering the space of a specified user, private chat page, personal page, business card, report page, etc. If a multimedia resource does not set the behavior for a specific gesture, the gesture operation will penetrate to the next-level multimedia resource; of course, an empty behavior can also be set to block the gesture penetration.

[0055] The resource information for static resources, dynamic resources, and mask resources also includes the display position and display size.

[0056] In some embodiments, the resource information can be written into the animation configuration file in the form of a drawing frame list. The drawing frame list defines the resource type and resource address of each multimedia resource, which time frames it needs to appear in, the position, size, and deformation effect where it appears; the list content for audio resources is relatively special, defining the start and end times of audio playback, whether loop is supported, etc.

[0057] The order of the drawing frame list (or the writing order of the resource information of the multimedia resources) is the order of the drawing hierarchy relationship between the multimedia resources. The playback device parses the multimedia resources in order from the animation configuration file frame by frame, and then merges them into a buffer for drawing; in the future, it can also conveniently support new dynamic resource types, and only need to support the format in the parsing module of the client.

[0058] In some embodiments, step 130 may include:

[0059] When the resource type is a static resource, according to the resource address, obtain the resource picture of the static resource;

[0060] Play the resource picture according to the play time information.

[0061] Specifically, for static resources, only need to obtain the resource picture according to the resource address and decode it once, then the resource picture can be superimposed and played in the corresponding time frame of the background animation according to the play time information, and the playback position and size also need to be adjusted according to the display position and display size of the static resource. Subsequent reuse of static resources can be obtained from the memory cache, and only need to scale or deform according to the display size.

[0062] In some embodiments, step 130 may include:

[0063] When the resource type is a dynamic resource, it is determined whether the configuration of the player supports playing the dynamic resource while downloading.

[0064] If so, the dynamic resource is played while downloading according to the resource address and the play time information; otherwise, according to the resource address and the play time information, a preset static resource picture of the dynamic resource is obtained and played, and after the dynamic resource is downloaded, the dynamic resource is replaced and played.

[0065] Specifically, since the dynamic resource needs to be decoded and played while downloading, it is first determined whether the configuration of the current player supports playing the dynamic resource while downloading. If it supports, the dynamic resource is played while downloading; if it does not support, the dynamic resource is generally provided with a static default resource png picture (i.e., the preset static resource picture), and the preset static resource picture is played first. At the same time, the dynamic resource is downloaded, and after the download is completed, the dynamic resource is replaced and played.

[0066] It can be understood that after the dynamic resource is downloaded and replaced for playing, the played part of the dynamic resource corresponds to the remaining play time.

[0067] Except that when the dynamic resource has not been downloaded and does not support playing while downloading, the preset static resource picture of the dynamic resource is played; in the case where the player does not support the dynamic resource format, or in the case where the device hardware performance is too low and not suitable, the decoding logic of the dynamic resource is directly skipped and the preset static resource picture of the dynamic resource is played instead.

[0068] In some embodiments, it is also possible to limit the number of dynamic resources superimposed on an animation effect. In the actual production environment (i.e., during the production and generation stage of the animation effect), a certain limit can be imposed on the number of dynamic resources written into the animation configuration file.

[0069] In some embodiments, for some dynamic resources such as webp, the memory occupancy on the PC side is larger than that of svga, and the dynamic resource can be replaced with a static resource for playing.

[0070] In some embodiments, step 130 further includes:

[0071] When the display position and display size of the static resource, dynamic resource or mask resource exceed the display range of the current device screen, the playback of the static resource, dynamic resource or mask resource is skipped. That is, for resources that exceed the display range of the screen, they are directly filtered without decoding, parsing, calculating and rendering.

[0072] In some embodiments, step 130 further includes:

[0073] When the static resource, dynamic resource, mask resource, or the preset static resource image of the dynamic resource is empty, skip the playback of the static resource, dynamic resource, mask resource, or the preset static resource image of the dynamic resource. It is also a direct filter without decoding, parsing, calculation, and rendering.

[0074] As Figure 2 shown, the present invention also provides a method for generating an animation effect, which may specifically include the following steps:

[0075] Step 210, obtain the MP4 file of the background animation according to the selected background animation.

[0076] Step 220, obtain the resource information of the at least one selected multimedia resource and the drawing layer relationship between the multimedia resources.

[0077] Step 230, generate an animation configuration file according to the resource information and the drawing layer relationship, where the resource information includes: resource type, resource address, and playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing layer relationship;

[0078] Step 240, determine the MP4 file and the animation configuration file as the playback files of the target animation effect.

[0079] Specifically, the user can customize the animation effect (such as virtual gift animation effect, entry animation effect, etc.) on the client. By selecting the background animation and various multimedia resources superimposed on the background animation on the client, only need to generate a new animation configuration file for the user-customized multimedia resources. When other clients play, download this animation configuration file and the MP4 file, and play according to the above-mentioned animation effect playback method, then the user's customized animation effect can be played completely.

[0080] A method, device, electronic device, and storage medium for playing and generating an animation effect provided by the present invention set a playing file for the animation effect. The playing file includes an MP4 file and an independent animation configuration file. The MP4 file is a resource file for the background animation, and the animation configuration file stores the resource information and drawing layer relationship of the multimedia resources that need to be superimposed and rendered on the background animation. The user only needs to select the background animation, select the multimedia resources to be added to the background animation, and input the corresponding resource information. The order of selection and input determines the drawing layer relationship of the multimedia resources in the animation effect, and an animation configuration file is generated according to the resource information and the drawing layer relationship. When the animation effect is played, the playing file of the animation effect (including the MP4 file and the animation configuration file) is obtained, the background animation is played in the player according to the MP4 file, and the multimedia resources are played in sequence in the player according to the resource information and the drawing layer relationship of the multimedia resources in the animation configuration file.

[0081] In this way, only through a configuration file, a new animation resource can be defined, and the effects of sub - animations can be infinitely reused; as long as no new format is added, the client does not need to modify the code and release version; in scenarios where animation effects are frequently reused, it can greatly reduce the traffic of users downloading dynamic resources, and at the same time speed up the animation display speed; it is very convenient to expand and be compatible with new dynamic resource formats; it has little impact on old - version clients, and there is no need to consider generating two sets of animation resource formats and solutions for old versions; it can meet the user's animation customization needs, greatly enhancing the user's sense of participation and demonstrating the user's own innovation ability; users can even share the animation configuration to enable others to achieve the same animation effect.

[0082] Next, the animation effect playing device and the animation effect generating device provided by the present invention will be described. The animation effect playing device and the animation effect generating device described below can be correspondingly referred to the animation effect playing method and the animation effect generating method described above.

[0083] As Figure 3 shown, the present invention also provides an animation effect playing device, including:

[0084] An obtaining module 310, configured to obtain a playing file of a target animation effect, where the playing file includes an MP4 file and an animation configuration file;

[0085] A first playing module 320, configured to play a background animation in a player according to the MP4 file;

[0086] A second playback module 330, configured to sequentially play the multimedia resources in the player according to the resource information of the multimedia resources in the animation configuration file and the drawing layer relationship between the multimedia resources, where the resource information includes: resource type, resource address, and playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing layer relationship.

[0087] As Figure 4 shown, the present invention further provides a device for generating an animation effect, including:

[0088] A first acquisition module 410, configured to acquire the MP4 file of the background animation according to the selected background animation;

[0089] A second acquisition module 420, configured to acquire the resource information of the multimedia resources and the drawing layer relationship between the multimedia resources according to the selected at least one multimedia resource;

[0090] A generation module 430, configured to generate an animation configuration file according to the resource information and the drawing layer relationship, where the resource information includes: resource type, resource address, and playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing layer relationship;

[0091] A determination module 440, configured to determine the MP4 file and the animation configuration file as the playback files of the target animation effect.

[0092] Figure 5 Illustrates a schematic physical structure diagram of an electronic device. As Figure 5 shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540. Among them, the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logical instructions in the memory 530 to execute the method for playing an animation effect, and the method includes:

[0093] Acquire the playback files of the target animation effect, where the playback files include an MP4 file and an animation configuration file;

[0094] Play the background animation in the player according to the MP4 file;

[0095] Play the multimedia resources in sequence within the player according to the resource information of the multimedia resources in the animation configuration file and the drawing layer relationship between the multimedia resources, where the resource information includes: resource type, resource address, and playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing layer relationship;

[0096] And / or, execute a method for generating an animation effect, the method comprising:

[0097] Obtain the MP4 file of the background animation according to the selected background animation;

[0098] Obtain the resource information of the multimedia resources and the drawing layer relationship between the multimedia resources according to the selected at least one multimedia resource;

[0099] Generate an animation configuration file according to the resource information and the drawing layer relationship, where the resource information includes: resource type, resource address, and playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing layer relationship;

[0100] Determine the MP4 file and the animation configuration file as the playback files of the target animation effect.

[0101] In addition, when the logical instructions in the above-mentioned memory 530 are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, RandomAccess Memory), magnetic disks, or optical discs that can store program codes.

[0102] On the other hand, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the animation effect playback method provided by the above-mentioned various methods, the method comprising:

[0103] Obtain the playback file of the target animation effect, where the playback file includes an MP4 file and an animation configuration file;

[0104] Play the background animation in the player according to the MP4 file;

[0105] Play the multimedia resources in the player in sequence according to the resource information of the multimedia resources in the animation configuration file and the drawing layer relationship between the multimedia resources, where the resource information includes: resource type, resource address, playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing layer relationship;

[0106] And / or, execute the animation effect generation method, which includes:

[0107] Obtain the MP4 file of the background animation according to the selected background animation;

[0108] Obtain the resource information of the multimedia resources and the drawing layer relationship between the multimedia resources according to the selected at least one multimedia resource;

[0109] Generate an animation configuration file according to the resource information and the drawing layer relationship, where the resource information includes: resource type, resource address, playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing layer relationship;

[0110] Determine the MP4 file and the animation configuration file as the playback file of the target animation effect.

[0111] On the other hand, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it realizes the animation effect playback method provided by the above methods, and the method includes:

[0112] Obtain the playback file of the target animation effect, where the playback file includes an MP4 file and an animation configuration file;

[0113] Play the background animation in the player according to the MP4 file;

[0114] Play the multimedia resources in the player in sequence according to the resource information of the multimedia resources in the animation configuration file and the drawing layer relationship between the multimedia resources, where the resource information includes: resource type, resource address, playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing layer relationship;

[0115] And / or, a method for generating an animation effect, the method comprising:

[0116] Obtain the MP4 file of the selected background animation;

[0117] Obtain the resource information of the selected at least one multimedia resource and the drawing hierarchy relationship between the multimedia resources;

[0118] Generate an animation configuration file according to the resource information and the drawing hierarchy relationship, wherein the resource information includes: resource type, resource address, playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing hierarchy relationship;

[0119] Determine the MP4 file and the animation configuration file as the playback files of the target animation effect.

[0120] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.

[0121] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for playing an animation effect, characterized in that: include: Obtain a playback file of a target animation effect, wherein the playback file includes an MP4 file and an animation configuration file; Playing the background animation in the player according to the MP4 file; According to the resource information of the multimedia resources in the animation configuration file and the drawing hierarchy relationship between the multimedia resources, the multimedia resources are played in sequence in the player, wherein the resource information includes: resource type, resource address, and playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing hierarchy relationship.

2. The method for playing animation effects according to claim 1, characterized in that: The resource types include: static resources, dynamic resources, mask resources, and audio resources.

3. The method for playing animation effects according to claim 2, characterized in that: The resource information of the static resource, the dynamic resource and the mask resource also includes a display position and a display size.

4. The method for playing animation effects according to claim 2, characterized in that: Playing the multimedia resources in sequence in the player according to the resource information of the multimedia resources in the animation configuration file and the drawing hierarchical relationship between the multimedia resources includes: When the resource type is a static resource, obtaining a resource image of the static resource according to the resource address; The resource picture is played according to the play time information.

5. The method for playing animation effects according to claim 2, characterized in that: Playing the multimedia resources in sequence in the player according to the resource information of the multimedia resources in the animation configuration file and the drawing hierarchical relationship between the multimedia resources includes: When the resource type is a dynamic resource, whether the player configuration supports downloading and playing the dynamic resource; If so, the dynamic resource is played while being downloaded according to the resource address and the playback time information; otherwise, the preset static resource image of the dynamic resource is obtained and played according to the resource address and the playback time information, and after the dynamic resource is downloaded, the dynamic resource is replaced and played.

6. A method for generating an animation effect, characterized in that: include: According to the selected background animation, obtain the MP4 file of the background animation; According to the at least one selected multimedia resource, acquiring resource information of the multimedia resource and a drawing hierarchical relationship between the multimedia resources; Generate an animation configuration file according to the resource information and the drawing hierarchical relationship, wherein the resource information includes: resource type, resource address, and play time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing hierarchical relationship; The MP4 file and the animation configuration file are determined as playback files of the target animation effect.

7. A device for playing animation effects, characterized in that: include: An acquisition module, used to acquire a playback file of a target animation effect, wherein the playback file includes an MP4 file and an animation configuration file; A first playing module, used for playing the background animation in a player according to the MP4 file; The second playback module is used to play the multimedia resources in sequence in the player according to the resource information of the multimedia resources in the animation configuration file and the drawing hierarchy relationship between the multimedia resources, wherein the resource information includes: resource type, resource address, and playback time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing hierarchy relationship.

8. A device for generating animation effects, characterized in that: include: A first acquisition module, used for acquiring an MP4 file of the background animation according to the selected background animation; A second acquisition module, configured to acquire resource information of the multimedia resource and a drawing hierarchical relationship between the multimedia resources according to the at least one selected multimedia resource; A generating module, configured to generate an animation configuration file according to the resource information and the drawing hierarchy relationship, wherein the resource information includes: resource type, resource address, and play time information, and the writing order of the resource information of each multimedia resource in the animation configuration file is the order of the drawing hierarchy relationship; The determination module is used to determine the MP4 file and the animation configuration file as playback files of the target animation effect.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for playing the animation effect or the method for generating the animation effect according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for playing the animation effect or the method for generating the animation effect as claimed in any one of claims 1 to 7 is implemented.