Animation file generation method and related product thereof

By obtaining animation design files and generating target animation files, the problems of complex communication and wrong animation production in traditional animation development methods are solved, and efficient and convenient animation file generation and playback performance are achieved.

CN119399329APending Publication Date: 2025-02-07NANJING XIYIN ECOMMERCE CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411416096.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The traditional animation development process is long, and requires frequent communication between designers and web developers, which is prone to understanding deviations and animation production errors, resulting in the animation effect being worse than expected.

Method used

By obtaining the animation design file, determine the keyframe animation information of each keyframe, determine the attribute change trajectory of the layer animation attribute based on the layer animation information and keyframe information, and keyframe reduction for each layer to generate target animation document.

Benefits of technology

Directly process the designed animation design files, reduce communication between designers and web developers, reduce work costs, shorten animation development cycle, and improve animation file playback performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399329A_ABST
    Figure CN119399329A_ABST
Patent Text Reader

Abstract

Obtaining an animation design file; determining key frame animation information corresponding to each key frame based on the animation design file; determining an attribute change track of a layer animation attribute corresponding to each layer in the animation design file based on layer animation information corresponding to each layer in the animation design file and key frame animation information corresponding to each key frame; performing key frame reduction on each layer based on the attribute change track of the layer animation attribute corresponding to each layer to obtain a target key frame set corresponding to each layer; and generating a target animation file based on the target key frame set corresponding to each layer. According to the method, the animation file can be efficiently and conveniently generated, the animation development period is shortened, the animation file playing performance is improved, the generation of the advertisement page is facilitated, and the customer obtaining efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to the field of data processing technology. More specifically, the present application relates to an animation file generation method and related products. Background Art

[0002] With the increasing popularity of mobile devices and the increasing number of advertisements, people can view various types of advertisements anytime and anywhere. In order to attract customers to participate in promotional activities by learning about advertising information, more and more animation effects are needed to modify advertisements. The traditional way of developing animations is to have relevant designers complete the page design and animation design of the advertising page, and then communicate with web developers to reach a consensus by explaining the animation video, and finally the web developers will restore the animation frame by frame. This method has a long overall development process, which requires web developers and designers to constantly confirm the details. Errors are prone to occur in the middle process, resulting in animation effects that are not as expected.

[0003] In view of this, there is an urgent need to provide an animation file generation method so that animation files can be generated efficiently and conveniently, the animation development cycle can be shortened, and the animation file playback performance can be improved, which is conducive to the generation of advertising pages and improves customer acquisition efficiency. Summary of the invention

[0004] In order to at least solve one or more of the technical problems mentioned above, the present application proposes an animation file generation method and related products in multiple aspects.

[0005] In a first aspect, the present application provides a method for generating an animation file, comprising: obtaining an animation design file; determining key frame animation information corresponding to each key frame based on the animation design file; determining an attribute change trajectory of layer animation attributes corresponding to each layer in the animation design file based on layer animation information corresponding to each layer and key frame animation information corresponding to each key frame; performing key frame reduction on each layer based on the attribute change trajectory of the layer animation attributes corresponding to each layer to obtain a target key frame set corresponding to each layer; and generating a target animation file based on the target key frame set corresponding to each layer.

[0006] In some embodiments, determining the key frame animation information corresponding to each key frame based on the animation design file includes: performing basic style analysis on each layer in the animation design file to obtain basic layer information corresponding to each layer; obtaining layer animation information corresponding to each layer based on the basic layer information corresponding to each layer; determining the key frame corresponding to each layer based on the layer animation information corresponding to each layer; and determining the key frame animation information corresponding to each key frame based on the layer animation information corresponding to each layer and the position information of the key frame corresponding to each layer.

[0007] In some embodiments, the basic layer information includes a layer type; wherein, obtaining the layer animation information corresponding to each layer based on the basic layer information corresponding to each layer includes: obtaining the layer animation information corresponding to each layer based on the layer type corresponding to each layer.

[0008] In some embodiments, determining the key frame corresponding to each layer based on the layer animation information corresponding to each layer includes: determining the key frame corresponding to each layer based on the property attribute of each animation frame in the layer animation information corresponding to each layer.

[0009] In some embodiments, determining the key frame animation information corresponding to each key frame based on the layer animation information corresponding to each layer and the position information of the key frame corresponding to each layer includes: determining whether there is a key frame after each animation frame of each layer based on the position information of the key frame corresponding to each layer; if there is a key frame corresponding to the current layer after the current animation frame, moving the layer animation information corresponding to the current animation frame to the key frame corresponding to the current layer; and if there is no key frame corresponding to the current layer after the current animation frame, determining the layer animation information corresponding to each animation frame stored in the key frame corresponding to the current layer as the key frame animation information of the key frame corresponding to the current layer.

[0010] In some embodiments, determining the attribute change trajectory of the layer animation attributes corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer and the key frame animation information corresponding to each key frame includes: storing the attribute change records of the layer animation attributes that match the key frame animation information corresponding to the key frame of the corresponding layer in the layer animation information corresponding to each layer; storing the attribute change relationship between each attribute change node in each attribute change record and the animation attribute of the corresponding key frame animation information; and determining the attribute change trajectory of the layer animation attributes corresponding to each layer based on each attribute change record and each attribute change relationship.

[0011] In some embodiments, reducing the key frames of each layer based on the property change trajectory of the layer animation properties corresponding to each layer includes: determining the animation curvature curve corresponding to each layer based on a preset vector curve and the property change trajectory of the layer animation properties corresponding to each layer; and reducing the key frames of each layer based on the animation curvature curve corresponding to each layer.

[0012] In some embodiments, reducing the key frames of each layer based on the animation curvature curve corresponding to each layer includes: deleting N consecutive key frames with the same curvature and the same animation attributes based on the animation curvature curve; wherein N is an integer greater than 2; and merging key frames with the same time point and different animation attributes based on the animation curvature curve.

[0013] In some embodiments, before generating a target animation file based on a target key frame set corresponding to each layer, the method further includes: obtaining animation configuration information; and determining a number of loop playback times and a playback frequency of the target animation file based on the animation configuration information.

[0014] In a second aspect, the present application provides a method comprising: a memory; and at least one processor, configured to: obtain an animation design file; determine key frame animation information corresponding to each key frame based on the animation design file; determine the attribute change trajectory of the layer animation attributes corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer and the key frame animation information corresponding to each key frame; perform key frame reduction on each layer based on the attribute change trajectory of the layer animation attributes corresponding to each layer to obtain a target key frame set corresponding to each layer; and generate a target animation file based on the target key frame set corresponding to each layer.

[0015] In a third aspect, the present application provides a non-volatile machine-readable medium having program code stored thereon for goods shipment. When the program code is executed by at least one processor, the code guides the execution operation of the at least one processor, and the program code includes: obtaining an animation design file; determining key frame animation information corresponding to each key frame based on the animation design file; determining an attribute change trajectory of layer animation attributes corresponding to each layer in the animation design file based on layer animation information corresponding to each layer in the animation design file and key frame animation information corresponding to each key frame; performing key frame reduction on each layer based on the attribute change trajectory of the layer animation attributes corresponding to each layer to obtain a target key frame set corresponding to each layer; and generating a target animation file based on the target key frame set corresponding to each layer.

[0016] The technical solution provided by this application may have the following beneficial effects:

[0017] The animation file generation method and related products provided by the present application obtain the animation design file, determine the key frame animation information corresponding to each key frame based on the animation design file, and then determine the attribute change track of the layer animation attribute corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer in the animation design file and the key frame animation information corresponding to each key frame. Therefore, the designed animation design file can be directly processed to confirm the change track of each layer animation attribute, avoiding the complicated communication process between designers and web developers, solving the problem of animation production errors caused by misunderstandings in the communication process, which is conducive to reducing the work costs of designers and web developers and shortening the animation development cycle.

[0018] Furthermore, the present application can reduce the key frames of each layer based on the attribute change trajectory of the layer animation attributes corresponding to each layer, obtain a target key frame set corresponding to each layer, and then generate a target animation file based on the target key frame set corresponding to each layer, thereby reducing the file size of the target animation file and improving the animation file playback performance, which is facilitating the generation of advertising pages.

[0019] In general, this application can generate animation files efficiently and conveniently, shorten the animation development cycle, and improve the animation file playback performance, which is conducive to the generation of advertising pages and improves customer acquisition efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0021] Figure 1 An exemplary flow chart showing a method for generating an animation file according to some embodiments of the present application is shown;

[0022] Figure 2 An exemplary flow chart showing a method for generating an animation file according to some other embodiments of the present application is shown;

[0023] Figure 3 An exemplary flow chart showing a method for generating an animation file according to some further embodiments of the present application is shown;

[0024] Figure 4 The block diagram shows the hardware configuration of a device 400 for generating an animation file that can implement the animation file generating method according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. For the simplicity and clarity of the description, the figure marks may be repeated in the drawings to indicate corresponding or similar elements when deemed appropriate. In addition, the present application sets forth many specific details in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein may be practiced without these specific details. In other cases, well-known methods, processes, and components are not described in detail to avoid blurring the embodiments described herein. Moreover, the description should not be regarded as limiting the scope of the embodiments described herein. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0026] It should be understood that the possible terms "first" or "second" etc. in the claims, specifications and drawings disclosed in this application are used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of this application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0027] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0028] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0029] The traditional way of developing animations is to have relevant designers complete the page design and animation design of the advertising page, and then communicate with the web developer to reach a consensus by explaining the animation video, and finally the web developer will restore the animation frame by frame. This method has a long overall development process, and requires web developers and designers to constantly confirm details. Errors are prone to occur in the middle process, resulting in animation effects that are not as expected.

[0030] In view of this, there is an urgent need to provide an animation file generation method so that animation files can be generated efficiently and conveniently, the animation development cycle can be shortened, and the animation file playback performance can be improved, which is conducive to the generation of advertising pages and improves customer acquisition efficiency.

[0031] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.

[0032] Figure 1 An exemplary flowchart 100 showing a method for generating an animation file according to some embodiments of the present application is shown in FIG. Figure 1 , the animation file generation method shown in the embodiment of the present application may include:

[0033] In step S101, an animation design file is obtained. In the embodiment of the present application, the aforementioned animation design file refers to a design file produced by a designer using animation design software, such as Adobe After Effects. In actual application, appropriate animation design software needs to be selected according to actual application conditions, and the present application does not impose any restrictions in this regard.

[0034] In step S102, the key frame animation information corresponding to each key frame is determined based on the animation design file. In an embodiment of the present application, the animation design file can be directly processed in the animation design software, so that the required target animation file can be directly exported in the animation design software. For determining the key frame animation information corresponding to each key frame, the key frame can be first determined from the animation design file, and then the key frame animation information corresponding to the key frame can be obtained. The key frame animation information can include but is not limited to element displacement information, element rotation angle change information, element transparency change information, and element shape size change information.

[0035] In step S103, the property change track of the layer animation property corresponding to each layer in the animation design file is determined based on the layer animation information corresponding to each layer in the animation design file and the key frame animation information corresponding to each key frame. It can be understood that there will be multiple layers in the animation design file, and each layer can contain one or more elements, and the animation information of these one or more elements constitutes the layer animation information. The changes in the animation properties of each element can be learned through the layer animation information. Based on the changes in all these animation properties and the key frame animation information corresponding to each key frame, the relationship between the change of each animation property and the key frame can be determined, so that the property change track of the layer animation property corresponding to each layer can be determined. The layer animation property can include the animation property of each element in the layer, and the aforementioned animation property can include but is not limited to element displacement, element rotation angle, element transparency, element shape size, etc. In other words, the property change track of the layer animation property corresponding to the current layer can include the change track of each animation property of each element in the layer animation property corresponding to the current layer.

[0036] In step S104, keyframe reduction is performed on each layer based on the attribute change trajectory of the layer animation attribute corresponding to each layer, and a target keyframe set corresponding to each layer is obtained. In the embodiment of the present application, the method of reducing keyframes includes but is not limited to merging and deleting. In practical applications, it is necessary to select a suitable keyframe reduction method according to the actual application situation. The present application does not impose any restrictions in this regard. The purpose of reducing keyframes is to reduce the file size of the target animation file, thereby improving the playback performance of the animation.

[0037] In step S105, a target animation file is generated based on the target key frame set corresponding to each layer. In an embodiment of the present application, the aforementioned target animation file can be an animation file of the webview animation file type. It is understandable that in actual applications, the file type of the target animation file needs to be determined according to the actual application situation, and then the target animation file is generated according to the required file type. The present application does not impose any restrictions in this regard.

[0038] The embodiment of the present application obtains the animation design file, determines the key frame animation information corresponding to each key frame based on the animation design file, and then determines the attribute change trajectory of the layer animation attribute corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer in the animation design file and the key frame animation information corresponding to each key frame. Thus, the designed animation design file can be directly processed to confirm the change trajectory of each layer animation attribute, avoiding the complicated communication process between designers and web developers, solving the problem of animation production errors caused by misunderstandings in the communication process, which is conducive to reducing the work costs of designers and web developers and shortening the animation development cycle. Furthermore, the present application can reduce the key frames of each layer based on the attribute change trajectory of the layer animation attribute corresponding to each layer, obtain the target key frame set corresponding to each layer, and then generate the target animation file based on the target key frame set corresponding to each layer, thereby reducing the file size of the target animation file and improving the playback performance of the animation file, which is conducive to the generation of advertising pages.

[0039] In general, this application can generate animation files efficiently and conveniently, shorten the animation development cycle, and improve the animation file playback performance, which is conducive to the generation of advertising pages and improves customer acquisition efficiency.

[0040] In some embodiments, the key frame may be first determined from the animation design file, and then the key frame animation information corresponding to the key frame may be obtained. Figure 2 The process of determining key frame animation information is described in detail. Figure 2 An exemplary flowchart 200 showing a method for generating an animation file in some other embodiments of the present application is shown in FIG. Figure 2 , the animation file generation method shown in the embodiment of the present application may include:

[0041] In step S201, basic style parsing is performed on each layer in the animation design file to obtain basic layer information corresponding to each layer. In the embodiment of the present application, the aforementioned basic style parsing mainly involves analysis of layer order, layer transparency, layer type, layer transformation (rotation, scaling, tilting) analysis, layer positioning analysis and layer size analysis, so that the obtained basic layer information may include but is not limited to layer type, layer transparency, layer rotation angle, layer positioning coordinates and layer size information.

[0042] In step S202, the layer animation information corresponding to each layer is obtained based on the layer basic information corresponding to each layer. In an embodiment of the present application, the layer animation information corresponding to each layer can be obtained based on the layer type corresponding to each layer. For example, assuming that the animation design file is designed by the animation design software Adobe After Effects, then in the animation design file exported by Adobe After Effects, there will be an app.project.activeItem.layers property corresponding to each animation frame in each layer. This property records the layer type corresponding to each animation frame and the animation information matching the layer type. For example, when the layer type is a text layer, the animation information matching the text layer can include but is not limited to text content, and the animation information matching the image layer can include but is not limited to png format image materials. Therefore, the layer type corresponding to each layer obtained by the basic style analysis can be parsed to retrieve the animation information corresponding to each animation frame in each layer, thereby obtaining the layer animation information corresponding to each layer.

[0043] It is understandable that the attributes used to record the layer type corresponding to each of the above animation frames and the animation information matching the layer type are different in different animation design software. In practical applications, it is necessary to determine the attributes of the layer type corresponding to each of the above animation frames and the animation information matching the layer type based on the animation design software actually selected, so as to use this attribute to parse and determine the layer animation information corresponding to each layer. The present application does not impose any restrictions in this regard.

[0044] In step S203, the key frame corresponding to each layer is determined based on the layer animation information corresponding to each layer. In an embodiment of the present application, the key frame corresponding to each layer can be determined based on the property attribute of each animation frame in the layer animation information corresponding to each layer. Continuing with the example in the above step S202, the app.project.activeItem.layers property also records a field that can be used to determine whether each animation frame is a key frame. Exemplarily, the field can be app.project.activeItem.layers[x].property(key).keyTime(index). Among them, the property(key) shown in the aforementioned field indicates that the current animation frame is a key frame, and the keyTime(index) of the aforementioned field records the time of the current animation frame.

[0045] It is understandable that the attributes of the field used to record whether each of the above animation frames is a key frame are different in different animation design software. In practical applications, it is necessary to determine the attributes of the field for obtaining whether each of the above animation frames is a key frame based on the actually selected animation design software, and then use this attribute to determine the key frame corresponding to each layer. This application does not impose any restrictions in this regard.

[0046] In step S204, the key frame animation information corresponding to each key frame is determined based on the layer animation information corresponding to each layer and the position information of the key frame corresponding to each layer. In an embodiment of the present application, it can be first determined whether there is a key frame after each animation frame of each layer based on the position information of the key frame corresponding to each layer. If there is a key frame corresponding to the current layer after the current animation frame, the layer animation information corresponding to the current animation frame is moved to the key frame corresponding to the current layer. It should be noted that there can be one or more key frames corresponding to the current layer, but the key frame corresponding to the current layer that exists after the aforementioned current animation frame refers to the key frame that is closest to the current animation frame and exists after the current animation frame. In addition, if there is no key frame corresponding to the current layer after the current animation frame, the layer animation information corresponding to each animation frame stored in the key frame corresponding to the current layer is determined as the key frame animation information of the key frame corresponding to the current layer.

[0047] In some embodiments, it is necessary to reduce the file size of the target animation file by reducing the attribute change track. Figure 3 The process of determining the attribute change trajectory and the process of reducing the attribute change trajectory are described in detail. Figure 3 An exemplary flowchart 300 showing a method for generating an animation file in some other embodiments of the present application is shown. Figure 3 , the animation file generation method shown in the embodiment of the present application may include:

[0048] In step S301, the attribute change records of the layer animation attributes that match the key frame animation information corresponding to the key frame of the corresponding layer in the layer animation information corresponding to each layer are stored respectively. In the embodiment of the present application, the layer animation attributes that are consistent with the key frame animation information corresponding to the key frame of the corresponding layer can be found in the layer animation information corresponding to each layer, and the attribute change records of these consistent layer animation attributes are stored, such as layer transparency change records, layer rotation angle change records, layer positioning coordinate change records, layer size information change records, etc.

[0049] In step S302, the attribute change relationship between each attribute change node in each attribute change record and the animation attribute of the corresponding key frame animation information is stored. In the embodiment of the present application, the attribute change relationship between each change in each attribute change record (i.e., each attribute change node) and the animation attribute of the corresponding key frame animation information can be determined, for example, the conversion relationship between the current layer transparency change node and the key frame layer transparency of the corresponding key frame animation information is determined. After confirmation, all attribute change relationships are stored.

[0050] In step S303, the property change track of the layer animation property corresponding to each layer is determined based on each property change record and each property change relationship. It can be understood that the change track of each animation property of each animation frame in each layer can be determined based on each property change record and each property change relationship, and these change tracks constitute the above-mentioned property change track. This ensures that the key frame can perform animation restoration on each animation frame in the layer based on the corresponding key frame animation information and the change track of each animation property.

[0051] In step S304, keyframe reduction is performed on each layer based on the property change trajectory of the layer animation properties corresponding to each layer. In an embodiment of the present application, the animation curvature curve corresponding to each layer can be first determined based on the preset vector curve and the property change trajectory of the layer animation properties corresponding to each layer, wherein the aforementioned preset vector curve can adopt a Bezier curve, so that the animation curvature curve corresponding to each layer can be determined based on the curvature of the Bezier curve and the property change trajectory of the layer animation properties corresponding to each layer. It can be understood that the specific form of the preset vector curve is diverse. In actual applications, the specific form of the preset vector curve needs to be determined according to the actual application situation, and the present application does not impose any restrictions in this regard.

[0052] Furthermore, keyframe reduction can be performed on each layer based on the animation curvature curve corresponding to each layer. Specifically, N consecutive keyframes with the same curvature and the same animation attributes can be deleted based on the animation curvature curve, where N is an integer greater than 2. Preferably, N can be 3. In practical applications, the value of N needs to be determined according to the actual application situation, and the present application does not impose any restrictions in this regard. At the same time, keyframes with the same time point and different animation attributes can be merged based on the animation curvature curve.

[0053] In step S305, a target animation file is generated based on the target key frame set corresponding to each layer. In the embodiment of the present application, before generating the target animation file, it is also necessary to obtain animation configuration information, which may include but is not limited to the number of playbacks, playback frequency, and animation file type. Then, the number of loop playbacks and playback frequency of the target animation file can be determined based on the animation configuration information, and finally a target animation file that meets the required animation file type is generated based on the target key frame set corresponding to each layer, and the animation file type will be played according to the number of loop playbacks and playback frequency.

[0054] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a device for generating animation files and corresponding embodiments.

[0055] Figure 4 FIG. 4 is a block diagram showing the hardware configuration of a device 400 for generating an animation file that can implement the animation file generation method of an embodiment of the present application. Figure 4 As shown, the device 400 for generating an animation file may include a processor 410 and a memory 420. Figure 4 In the device 400 for generating an animation file, only the components related to this embodiment are shown. Therefore, it is obvious to a person skilled in the art that the device 400 for generating an animation file may also include components related to the present embodiment. Figure 4 The components shown in the figure are different from the common components. For example: fixed-point arithmetic units.

[0056] The device 400 for animation file generation may correspond to a computing device having various processing functions, such as functions for generating a neural network, training or learning a neural network, quantizing a floating point neural network to a fixed point neural network, or retraining a neural network. For example, the device 400 for animation file generation may be implemented as various types of devices, such as a personal computer (PC), a server device, a mobile device, etc.

[0057] The processor 410 controls all functions of the device 400 for animation file generation. For example, the processor 410 controls all functions of the device 400 for animation file generation by executing a program stored in the memory 420 on the device 400 for animation file generation. The processor 410 may be implemented by a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), an artificial intelligence processor chip (IPU), etc. provided in the device 400 for animation file generation. However, the present application is not limited thereto.

[0058] In some embodiments, the processor 410 may include an input / output (I / O) unit 411 and a computing unit 412. The I / O unit 411 may be used to receive various data, such as an animation design file. Exemplarily, the computing unit 412 may be used to determine the key frame animation information corresponding to each key frame based on the animation design file received via the I / O unit 411; determine the attribute change track of the layer animation attribute corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer and the key frame animation information corresponding to each key frame; perform key frame reduction on each layer based on the attribute change track of the layer animation attribute corresponding to each layer to obtain a target key frame set corresponding to each layer; and generate a target animation file based on the target key frame set corresponding to each layer. This target animation file may be output by the I / O unit 411, for example. The output data may be provided to the memory 420 for reading and use by other devices (not shown), or may be directly provided to other devices for use.

[0059] The memory 420 is hardware for storing various data processed in the device 400 for animation file generation. For example, the memory 420 can store processed data and data to be processed in the device 400 for animation file generation. The memory 420 can store data sets involved in the animation file generation method process that has been processed or to be processed by the processor 410, such as animation design files, etc. In addition, the memory 420 can store applications, drivers, etc. to be driven by the device 400 for animation file generation. For example: the memory 420 can store various programs related to the animation file generation method to be executed by the processor 410. The memory 420 can be a DRAM, but the present application is not limited thereto. The memory 420 can include at least one of a volatile memory or a non-volatile memory. The non-volatile memory can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, a phase change RAM (PRAM), a magnetic RAM (MRAM), a resistive RAM (RRAM), a ferroelectric RAM (FRAM), etc. The volatile memory may include dynamic RAM (DRAM), static RAM (SRAM), synchronous DRAM (SDRAM), PRAM, MRAM, RRAM, ferroelectric RAM (FeRAM), etc. In an embodiment, the memory 420 may include at least one of a hard disk drive (HDD), a solid state drive (SSD), a high-density flash memory (CF), a secure digital (SD) card, a micro secure digital (Micro-SD) card, a mini secure digital (Mini-SD) card, an extreme digital (xD) card, caches, or a memory stick.

[0060] In summary, the specific functions implemented by the memory 420 and the processor 410 of the device 400 for generating animation files provided in the embodiments of this specification can be explained in comparison with the aforementioned embodiments in this specification, and can achieve the technical effects of the aforementioned embodiments, and will not be repeated here.

[0061] It should also be understood that any module, unit, component, server, computer, terminal or device that executes instructions exemplified herein may include or otherwise access computer-readable media, such as storage media, computer storage media or data storage devices (removable and / or non-removable) such as disks, optical disks or tapes. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules or other data.

[0062] The foregoing content can be better understood in accordance with the following terms:

[0063] Clause A1. A method for generating an animation file, comprising: obtaining an animation design file; determining key frame animation information corresponding to each key frame based on the animation design file; determining an attribute change trajectory of layer animation attributes corresponding to each layer in the animation design file based on layer animation information corresponding to each layer and key frame animation information corresponding to each key frame; performing key frame reduction on each layer based on the attribute change trajectory of the layer animation attributes corresponding to each layer to obtain a target key frame set corresponding to each layer; and generating a target animation file based on the target key frame set corresponding to each layer.

[0064] Clause A2. The method for generating an animation file according to clause A1, wherein determining the key frame animation information corresponding to each key frame based on the animation design file comprises: performing basic style parsing on each layer in the animation design file to obtain basic layer information corresponding to each layer; obtaining layer animation information corresponding to each layer based on the basic layer information corresponding to each layer; determining the key frame corresponding to each layer based on the layer animation information corresponding to each layer; and determining the key frame animation information corresponding to each key frame based on the layer animation information corresponding to each layer and the position information of the key frame corresponding to each layer.

[0065] Clause A3. The method for generating an animation file according to clause A2, wherein the basic layer information includes a layer type; wherein the layer animation information corresponding to each layer is obtained by parsing the basic layer information corresponding to each layer, including: obtaining the layer animation information corresponding to each layer by parsing the layer type corresponding to each layer.

[0066] Clause A4. The method for generating an animation file according to clause A2, wherein determining the key frame corresponding to each layer based on the layer animation information corresponding to each layer comprises: determining the key frame corresponding to each layer based on the property attribute of each animation frame in the layer animation information corresponding to each layer.

[0067] Clause A5. The animation file generation method according to clause A2, wherein the step of determining the key frame animation information corresponding to each key frame based on the layer animation information corresponding to each layer and the position information of the key frame corresponding to each layer comprises: determining whether there is a key frame after each animation frame of each layer based on the position information of the key frame corresponding to each layer; if there is a key frame corresponding to the current layer after the current animation frame, moving the layer animation information corresponding to the current animation frame to the key frame corresponding to the current layer; and if there is no key frame corresponding to the current layer after the current animation frame, determining the layer animation information corresponding to each animation frame stored in the key frame corresponding to the current layer as the key frame animation information of the key frame corresponding to the current layer.

[0068] Clause A6. The animation file generation method according to clause A1, wherein the method of determining the attribute change trajectory of the layer animation attributes corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer and the key frame animation information corresponding to each key frame includes: storing the attribute change records of the layer animation attributes that match the key frame animation information corresponding to the key frame of the corresponding layer in the layer animation information corresponding to each layer; storing the attribute change relationship between each attribute change node in each attribute change record and the animation attribute of the corresponding key frame animation information; and determining the attribute change trajectory of the layer animation attributes corresponding to each layer based on each attribute change record and each attribute change relationship.

[0069] Clause A7. The animation file generation method according to clause A1, wherein the key frame reduction of each layer based on the attribute change trajectory of the layer animation attributes corresponding to each layer comprises: determining the animation curvature curve corresponding to each layer based on a preset vector curve and the attribute change trajectory of the layer animation attributes corresponding to each layer; and key frame reduction of each layer based on the animation curvature curve corresponding to each layer.

[0070] Clause A8. The method for generating an animation file according to clause A7, wherein the key frame reduction for each layer based on the animation curvature curve corresponding to each layer comprises: deleting N consecutive key frames with the same curvature and the same animation attributes based on the animation curvature curve; wherein N is an integer greater than 2; and merging key frames with the same time point and different animation attributes based on the animation curvature curve.

[0071] Clause A9. The method for generating an animation file according to clause A1, wherein, before generating a target animation file based on a target key frame set corresponding to each layer, the method further comprises: obtaining animation configuration information; and determining a number of loop playback times and a playback frequency of the target animation file based on the animation configuration information.

[0072] Item A10, a device for generating animation files, comprising: a memory; and at least one processor, configured to: obtain an animation design file; determine key frame animation information corresponding to each key frame based on the animation design file; determine the attribute change trajectory of the layer animation attributes corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer and the key frame animation information corresponding to each key frame; perform key frame reduction on each layer based on the attribute change trajectory of the layer animation attributes corresponding to each layer to obtain a target key frame set corresponding to each layer; and generate a target animation file based on the target key frame set corresponding to each layer.

[0073] Item A11. A non-transitory machine-readable medium having program code for generating an animation file stored thereon, wherein when the program code is executed by at least one processor, the code guides the execution operation of the at least one processor, and the program code includes: obtaining an animation design file; determining key frame animation information corresponding to each key frame based on the animation design file; determining the attribute change trajectory of the layer animation attribute corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer and the key frame animation information corresponding to each key frame; performing key frame reduction on each layer based on the attribute change trajectory of the layer animation attribute corresponding to each layer to obtain a target key frame set corresponding to each layer; and generating a target animation file based on the target key frame set corresponding to each layer.

[0074] Although multiple embodiments of the present application have been shown and described herein, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art can think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein can be adopted. The attached claims are intended to limit the scope of protection of the present application, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A method for generating an animation file, characterized in that: include: Get the animation design files; Determine key frame animation information corresponding to each key frame based on the animation design file; Determine a property change track of a layer animation property corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer in the animation design file and the key frame animation information corresponding to each key frame; Based on the property change track of the layer animation property corresponding to each layer, key frame reduction is performed on each layer to obtain a target key frame set corresponding to each layer; as well as Generate a target animation file based on the target keyframe set corresponding to each layer.

2. The method for generating an animation file according to claim 1, characterized in that: Determining the key frame animation information corresponding to each key frame based on the animation design file includes: Performing basic style analysis on each layer in the animation design file to obtain basic layer information corresponding to each layer; Based on the analysis of the basic information of each layer, the layer animation information corresponding to each layer is obtained; Determining a key frame corresponding to each layer based on layer animation information corresponding to each layer; and The key frame animation information corresponding to each key frame is determined based on the layer animation information corresponding to each layer and the position information of the key frame corresponding to each layer.

3. The method for generating an animation file according to claim 2, characterized in that: The basic layer information includes the layer type; wherein the layer animation information corresponding to each layer obtained by parsing the basic layer information corresponding to each layer includes: The layer animation information corresponding to each layer is obtained based on the layer type corresponding to each layer.

4. The method for generating an animation file according to claim 2, characterized in that: Determining the key frame corresponding to each layer based on the layer animation information corresponding to each layer includes: The key frame corresponding to each layer is determined based on the property attribute of each animation frame in the layer animation information corresponding to each layer.

5. The method for generating an animation file according to claim 2, characterized in that: Determining the key frame animation information corresponding to each key frame based on the layer animation information corresponding to each layer and the position information of the key frame corresponding to each layer includes: Determine whether there is a key frame after each animation frame of each layer based on the position information of the key frame corresponding to each layer; If there is a key frame corresponding to the current layer after the current animation frame, the layer animation information corresponding to the current animation frame is moved to the key frame corresponding to the current layer; and If there is no key frame corresponding to the current layer after the current animation frame, the layer animation information corresponding to each animation frame stored in the key frame corresponding to the current layer is determined as the key frame animation information of the key frame corresponding to the current layer.

6. The method for generating an animation file according to claim 1, characterized in that: Determining the property change track of the layer animation property corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer in the animation design file and the key frame animation information corresponding to each key frame includes: The property change records of the layer animation properties that match the key frame animation information corresponding to the key frame of the corresponding layer in the layer animation information corresponding to each layer are stored respectively; storing the attribute change relationship between each attribute change node in each attribute change record and the animation attribute of the corresponding key frame animation information; and The attribute change track of the layer animation attribute corresponding to each layer is determined based on each attribute change record and each attribute change relationship.

7. The method for generating an animation file according to claim 1, characterized in that: The reducing of key frames of each layer based on the property change track of the layer animation property corresponding to each layer includes: Determining an animation curvature curve corresponding to each layer based on a preset vector curve and a property change track of a layer animation property corresponding to each layer; and Keyframe reduction is performed on each layer based on the animation curvature curve corresponding to each layer.

8. The method for generating an animation file according to claim 7, characterized in that: The reducing the key frames of each layer based on the animation curvature curve corresponding to each layer includes: Based on the animation curvature curve, N consecutive key frames with the same curvature and the same animation attribute are deleted; wherein N is an integer greater than 2; and The key frames with the same time point and different animation attributes are merged based on the animation curvature curve.

9. The method for generating an animation file according to claim 1, characterized in that: Before generating the target animation file based on the target key frame set corresponding to each layer, the method further includes: Get animation configuration information; The number of loop playback times and the playback frequency of the target animation file are determined based on the animation configuration information.

10. A device for generating animation files, characterized in that: include: Memory; as well as at least one processor configured to: Get the animation design files; Determine key frame animation information corresponding to each key frame based on the animation design file; Determine a property change track of a layer animation property corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer in the animation design file and the key frame animation information corresponding to each key frame; Based on the property change track of the layer animation property corresponding to each layer, key frame reduction is performed on each layer to obtain a target key frame set corresponding to each layer; as well as Generate a target animation file based on the target keyframe set corresponding to each layer.

11. A non-transitory machine-readable medium having stored thereon a program code for generating an animation file, wherein when the program code is executed by at least one processor, the code guides the execution operation of the at least one processor, the program code comprising: Get the animation design files; Determine key frame animation information corresponding to each key frame based on the animation design file; Determine a property change track of a layer animation property corresponding to each layer in the animation design file based on the layer animation information corresponding to each layer in the animation design file and the key frame animation information corresponding to each key frame; Based on the property change track of the layer animation property corresponding to each layer, key frame reduction is performed on each layer to obtain a target key frame set corresponding to each layer; as well as Generate a target animation file based on the target keyframe set corresponding to each layer.