Animation conversion method, device and intelligent device

By obtaining and converting the attributes and parameters of SVG animation, the animation format supported by the client is generated, which solves the problem that the Android client cannot parse SVG animation, realizes the generation of animation effects, and reduces the cost and load of relying on third-party class libraries.

CN113516737BActive Publication Date: 2024-09-03BEIJING XIAOMI PINECONE ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010230854.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-27
Publication Date
2024-09-03
Estimated Expiration
2040-03-27

AI Technical Summary

Technical Problem

The Android client cannot convert SVG animation into a format that it can parse, resulting in the inability to achieve animation effects and the need to rely on third-party animation libraries, which is costly and has a heavy computing load.

Method used

By obtaining the attributes and parameters of the animation, converting it into a format supported by the client, such as Animated Vector Drawable, the second format file of the animation is generated, which is the basis for realizing the animation effect.

Benefits of technology

There is no need to introduce third-party animation libraries, which reduces costs and computing loads, and enables the Android client to parse SVG animations and generate animation effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113516737B
    Figure CN113516737B
Patent Text Reader

Abstract

The present disclosure relates to an animation conversion method, apparatus and intelligent device. The method is applied to a client, and includes: obtaining a first format file of the animation; obtaining at least one attribute and corresponding parameters of the animation according to the first format file of the animation; converting the at least one attribute into a second format, and obtaining a second format file of the animation according to the parameters of the at least one attribute, wherein the second format file is a format supported and parsed by the system of the client. The conversion from the first format file to the second format file is completed by using various attributes of the animation as an intermediary, that is, it can be converted from the original format to the target format supported and parsed by the system of the client. For example, an Android client can use the conversion method provided by the present disclosure to convert an SVG animation into a format that it itself supports and parses, as the basis for achieving animation effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to an animation conversion method, device and intelligent device. Background Art

[0002] Scalable Vector Graphics (SVG) is a vector graphics specification developed by the World Wide Web Consortium (W3C). SVG includes static images and dynamic images (i.e. animations). Currently, the Android client can convert SVG static images to a format that it can parse itself to achieve static image drawing, but it cannot convert SVG animations to a format that it can parse itself, and cannot achieve animation effects. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the embodiments of the present disclosure provide an animation conversion method, apparatus and intelligent device to solve the defects in the related art.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an animation conversion method, which is applied to a client, and the method includes:

[0005] Get the first format file of the animation;

[0006] Acquire at least one attribute and corresponding parameters of the animation according to the first format file of the animation;

[0007] The at least one attribute is converted into a second format, and a second format file of the animation is obtained according to a parameter of the at least one attribute, wherein the second format file is in a format that can be parsed by a system of the client.

[0008] In one embodiment, the first format file of the animation includes a plurality of first tags and corresponding parameters;

[0009] The acquiring at least one attribute and corresponding parameter of the animation according to the first format file of the animation includes:

[0010] One or more first tags and corresponding parameters corresponding to each attribute of the animation are obtained as at least one attribute of the animation and the corresponding parameter.

[0011] In one embodiment, the step of obtaining one or more first tags and corresponding parameters corresponding to each attribute of the animation as at least one attribute of the animation and the corresponding parameters includes:

[0012] According to the format of the first format file, a plurality of first tags and corresponding parameters are obtained in sequence;

[0013] According to the attribute of each first tag, the first tag and the corresponding parameter are added to an attribute of the corresponding animation.

[0014] In one embodiment, the second format file of the animation includes a plurality of second tags and corresponding parameters;

[0015] The converting the at least one attribute into a second format and obtaining the second format file of the animation according to the parameters of the at least one attribute comprises:

[0016] Determine one or more second tags corresponding to each attribute of the animation according to the attributes of each second tag;

[0017] Determine the parameters corresponding to one or more second tags according to the parameters corresponding to each attribute of the animation;

[0018] A second format file is formed according to the format of the second format file and all the second tags and corresponding parameters.

[0019] In one embodiment, it further includes:

[0020] The second format file of the animation is parsed to generate an animation effect.

[0021] In one embodiment, the properties of the animation include at least one of the following:

[0022] Scaling properties, displacement properties, rotation properties, registration point adjustment properties, shape change properties, color change properties, path properties, and stroke properties.

[0023] According to a second aspect of an embodiment of the present disclosure, there is provided an animation conversion device, which is applied to a client, and the device includes:

[0024] An acquisition module, used for acquiring a first format file of the animation;

[0025] An attribute module, used for acquiring at least one attribute of the animation and corresponding parameters according to the first format file of the animation;

[0026] The determination module is used to convert the at least one attribute into a second format, and obtain a second format file of the animation according to the parameters of the at least one attribute, wherein the second format file is a format that the system of the client supports parsing.

[0027] In one embodiment, the first format file of the animation includes a plurality of first tags and corresponding parameters;

[0028] The attribute module is specifically used for:

[0029] One or more first tags and corresponding parameters corresponding to each attribute of the animation are obtained as at least one attribute of the animation and the corresponding parameter.

[0030] In one embodiment, the attribute module includes:

[0031] An acquisition unit, used to sequentially acquire a plurality of first tags and corresponding parameters according to a format of the first format file;

[0032] The adding unit is used to add the first tag and the corresponding parameters to an attribute of the corresponding animation according to the attribute of each first tag.

[0033] In one embodiment, the second format file of the animation includes a plurality of second tags and corresponding parameters;

[0034] The determination module comprises:

[0035] A label unit, used to determine one or more second labels corresponding to each attribute of the animation according to the attribute of each second label;

[0036] A parameter unit, used to determine parameters corresponding to one or more second tags according to parameters corresponding to each attribute of the animation;

[0037] The file unit is used to form a second format file according to the format of the second format file and all the second tags and corresponding parameters.

[0038] In one embodiment, it further includes:

[0039] The parsing module is used to parse the second format file of the animation to generate an animation effect.

[0040] In one embodiment, the properties of the animation include at least one of the following:

[0041] One or more of scaling attributes, displacement attributes, rotation attributes, registration point adjustment attributes, shape change attributes, color change attributes, path attributes, and stroke attributes.

[0042] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0043] a processor, and a memory for storing instructions executable by the processor;

[0044] Wherein, the processor is configured to:

[0045] Get the first format file of the animation;

[0046] Acquire at least one attribute and corresponding parameters of the animation according to the first format file of the animation;

[0047] The at least one attribute is converted into a second format, and a second format file of the animation is obtained according to a parameter of the at least one attribute, wherein the second format file is in a format that can be parsed by a system of the client.

[0048] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:

[0049] Get the first format file of the animation;

[0050] Acquire at least one attribute and corresponding parameters of the animation according to the first format file of the animation;

[0051] The at least one attribute is converted into a second format, and a second format file of the animation is obtained according to a parameter of the at least one attribute, wherein the second format file is in a format that can be parsed by a system of the client.

[0052] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0053] The present disclosure can obtain at least one attribute and corresponding parameters of the animation through the first format file of the animation, that is, obtain various attributes and parameters of each attribute contained in the animation information of the animation, and then convert each attribute into the second format, and then combine the conversion result and the parameters of each attribute to generate the second format file of the animation, that is, through the various attributes of the animation as an intermediary, the conversion from the first format file to the second format file is completed, that is, it can be converted from the original format to the target format that the client system supports parsing. For example, the Android client can use the conversion method provided by the present disclosure to convert the SVG animation into a format that it itself supports parsing as the basis for achieving animation effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0055] Figure 1 is a flowchart of an animation conversion method shown in an exemplary embodiment of the present disclosure;

[0056] Figure 2 is a flowchart of a method for obtaining animation properties and corresponding parameters shown in an exemplary embodiment of the present disclosure;

[0057] Figure 3 is a flowchart of a method for obtaining a second format file of an animation shown in an exemplary embodiment of the present disclosure;

[0058] Figure 4is a structural schematic diagram of an animation switching device shown in an exemplary embodiment of the present disclosure;

[0059] Figure 5 is a structural diagram of a property module shown in an exemplary embodiment of the present disclosure;

[0060] Figure 6 is a structural diagram of a determination module shown in an exemplary embodiment of the present disclosure;

[0061] Figure 7 is a structural schematic diagram of an animation switching device shown in another exemplary embodiment of the present disclosure;

[0062] Figure 8 is a block diagram of a smart device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0063] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0064] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0065] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0066] Scalable Vector Graphics (SVG) is a vector graphics specification developed by the World Wide Web Consortium (W3C). SVG includes static images and dynamic images (i.e. animations). Currently, the Android client can convert SVG static images to a format that it can parse. For example, the vector asset in Android Studio can convert SVG static images to the Vector Drawable format. The Android client can parse the Vector Drawable format and complete the drawing of static images. However, the Android client cannot convert SVG animations to a format that it can parse (such as the Animated Vector Drawable format) and cannot achieve animation effects. Therefore, it can only rely on third-party animation libraries to package SVG animations into a special format supported by them. During development, it is necessary to introduce third-party animation libraries into the system to parse animations, which is costly and has a large computing load. Common third-party animation libraries are lottie and svga.

[0067] Based on this, please refer to the attached Figure 1 The present disclosure provides an animation conversion method, which is applied to a client. The method includes the following three steps S101 to S103:

[0068] In this embodiment, the client may be an intelligent terminal, such as a smart phone, a tablet computer, a PDA (Personal Digital Assistant), an e-book reader, a multimedia player, and the like.

[0069] In step S101, a first format file of an animation is obtained.

[0070] In this step, the original format file, that is, the format file of the animation to be converted, is obtained, wherein the first format file is a source code file used to describe the animation, that is, a text using a certain format to describe the animation, so that the format file can be as readable as an HTML web page. After the animation tool is used to output the first format animation, the first format file can be opened with a word processing tool, that is, the source code used to describe the animation can be seen, so as long as the syntax of the first format is mastered, the content of the animation can be read through the source code.

[0071] In one example, the animation is an object moving from point A to point B, so the first format file uses its inherent format to form source code describing the animation process, and the animation process can be read through the source code of the first format file.

[0072] In one example, the first format is SVG format, and the first format file of the animation is a source code file of the SVG animation, that is, a text file written in Extensible Markup Language (XML). For example, the following is a source code file of an SVG animation.

[0073] <svg class="lds-message"width="80px"height="80px"xmlns="http: / / www.w3.org / 2000 / svg"viewBox="0 0 100 100"preserveAspectRatio="xMidYMid">

[0074] <g transform="translate(20 50)">

[0075] <circle cx="0"cy="0"r="7"fill="#e15b64"transform="scale(0.992750.99275)">

[0076] <animateTransform attributeName="transform"type="scale"begin="-0.375s"calcMode="spline"keySplines="0.3 0 0.7 1;0.3 0 0.7 1"values="0;1;0"keyTimes="0;0.5;1"dur="1s"repeatCount=“indefinite”>

[0077]

[0078]

[0079] in,<g transform="translate(20 50)"> Indicates the graphic position;<circle cx="0"cy="0"r="7"fill="#e15b64"transform="scale(0.99275 0.99275)"> Represents graphic style information; <animateTransform attributeName="transform"type="scale"begin="-0.375s"calcMode="spline"keySplines="0.3 0 0.7 1;0.3 0 0.7 1"values="0;1;0"keyTimes="0;0.5;1"dur="1s"repeatCount=“indefinite”> Represents graphic animation information, animation type time attribute value change.

[0080] In step S102, at least one attribute of the animation and corresponding parameters are obtained according to the first format file of the animation.

[0081] In this step, the first format file is the source code text describing the animation. Describing the animation means describing the various attributes contained in the animation. That is, when the first format syntax is used to read the animation content expressed by the first format file, it is to read which attributes the animation contains and how many parameters each attribute has. Therefore, this step is a process of reading the first format animation, and a more direct animation description - attributes and parameters - is obtained through reading.

[0082] In one example, the animation of an object moving from point A to point B can read its properties such as the moving start point, moving end point, moving duration, moving speed, moving path, etc. from its source code file.

[0083] In step S103, the at least one attribute is converted into a second format, and a second format file of the animation is obtained according to the parameters of the at least one attribute, wherein the second format file is a format that can be parsed by the system of the client.

[0084] In this step, the second format is a format different from the format of the animation to be converted (i.e., the first format), and this format can be parsed by the client system, that is, the target format of the conversion process. Like the first format file, the second format file is a target code file used to describe the animation. It is a text that uses another format to describe the animation and is also readable. Using the second format to describe the animation means using the second format to describe the various attributes of the animation in step S102. Therefore, the various attributes of the animation can be described based on the syntax of the second format. In specific operations, each attribute can be converted to the second format first, and then the parameters of each attribute can be assigned to the converted second format to obtain the second format file.

[0085] In one example, for an animation of an object moving from point A to point B, it is necessary to convert the properties and parameters such as the moving start point, moving end point, moving duration, moving speed, and moving path into a second format, and then assign values ​​to the converted second format using the parameters of the above-mentioned properties. The converted second formats are edited using the syntax of the second format to obtain the second format file corresponding to the animation.

[0086] In one example, the second format is an animated vector drawable format, and the second format file of the animation is an animated vector drawable code text, that is, a text file written in Extensible Markup Language (XML). For example, the following is a target code file of an animated vector drawable animation.

[0087]

[0088]

[0089]

[0090]

[0091]

[0092]

[0093]

[0094]

[0095] The animation conversion method disclosed in this embodiment uses various attributes of the animation as an intermediary to complete the conversion of the first format file to the second format file, that is, it can be converted from the original format to the target format that the client system supports parsing. For example, an Android client can use the conversion method provided in this disclosure to convert an SVG animation to a format that it itself supports parsing (such as Animated Vector Drawable) as a basis for achieving animation effects.

[0096] In some embodiments of the present disclosure, the first format file of the animation includes multiple first tags and corresponding parameters. The present disclosure exemplarily shows a method for obtaining at least one attribute of the animation and corresponding parameters according to the first format file of the animation, the purpose of which is to obtain one or more first tags and corresponding parameters corresponding to each attribute of the animation as at least one attribute of the animation and corresponding parameters. For specific implementation methods, please refer to the attached Figure 2 , including step S201 to step S202.

[0097] In step S201, a plurality of first tags and corresponding parameters are obtained in sequence according to the format of the first format file.

[0098] Among them, the first format file describes the animation through the first tag and parameters. The specific type of the first tag is generated according to the syntax of the first format file. Each tag has a fixed purpose, that is, each first tag is used to describe an attribute of the animation, but the first tag and the attribute of the animation are not one-to-one corresponding, that is, there is a situation where one first tag can complete the description of an attribute of the animation, but there is also a situation where an attribute of the animation requires the cooperation of multiple first tags to complete the description. That is, there is a mapping relationship between the first tag and the attribute of the animation. In this mapping relationship, there is a one-to-one relationship between the first tag and the attribute of the animation, and there is also a many-to-one relationship between the first tag and the attribute of the animation. The position of the first tag in the first format file, the connection statements between different first tags, and other statements in the first format file are all generated according to the syntax of the first format.

[0099] In this step, each first tag is counted using the format of the first format file and the syntax of the first format.

[0100] In an example, the first format file is a source code file of an SVG animation, and the first tag is a tag in the source code file, such as width, height, etc. in the source code file of the SVG animation mentioned above.

[0101] In step S202, according to the attribute of each first tag, the first tag and the corresponding parameter are added to an attribute of the corresponding animation.

[0102] In this step, the attributes of the animation described by each first tag (i.e., the attributes of the first tag) can be determined according to the format of the first format file and the syntax of the first format, and added to the corresponding attributes. After all the first tags are assigned, the attribute types of the animation and the content of each attribute can be obtained.

[0103] In one example, the animation attributes include at least one of the following: scaling attributes, displacement attributes, rotation attributes, registration point adjustment attributes, shape change attributes, color change attributes, path attributes, and stroke attributes. The scaling attributes may include a wide scaling factor and a high scaling factor; the displacement attributes may include a displacement of a horizontal coordinate and a displacement of a vertical coordinate; the rotation attributes may include a rotation type, such as rotation; the registration point adjustment attributes may include a registration point horizontal coordinate and a registration point vertical coordinate; the shape change attributes may include path information; the color change attributes may include a fill color and a fill color transparency; the path attributes include a path start and a path end; and the stroke attributes include a stroke color, a stroke color transparency, and a stroke width.

[0104] Through step S201 and step S202, the extraction of valid content in the first format file (i.e., the extraction of the first tag) and the determination of the attributes of the animation (i.e., the allocation of the first tag) are completed, the format text of the first format file is effectively removed, the content of the first format file is accurately and efficiently utilized, and the intermediary in the animation conversion process - an accurate description of the animation attributes is quickly obtained.

[0105] In some embodiments of the present disclosure, the second format file of the animation includes a plurality of second tags and corresponding parameters; Figure 3 , which exemplarily shows a method for obtaining a second format file of an animation, specifically including steps S301 to S303.

[0106] In step S301, one or more second tags corresponding to each attribute of the animation are determined according to the attributes of each second tag.

[0107] Among them, the second format file describes the animation through the second tag and parameters. The specific type of the second tag is generated according to the syntax of the second format file. Each second tag has a fixed purpose, that is, each second tag is used to describe an attribute of the animation, but the second tag and the attribute of the animation are not one-to-one corresponding, that is, there is a situation where a second tag can complete the description of an attribute of the animation, but there is also a situation where an attribute of the animation requires the cooperation of multiple first tags to complete the description. That is, there is a mapping relationship between the second tag and the attribute of the animation. In this mapping relationship, there is a one-to-one relationship between the second tag and the attribute of the animation, and there is also a many-to-one relationship between the second tag and the attribute of the animation. The position of the second tag in the second format file, the connecting statements between different second tags, and other statements in the second format file are all generated according to the syntax of the second format.

[0108] In this step, firstly, various attributes of the animation are counted, and then, based on the mapping relationship between the second tag and the attributes of the animation, it is possible to determine which second tags are needed to describe each attribute of the animation, and convert the attributes of the animation into one or more tags for describing it.

[0109] In step S302, parameters corresponding to one or more second tags are determined according to the parameters corresponding to each attribute of the animation.

[0110] In this step, when the attribute of the animation corresponds to a second tag, the parameters of the attribute need to be converted into the format of the parameters corresponding to the second tag, thereby determining the parameters of the second tag; when the attribute of the animation corresponds to multiple second tags, the parameters of the attribute need to be split into multiple parameters corresponding to multiple second tags, and the split parameters need to be converted into the format of the parameters corresponding to the second tag, thereby determining the parameters of each second tag corresponding to the attribute.

[0111] In step S303, a second format file is formed according to the format of the second format file and all second tags and corresponding parameters.

[0112] In this step, the position of the second tag in the second format file, the connecting statements between different second tags and other statements in the second format file are determined according to the syntax of the second format, and then a complete second format file is generated.

[0113] In one example, the second format file is the target code file in the Animated Vector Drawable format mentioned above, which can be directly parsed by the Android client, thus avoiding reliance on third-party animation libraries and not introducing any third-party animation libraries into the system, thereby reducing costs and computing load.

[0114] In some embodiments of the present disclosure, since the client system supports parsing the second format file, the animation conversion method also includes, after generating the second format file, parsing the second format file using the client system, and generating an animation effect after the parsing is completed.

[0115] In this step, the Android client supports parsing animations in the Animated Vector Drawable format. Therefore, after converting the SVG animation to the Animated Vector Drawable format, the Android client can parse the AnimatedVector Drawable format file and generate animation effects. Therefore, the animation conversion method in this embodiment enables the Android client to use the SVG animation that it does not support parsing and generate animation effects.

[0116] For the second aspect, please refer to the attached Figure 4 The present disclosure provides an animation conversion device, which is applied to a client, and the device includes:

[0117] An acquisition module 401 is used to acquire a first format file of an animation;

[0118] The attribute module 402 is used to obtain at least one attribute of the animation and corresponding parameters according to the first format file of the animation;

[0119] The determination module 403 is used to convert the at least one attribute into a second format, and obtain a second format file of the animation according to the parameters of the at least one attribute, wherein the second format file is a format that the client system supports parsing.

[0120] In some embodiments of the present disclosure, the first format file of the animation includes a plurality of first tags and corresponding parameters;

[0121] The attribute module is specifically used for:

[0122] One or more first tags and corresponding parameters corresponding to each attribute of the animation are obtained as at least one attribute of the animation and the corresponding parameter.

[0123] Please refer to the attached Figure 5 In some embodiments of the present disclosure, the attribute module includes:

[0124] An acquisition unit 501 is used to sequentially acquire a plurality of first tags and corresponding parameters according to a format of a first format file;

[0125] The adding unit 502 is used to add the first tag and the corresponding parameters to an attribute of the corresponding animation according to the attribute of each first tag.

[0126] In some embodiments of the present disclosure, the second format file of the animation includes a plurality of second tags and corresponding parameters;

[0127] Please refer to the attached Figure 6 , the determining module comprises:

[0128] The label unit 601 is used to determine one or more second labels corresponding to each attribute of the animation according to the attribute of each second label;

[0129] A parameter unit 602, used to determine parameters corresponding to one or more second tags according to parameters corresponding to each attribute of the animation;

[0130] The file unit 603 is used to form a second format file according to the format of the second format file and all the second tags and corresponding parameters.

[0131] Please refer to the attached Figure 7 In some embodiments of the present disclosure, in addition to the acquisition module 701, the attribute module 702 and the determination module 703, the animation conversion device also includes:

[0132] The parsing module 704 is used to parse the second format file of the animation to generate an animation effect.

[0133] In some embodiments of the present disclosure, the properties of the animation include at least one of the following:

[0134] One or more of scaling attributes, displacement attributes, rotation attributes, registration point adjustment attributes, shape change attributes, color change attributes, path attributes, and stroke attributes.

[0135] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0136] Third, please refer to the attached Figure 8 , which exemplarily shows a block diagram of an electronic device. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0137] Reference Figure 8 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0138] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0139] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0140] The power component 806 provides power to the various components of the device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0141] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0142] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0143] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0144] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800 and the temperature change of the device 800. The sensor assembly 814 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0145] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0146] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the power supply method for the above-mentioned electronic device.

[0147] In a fourth aspect, the present disclosure, in an exemplary embodiment, further provides a non-transitory computer-readable storage medium including instructions, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an apparatus 800 to complete the power supply method of the electronic device. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0148] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0149] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An animation conversion method, It is characterized in that Applied to a client, the method comprises: Get the first format file of the animation; Acquire at least one attribute and corresponding parameters of the animation according to the first format file of the animation; Converting the at least one attribute into a second format, and obtaining a second format file of the animation according to a parameter of the at least one attribute, wherein the second format file is a format that can be parsed by a system of the client; The second format file of the animation includes a plurality of second tags and corresponding parameters; the converting the at least one attribute into the second format and obtaining the second format file of the animation according to the parameters of the at least one attribute includes: Determine one or more second tags corresponding to each attribute of the animation according to the attributes of each second tag; Determine the parameters corresponding to one or more second tags according to the parameters corresponding to each attribute of the animation; According to the format of the second format file and all the second tags and corresponding parameters, forming the second format file; The step of determining the parameters corresponding to one or more second tags according to the parameters corresponding to each attribute of the animation includes: When the attribute of the animation corresponds to a second tag, converting the parameter of the attribute into a format of the parameter corresponding to the second tag; When the attribute of the animation corresponds to multiple second tags, splitting the parameter of the attribute into multiple parameters corresponding to the multiple second tags respectively, and converting the split parameters of the attribute into the format of the parameters corresponding to the corresponding second tags respectively; The properties of the animation include at least one of the following: Scaling properties, displacement properties, rotation properties, registration point adjustment properties, shape change properties, color change properties, path properties, and stroke properties.

2. The animation conversion method according to claim 1, It is characterized in that The first format file of the animation includes a plurality of first tags and corresponding parameters; The acquiring at least one attribute and corresponding parameter of the animation according to the first format file of the animation includes: One or more first tags and corresponding parameters corresponding to each attribute of the animation are obtained as at least one attribute of the animation and the corresponding parameter.

3. The animation conversion method according to claim 2, It is characterized in that The step of obtaining one or more first tags and corresponding parameters corresponding to each attribute of the animation as at least one attribute of the animation and the corresponding parameters includes: According to the format of the first format file, a plurality of first tags and corresponding parameters are obtained in sequence; According to the attribute of each first tag, the first tag and the corresponding parameter are added to an attribute of the corresponding animation.

4. The animation conversion method according to claim 1, It is characterized in that Also includes: The second format file of the animation is parsed to generate an animation effect.

5. An animation conversion device, It is characterized in that Applied to a client, the device comprises: An acquisition module, used for acquiring a first format file of the animation; An attribute module, used for acquiring at least one attribute of the animation and corresponding parameters according to the first format file of the animation; A determination module, configured to convert the at least one attribute into a second format, and obtain a second format file of the animation according to a parameter of the at least one attribute, wherein the second format file is a format that can be parsed by a system of the client; The second format file of the animation includes a plurality of second tags and corresponding parameters; the determination module includes: A label unit, used to determine one or more second labels corresponding to each attribute of the animation according to the attribute of each second label; A parameter unit, used to determine parameters corresponding to one or more second tags according to parameters corresponding to each attribute of the animation; A file unit, used to form a second format file according to the format of the second format file and all second tags and corresponding parameters; Wherein, when the parameter unit is used to determine the parameters corresponding to one or more second tags according to the parameters corresponding to each attribute of the animation, it is specifically used to: When the attribute of the animation corresponds to a second tag, converting the parameter of the attribute into a format of the parameter corresponding to the second tag; When the attribute of the animation corresponds to multiple second tags, splitting the parameter of the attribute into multiple parameters corresponding to the multiple second tags respectively, and converting the split parameters of the attribute into the format of the parameters corresponding to the corresponding second tags respectively; The properties of the animation include at least one of the following: One or more of scaling attributes, displacement attributes, rotation attributes, registration point adjustment attributes, shape change attributes, color change attributes, path attributes, and stroke attributes.

6. The animation conversion device according to claim 5, It is characterized in that The first format file of the animation includes a plurality of first tags and corresponding parameters; The attribute module is specifically used for: One or more first tags and corresponding parameters corresponding to each attribute of the animation are obtained as at least one attribute of the animation and the corresponding parameter.

7. The animation conversion device according to claim 6, It is characterized in that The attribute module includes: An acquisition unit, used for sequentially acquiring a plurality of first tags and corresponding parameters according to a format of the first format file; The adding unit is used to add the first tag and the corresponding parameters to an attribute of the corresponding animation according to the attribute of each first tag.

8. The animation conversion device according to claim 5, It is characterized in that Also includes: The parsing module is used to parse the second format file of the animation to generate an animation effect.

9. An electronic device, It is characterized in that include: a processor, and a memory for storing instructions executable by the processor; Wherein, the processor is configured to: Get the first format file of the animation; Acquire at least one attribute and corresponding parameters of the animation according to the first format file of the animation; Converting the at least one attribute into a second format, and obtaining a second format file of the animation according to a parameter of the at least one attribute, wherein the second format file is a format that can be parsed by a system of the client; The second format file of the animation includes a plurality of second tags and corresponding parameters; the converting the at least one attribute into the second format and obtaining the second format file of the animation according to the parameters of the at least one attribute includes: Determine one or more second tags corresponding to each attribute of the animation according to the attributes of each second tag; Determine the parameters corresponding to one or more second tags according to the parameters corresponding to each attribute of the animation; According to the format of the second format file and all the second tags and corresponding parameters, forming the second format file; The step of determining the parameters corresponding to one or more second tags according to the parameters corresponding to each attribute of the animation includes: When the attribute of the animation corresponds to a second tag, converting the parameter of the attribute into a format of the parameter corresponding to the second tag; When the attribute of the animation corresponds to multiple second tags, splitting the parameter of the attribute into multiple parameters corresponding to the multiple second tags respectively, and converting the split parameters of the attribute into the format of the parameters corresponding to the corresponding second tags respectively; The properties of the animation include at least one of the following: Scaling properties, displacement properties, rotation properties, registration point adjustment properties, shape change properties, color change properties, path properties, and stroke properties.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by the processor, the following steps are implemented: Get the first format file of the animation; Acquire at least one attribute and corresponding parameters of the animation according to the first format file of the animation; Converting the at least one attribute into a second format, and obtaining a second format file of the animation according to a parameter of the at least one attribute, wherein the second format file is a format that can be parsed by a system of the client; The second format file of the animation includes a plurality of second tags and corresponding parameters; the converting the at least one attribute into the second format and obtaining the second format file of the animation according to the parameters of the at least one attribute includes: Determine one or more second tags corresponding to each attribute of the animation according to the attributes of each second tag; Determine the parameters corresponding to one or more second tags according to the parameters corresponding to each attribute of the animation; According to the format of the second format file and all the second tags and corresponding parameters, forming the second format file; The step of determining the parameters corresponding to one or more second tags according to the parameters corresponding to each attribute of the animation includes: When the attribute of the animation corresponds to a second tag, converting the parameter of the attribute into a format of the parameter corresponding to the second tag; When the attribute of the animation corresponds to multiple second tags, splitting the parameter of the attribute into multiple parameters corresponding to the multiple second tags respectively, and converting the split parameters of the attribute into the format of the parameters corresponding to the corresponding second tags respectively; The properties of the animation include at least one of the following: Scaling properties, displacement properties, rotation properties, registration point adjustment properties, shape change properties, color change properties, path properties, and stroke properties.