CN113538633B - Animation playing method and device, electronic equipment and computer readable storage medium - Google Patents

Animation playing method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113538633B
CN113538633B CN202110836317.9A CN202110836317A CN113538633B CN 113538633 B CN113538633 B CN 113538633B CN 202110836317 A CN202110836317 A CN 202110836317A CN 113538633 B CN113538633 B CN 113538633B
Authority
CN
China
Prior art keywords
image element
animation
target
display object
target display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110836317.9A
Other languages
Chinese (zh)
Other versions
CN113538633A (en
Inventor
郝华栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110836317.9A priority Critical patent/CN113538633B/en
Publication of CN113538633A publication Critical patent/CN113538633A/en
Application granted granted Critical
Publication of CN113538633B publication Critical patent/CN113538633B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

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

Abstract

The disclosure relates to an animation playing method, an animation playing device, electronic equipment and a computer readable storage medium, and belongs to the technical field of multimedia. According to the method and the device, when the element replacement instruction is received, the first image element to be replaced in the target display object is determined, layout information for indicating the layout of the second image element to be generated in the target display object and business information for indicating business data to be included in the second image element are obtained, the second image element for replacing the first image element is generated based on the layout information and the business information, and therefore rendering is carried out based on the second image element and the attribute description file of the target animation, animation rendering is achieved, the target animation capable of being played in the target display object is obtained, a developer does not need to write codes manually, man-machine interaction efficiency is improved, and animation production efficiency is further improved.

Description

Animation playing method and device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of multimedia technologies, and in particular, to an animation playing method, an animation playing device, an electronic device, and a computer readable storage medium.
Background
Today, the actual business data is often involved in the animation design process, for example, the actual business data of the amount of the red packet is involved in the animation design process of opening the red packet. At present, when the animation effect related to the actual business data is realized, the animation effect can only be realized by manually writing codes by a developer, and the human-computer interaction efficiency is low, so that the animation production efficiency is low.
Disclosure of Invention
The present disclosure provides an animation playing method, an apparatus, an electronic device, and a computer readable storage medium, so as to improve man-machine interaction efficiency in an animation production process, thereby improving animation production efficiency. The technical scheme of the present disclosure is as follows:
According to a first aspect of an embodiment of the present disclosure, there is provided an animation playing method, including:
determining a first image element to be displayed in a target display object in response to an element replacement instruction, wherein the element replacement instruction is used for indicating replacement of the first image element;
Acquiring layout information and service information, wherein the layout information is used for indicating the layout of a second image element to be generated in the target display object, and the service information is used for indicating service data included in the second image element;
Generating a second image element based on the layout information and the service information, and replacing the first image element with the second image element;
rendering is performed based on the attribute description file of the target animation and the second image element so as to play the target animation in the target display object, wherein the attribute description file comprises attribute information corresponding to an animation effect included in the target animation.
According to the scheme provided by the disclosure, when the element replacement instruction is received, the first image element to be replaced in the target display object is determined, so that layout information for indicating the layout of the second image element to be generated in the target display object and business information for indicating business data to be included in the second image element are obtained, and further, the second image element for replacing the first image element is generated based on the layout information and the business information, so that the animation rendering is realized based on the second image element and the attribute description file of the target animation, the target animation capable of being played in the target display object is obtained, a developer does not need to write codes manually, the man-machine interaction efficiency is improved, and the animation production efficiency is further improved.
In some embodiments, generating the second image element based on the layout information and the traffic information includes:
Determining a layout of the second image element to be generated in the target display object based on the layout information;
And adding the business data indicated by the business information into the layout of the second image element to be generated to obtain the second image element.
The layout of the second image element to be generated in the target display object is determined based on the layout information, so that the part of the second image element to be generated, which is not changed along with the change of the service data, is determined, the service data indicated by the service information is further added to the layout to obtain the complete second image element, and the automatic generation of the second image element is realized, so that when the service data is changed, a developer does not need to write codes to generate the second image element corresponding to the corresponding service data, the man-machine interaction efficiency is improved, the generation efficiency of the second image element is improved, and the animation production efficiency is further improved.
In some embodiments, rendering based on the attribute description file of the target animation and the second image element to play the target animation in the target display object comprises:
Rendering the second image element based on the attribute description file of the target animation to play the target animation based on the second image element in the target display object.
After the first image element is replaced by the second image element, the second image element is rendered based on the attribute description file of the target animation, so that the second image element is rendered, further, the target animation can be played in the target display object, manual operation of a developer is not needed, the man-machine interaction efficiency is improved, and the animation playing efficiency is improved.
In some embodiments, the method further comprises:
Rendering based on the attribute description file to play the target animation in the target display object without the first image element.
Under the condition that a first image element to be replaced does not exist, corresponding image elements are rendered directly based on the attribute description file, so that playing of target animation in a target display object is achieved, manual operation of a developer is not needed, man-machine interaction efficiency is improved, animation production efficiency is improved, and animation playing efficiency can be improved.
In some embodiments, the element replacement instruction is triggered by a display instruction of the target display object.
When the display instruction of the target display object is triggered, the element replacement instruction is triggered, so that the electronic equipment can automatically replace the first image element to be replaced in response to the element replacement instruction, further, the rendering of the target animation related to the business data is realized, manual operation of a developer is not needed, the man-machine interaction efficiency is improved, and the automation of the animation production process is realized.
In some embodiments, the target display object is a resource release prompt box, where the resource release prompt box is used to release virtual resources; or, the target display object is a function control.
By providing two possible target display objects to realize the display of target animation in the two target display objects through the scheme provided by the disclosure, the diversity of the display positions of the target animation is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided an animation playing device, including:
A determining unit configured to execute a determination of a first image element to be displayed in a target display object in response to an element replacement instruction for instructing replacement of the first image element;
An acquisition unit configured to perform acquisition of layout information for indicating a layout of a second image element to be generated in the target display object and service information for indicating service data included in the second image element;
A generation unit configured to perform generation of a second image element based on the layout information and the service information;
a replacing unit configured to perform replacement of the first image element with the second image element;
and a rendering unit configured to perform rendering based on a property description file of the target animation and the second image element to play the target animation in the target display object, wherein the property description file includes property information corresponding to an animation effect included in the target animation.
In some embodiments, the generating unit is configured to perform determining a layout of the second image element to be generated in the target display object based on the layout information; and adding the business data indicated by the business information into the layout of the second image element to be generated to obtain the second image element.
In some embodiments, the rendering unit is configured to execute a property description file based on the target animation, render the second image element, and play the target animation based on the second image element in the target display object.
In some embodiments, the rendering unit is further configured to perform rendering based on the attribute description file to play the target animation in the target display object in the absence of the first image element.
In some embodiments, the element replacement instruction is triggered by a display instruction of the target display object.
In some embodiments, the target display object is a resource release prompt box, where the resource release prompt box is used to release virtual resources; or, the target display object is a function control.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
A processor;
A memory for storing the processor-executable instructions;
Wherein the processor is configured to execute the instructions to implement the animation playing method according to any one of the first aspect and the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the animation playing method according to any one of the above-described first aspect and the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the animation playing method according to any one of the above-mentioned first aspect and the first aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
Fig. 1 is a flowchart illustrating an animation playing method according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating an animation playing method according to an exemplary embodiment.
Fig. 3 is a schematic diagram of a second image element shown according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating an implementation of a video playback method according to an exemplary embodiment.
Fig. 5 is a schematic diagram showing a picture element to be displayed according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating an animation playing apparatus according to an exemplary embodiment.
Fig. 7 is a block diagram of an electronic device 700, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
In addition, the data and information related to the present disclosure are data and information authorized by the user or sufficiently authorized by each party.
The scheme provided by the disclosure can be applied to animation scenes. In the animation scene, lottie is used as a set of cross-platform complete animation effect solution, and an animation designed by an animation designer by using AE (Adobe AFTER EFFECTS, video editing software) can be exported as a file in Json (Java Script Object Notation, JS object numbered musical notation) format, so that the exported file can be directly called on various operating systems, platforms or frames, and further, animation playing is realized. That is, in the animation production process, after the animation designer designs the animation through AE, through Bodymovin plug-ins (AE animation export plug-ins) in AE software, export the target animation designed by himself into an attribute description file in Json format, and then send the exported attribute description file to a developer, the developer receives the attribute description file through electronic equipment, and Lottie is installed and operated on the electronic equipment of the developer, so that the electronic equipment can directly play the target animation corresponding to the attribute description file based on the attribute description file through Lottie.
Fig. 1 is a flowchart illustrating an animation playing method according to an exemplary embodiment, which includes the following steps, as shown in fig. 1.
In step S101, the electronic device determines a first image element to be displayed in the target display object in response to an element replacement instruction for instructing replacement of the first image element.
In step S102, the electronic device acquires layout information for indicating a layout of the second image element to be generated in the target display object and service information for indicating service data included in the second image element.
In step S103, the electronic device generates a second image element based on the layout information and the service information, and replaces the first image element with the second image element.
In step S104, the electronic device performs rendering based on the attribute description file of the target animation and the second image element, so as to play the target animation in the target display object, where the attribute description file includes attribute information corresponding to an animation effect included in the target animation.
According to the scheme provided by the embodiment of the disclosure, when the element replacement instruction is received, the first image element to be replaced in the target display object is determined, so that layout information for indicating the layout of the second image element to be generated in the target display object and business information for indicating business data to be included in the second image element are obtained, and further, the second image element for replacing the first image element is generated based on the layout information and the business information, so that the animation rendering is realized based on the second image element and the attribute description file of the target animation, the target animation which can be played in the target display object is obtained, a developer does not need to write codes manually, the man-machine interaction efficiency is improved, and the animation manufacturing efficiency is further improved.
In some embodiments, generating the second image element based on the layout information and the traffic information includes:
Determining a layout of the second image element to be generated in the target display object based on the layout information;
And adding the business data indicated by the business information into the layout of the second image element to be generated to obtain the second image element.
In some embodiments, rendering based on the attribute description file of the target animation and the second image element to play the target animation in the target display object comprises:
Rendering the second image element based on the attribute description file of the target animation to play the target animation based on the second image element in the target display object.
In some embodiments, the method further comprises:
Rendering based on the attribute description file to play the target animation in the target display object without the first image element.
In some embodiments, the element replacement instruction is triggered by a display instruction of the target display object.
In some embodiments, the target display object is a resource release prompt box, where the resource release prompt box is used to release virtual resources; or, the target display object is a function control.
The process shown in fig. 1 is merely a basic flow of the disclosure, and a solution provided by the disclosure is further described below based on a specific implementation process. Fig. 2 is a flowchart illustrating an animation playing method according to an exemplary embodiment, which includes the following steps, as shown in fig. 2.
In step S201, the electronic device determines a first image element to be displayed in the target display object in response to an element replacement instruction for instructing replacement of the first image element.
The element replacement instruction is triggered by a display instruction of the target display object. In some embodiments, the electronic device obtains the attribute description file of the target animation, and after obtaining the attribute description file, the electronic device can trigger a display instruction for the target display object based on the attribute description file through Lottie software running on the electronic device, thereby triggering the element replacement instruction. The attribute description file is a Json file, and the attribute description file includes attribute information corresponding to an animation effect included in the target animation.
The process of the electronic device obtaining the attribute description file of the target animation comprises the following steps: after the animation designer derives the attribute description file through Bodymovin plug-in of AE software, the attribute description file is stored in the electronic device used by the animation designer, so that the animation designer sends the attribute description file to the electronic device used by the developer through the electronic device, and the electronic device used by the developer obtains the attribute description file.
After the attribute description file is obtained, the electronic equipment can trigger a playing instruction of the target animation through Lottie software, wherein the playing instruction of the target animation is used for indicating the electronic equipment to play the target animation based on the attribute description file, and the playing instruction of the target animation triggers a display instruction of a target display object, so that the element replacement instruction is triggered.
When the display instruction of the target display object is triggered, the element replacement instruction is triggered, so that the electronic equipment can automatically replace the first image element to be replaced in response to the element replacement instruction, further, the rendering of the target animation related to the business data is realized, manual operation of a developer is not needed, the man-machine interaction efficiency is improved, and the automation of the animation production process is realized.
In some embodiments, the electronic device responds to the element replacement instruction, and invokes an element filtering function, through which it is determined whether the image element to be displayed in the target display object is the first image element to be replaced, and further when the image element to be displayed in the target display object is the first image element to be replaced, the following steps S202 to S205 are performed.
The element screening function is Bitmap fetchBitmap (LottieImageAsset asset) for providing an element replacement entry by which a first image element to be replaced can be determined based on an element identification.
That is, the electronic device calls the element filtering function in response to the element replacement instruction, determines whether the element identifier of the image element to be displayed currently is consistent with the element identifier of the first image element to be replaced based on the element identifier of the image element to be displayed currently, and determines that the image element to be displayed currently is the first image element to be replaced if the element identifier of the image element to be displayed currently is consistent with the element identifier of the first image element to be replaced. And the like to determine each first image element to be replaced from a plurality of image elements corresponding to the target animation.
Wherein the first image element is a placeholder, or the first image element is of another type, embodiments of the disclosure are not limited in this regard. The target display object is a resource issuing prompt box, and the resource issuing prompt box is used for issuing virtual resources; or the target display object is a functional control; or the target display object is another type of object, as embodiments of the present disclosure are not limited in this regard.
For example, the resource release prompt box is a red packet popup window, the function control is a function button, or the resource release prompt box and the function control are of other types, which is not limited in the embodiments of the present disclosure.
By providing two possible target display objects to realize the display of target animation in the two target display objects through the scheme provided by the disclosure, the diversity of the display positions of the target animation is improved.
In step S202, the electronic device acquires layout information for indicating the layout of the second image element to be generated in the target display object and service information for indicating service data included in the second image element.
The layout of the second image element in the target display object is that part of the second image element which does not change with the change of the service data. The layout information includes display positions of respective areas in the target display object, display forms of the respective areas, and the like.
For example, referring to fig. 3, fig. 3 is a schematic diagram of a second image element shown in accordance with an exemplary embodiment, in the interface shown in fig. 3, the positions of the region 301, the region 302, and the region 303, and the display forms of the three icons displayed in the region 302 (i.e., the gold coin icon 3021, the praise icon 3022, and the lover icon 3023), and the text displayed in the region 303 are all portions that do not change with changes in business data, so that the electronic device can directly acquire layout information, and thus can determine the positions of the region 301, the region 302, and the region 303, and the display forms of the three icons displayed in the region 302, and the text displayed in the region 303, based on the acquired layout information.
In the second image element shown in fig. 3, the coupon amount, the available condition, the available range, and the expiration date displayed in the area 301, and the number of gold coins in the upper right corner of the gold coin icon 3021, the praise number in the upper right corner of the praise icon 3022, and the love number in the upper right corner of the love icon 3023 in the area 302 are all business data, and the business data changes with the change of the registered account number on the electronic device.
In step S203, the electronic device generates a second image element based on the layout information and the service information.
In some embodiments, the electronic device determines a layout of the second image element to be generated in the target display object based on the layout information; and further adding the business data indicated by the business information into the layout of the second image element to be generated to obtain the second image element. Wherein the second image element is a static map, or the second image element is of another type, embodiments of the present disclosure are not limited in this regard.
Still taking the second image element shown in fig. 3 as an example, after obtaining the corresponding layout information and service data in the above step S202, the electronic device adds the obtained coupon amount, the available condition, the available range and the validity period to the corresponding position in the area 301, adds the obtained gold coin number to the upper right corner of the gold coin icon 3021, adds the obtained praise number to the upper right corner of the praise icon 3022, and adds the obtained love number to the upper right corner of the love icon 3023, thereby realizing the generation of the second image element.
The layout of the second image element to be generated in the target display object is determined based on the layout information, so that the part of the second image element to be generated, which is not changed along with the change of the service data, is determined, the service data indicated by the service information is further added to the layout to obtain the complete second image element, and the automatic generation of the second image element is realized, so that when the service data is changed, a developer does not need to write codes to generate the second image element corresponding to the corresponding service data, the man-machine interaction efficiency is improved, the generation efficiency of the second image element is improved, and the animation production efficiency is further improved.
Wherein, the above step S202 and step S203 are implemented by a first element acquisition function, which is used to generate a second image element related to the service data. In some embodiments, the electronic device invokes the first element acquisition function, through which the acquisition of layout information and service data can be achieved, so as to acquire the second image element generated by fusing the service data.
In step S204, the electronic device replaces the first image element with the second image element.
In step S205, the electronic device renders the second image element based on the attribute description file of the target animation, so as to play the target animation based on the second image element in the target display object, where the attribute description file includes attribute information corresponding to an animation effect included in the target animation.
After the first image element is replaced by the second image element, the second image element is rendered based on the attribute description file of the target animation, so that the second image element is rendered, further, the target animation can be played in the target display object, manual operation of a developer is not needed, the man-machine interaction efficiency is improved, and the animation playing efficiency is improved.
In some embodiments, the electronic device invokes an animation play function, and plays the target animation based on the property profile via the animation play function.
Wherein, the animation playing function is LottieAnimationView.
Referring to fig. 4, fig. 4 is a flowchart illustrating an implementation of a video playing method according to an exemplary embodiment, after an animation designer designs an animation, derives an attribute description file through a Bodymovin plug-in, and an electronic device obtains layout information and service data of a second image element to be displayed according to a scheme provided by the present disclosure, further generates the second image element based on the obtained layout information and service data, and replaces the first image element with the second image element, thereby playing a target animation based on the second image element and the attribute description file.
The above steps S201 to S205 are descriptions of the process when the electronic device renders the target animation in the case where the image element to be displayed in the target display object is the first image element to be replaced, and in other embodiments, the electronic device renders the target animation based on the attribute description file in the case where the first image element is not present, so as to play the target animation in the target display object.
That is, under the condition that the first image element to be replaced does not exist, the electronic device directly acquires the image element to be displayed, and further renders the image element to be displayed based on the attribute description file, so that the playing of the target animation is realized, that is, the playing of the target animation can be realized without replacing the image element.
The process of acquiring the image element to be displayed under the condition that the first image element to be replaced does not exist is realized through a second element acquisition function, and the second element acquisition function is used for acquiring the image element to be displayed. In some embodiments, the electronic device invokes the second element acquisition function, and further passes through the second element acquisition function, to acquire the image element to be displayed. Wherein the second element acquisition function is Bitmap getBitmap (LottieImageAsset asset).
Under the condition that a first image element to be replaced does not exist, corresponding image elements are rendered directly based on the attribute description file, so that playing of target animation in a target display object is achieved, manual operation of a developer is not needed, man-machine interaction efficiency is improved, animation production efficiency is improved, and animation playing efficiency can be improved.
According to the scheme provided by the embodiment of the disclosure, when the element replacement instruction is received, the first image element to be replaced in the target display object is determined, so that layout information for indicating the layout of the second image element to be generated in the target display object and business information for indicating business data to be included in the second image element are obtained, and further, the second image element for replacing the first image element is generated based on the layout information and the business information, so that the animation rendering is realized based on the second image element and the attribute description file of the target animation, the target animation which can be played in the target display object is obtained, a developer does not need to write codes manually, the man-machine interaction efficiency is improved, and the animation manufacturing efficiency is further improved.
In addition, the target animation produced by the scheme provided by the embodiment of the present disclosure is basically consistent with the animation designed by the animation designer through AE, that is, the scheme provided by the embodiment of the present disclosure can greatly improve the animation restoration degree. And animation designer can derive the attribute description file of the goal animation designed through Bodymovin plug-in components after finishing the animation design through AE software, and then through the scheme that the embodiment of this disclosure provided, carry out the preparation and the broadcast of goal animation automatically, the whole process does not involve the manual process of writing the code of developer, realized the low-grade code of animation preparation, improved development efficiency, compared with the manual scheme of writing the code in order to realize goal animation broadcast, the scheme that the embodiment of this disclosure provided has improved more than 95% on development efficiency. Moreover, the process of manually writing codes by a developer is not involved in the animation production process, and the developer is not required to modify the codes in the follow-up process to modify the display effect of the target animation, so that the labor cost is saved.
In the following, the effect of the present disclosure will be further described with reference to an actual display example, referring to fig. 5, fig. 5 is a schematic diagram of an image element to be displayed according to an exemplary embodiment, when a target animation is displayed based on the image element shown in fig. 5, if Lottie is used, the electronic device can display a special effect of opening a red packet based on the image element shown in fig. 5, further, after the special effect of opening a red packet is displayed, the image element shown in fig. 5 is displayed again, and in combination with the scheme provided by the present disclosure, the electronic device can obtain the layout information and the service data shown in fig. 3 by itself, and further generate a second image element shown in fig. 3 based on the obtained layout information and the service data, so that after the special effect of opening a red packet is displayed, the second image element shown in fig. 3 is displayed, so as to achieve fusion of Lottie and the service data.
By combining the layout information with the service data to generate a second image element, and further replacing the first image element with the second image element, the service data to be displayed is fused into Lottie software, the capability expansion of Lottie software is realized, the animation related to the service data can be realized through Lottie in combination with the scheme provided by the disclosure, the automation of the animation process related to the service data is realized, and a developer does not need to manually write codes to realize animation according to actual service data each time.
Fig. 6 is a block diagram illustrating an animation playing apparatus according to an exemplary embodiment. Referring to fig. 6, the apparatus includes:
a determining unit 601 configured to execute a determination of a first image element to be displayed in a target display object in response to an element replacement instruction for instructing replacement of the first image element;
An acquisition unit 602 configured to perform acquisition of layout information for indicating a layout of a second image element to be generated in the target display object and service information for indicating service data included in the second image element;
A generating unit 603 configured to perform generation of a second image element based on the layout information and the service information;
a replacement unit 604 configured to perform replacement of the first image element with the second image element;
And a rendering unit 605 configured to perform rendering based on a property description file of the target animation and the second image element to play the target animation in the target display object, the property description file including property information corresponding to an animation effect included in the target animation.
According to the device provided by the embodiment of the disclosure, when the element replacement instruction is received, the first image element to be replaced in the target display object is determined, so that layout information for indicating the layout of the second image element to be generated in the target display object and business information for indicating business data to be included in the second image element are obtained, and further, the second image element for replacing the first image element is generated based on the layout information and the business information, so that the rendering is performed based on the second image element and the attribute description file of the target animation, the animation rendering is realized, the target animation capable of being played in the target display object is obtained, a developer does not need to write codes manually, the man-machine interaction efficiency is improved, and the animation manufacturing efficiency is further improved.
In some embodiments, the generating unit 603 is configured to perform determining a layout of the second image element to be generated in the target display object based on the layout information; and adding the business data indicated by the business information into the layout of the second image element to be generated to obtain the second image element.
In some embodiments, the rendering unit 605 is configured to execute a property description file based on the target animation, render the second image element, and play the target animation based on the second image element in the target display object.
In some embodiments, the rendering unit 605 is further configured to perform rendering based on the attribute description file to play the target animation in the target display object in the absence of the first image element.
In some embodiments, the element replacement instruction is triggered by a display instruction of the target display object.
In some embodiments, the target display object is a resource release prompt box, where the resource release prompt box is used to release virtual resources; or, the target display object is a function control.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 7 is a block diagram of an electronic device 700, according to an example embodiment. The electronic device 700 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Electronic device 700 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, and the like.
In general, the electronic device 700 includes: one or more processors 701, and one or more memories 702.
Processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 701 may be implemented in at least one hardware form of DSP (DIGITAL SIGNAL Processing), FPGA (Field-Programmable gate array), PLA (Programmable Logic Array ). The processor 701 may also include a main processor and a coprocessor, wherein the main processor is a processor for processing data in an awake state, and is also called a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 701 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 701 may also include an AI (ARTIFICIAL INTELLIGENCE ) processor for processing computing operations related to machine learning.
Memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 702 is used to store at least one program code for execution by processor 701 to implement the animation playback method provided by the method embodiments of the present disclosure.
In some embodiments, the electronic device 700 may further optionally include: a peripheral interface 703 and at least one peripheral. The processor 701, the memory 702, and the peripheral interface 703 may be connected by a bus or signal lines. The individual peripheral devices may be connected to the peripheral device interface 703 via buses, signal lines or a circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 704, a display 705, a camera 706, audio circuitry 707, a positioning component 708, and a power supply 709.
A peripheral interface 703 may be used to connect I/O (Input/Output) related at least one peripheral device to the processor 701 and memory 702. In some embodiments, the processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 701, the memory 702, and the peripheral interface 703 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 704 is configured to receive and transmit RF (Radio Frequency) signals, also referred to as electromagnetic signals. The radio frequency circuitry 704 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 704 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 704 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 704 may communicate with other electronic devices via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (WIRELESS FIDELITY )) networks. In some embodiments, the radio frequency circuitry 704 may also include NFC (NEAR FIELD Communication) related circuitry, which is not limited by the present disclosure.
The display screen 705 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 705 is a touch display, the display 705 also has the ability to collect touch signals at or above the surface of the display 705. The touch signal may be input to the processor 701 as a control signal for processing. At this time, the display 705 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 705 may be one, providing a front panel of the electronic device 700; in other embodiments, the display 705 may be at least two, respectively disposed on different surfaces of the electronic device 700 or in a folded design; in still other embodiments, the display 705 may be a flexible display disposed on a curved surface or a folded surface of the electronic device 700. Even more, the display 705 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The display 705 may be made of LCD (Liquid CRYSTAL DISPLAY), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 706 is used to capture images or video. Optionally, the camera assembly 706 includes a front camera and a rear camera. In general, a front camera is disposed on a front panel of an electronic device, and a rear camera is disposed on a rear surface of the electronic device. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 706 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 707 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 701 for processing, or inputting the electric signals to the radio frequency circuit 704 for voice communication. For purposes of stereo acquisition or noise reduction, the microphone may be multiple, and disposed at different locations of the electronic device 700. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 701 or the radio frequency circuit 704 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 707 may also include a headphone jack.
The location component 708 is operative to locate a current geographic location of the electronic device 700 for navigation or LBS (Location Based Service, location-based services). The positioning component 708 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, the Granati system of Russia, or the Galileo system of the European Union.
The power supply 709 is used to power the various components in the electronic device 700. The power supply 709 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 709 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the electronic device 700 further includes one or more sensors 710. The one or more sensors 710 include, but are not limited to: acceleration sensor 711, gyroscope sensor 712, pressure sensor 713, fingerprint sensor 714, optical sensor 715, and proximity sensor 716.
The acceleration sensor 711 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the electronic device 700. For example, the acceleration sensor 711 may be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 701 may control the display screen 705 to display a user interface in a landscape view or a portrait view based on the gravitational acceleration signal acquired by the acceleration sensor 711. The acceleration sensor 711 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 712 may detect a body direction and a rotation angle of the electronic device 700, and the gyro sensor 712 may collect a 3D motion of the user on the electronic device 700 in cooperation with the acceleration sensor 711. The processor 701 may implement the following functions based on the data collected by the gyro sensor 712: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 713 may be disposed at a side frame of the electronic device 700 and/or at an underlying layer of the display screen 705. When the pressure sensor 713 is disposed at a side frame of the electronic device 700, a grip signal of the user on the electronic device 700 may be detected, and the processor 701 performs left-right hand recognition or quick operation according to the grip signal collected by the pressure sensor 713. When the pressure sensor 713 is disposed at the lower layer of the display screen 705, the processor 701 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 705. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 714 is used to collect a fingerprint of the user, and the processor 701 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the identity of the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 701 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 714 may be provided on the front, back, or side of the electronic device 700. When a physical key or vendor Logo is provided on the electronic device 700, the fingerprint sensor 714 may be integrated with the physical key or vendor Logo.
The optical sensor 715 is used to collect the ambient light intensity. In one embodiment, the processor 701 may control the display brightness of the display screen 705 based on the ambient light intensity collected by the optical sensor 715. Specifically, when the intensity of the ambient light is high, the display brightness of the display screen 705 is turned up; when the ambient light intensity is low, the display brightness of the display screen 705 is turned down. In another embodiment, the processor 701 may also dynamically adjust the shooting parameters of the camera assembly 706 based on the ambient light intensity collected by the optical sensor 715.
A proximity sensor 716, also referred to as a distance sensor, is typically provided on the front panel of the electronic device 700. The proximity sensor 716 is used to capture the distance between the user and the front of the electronic device 700. In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front of the electronic device 700 gradually decreases, the processor 701 controls the display 705 to switch from the bright screen state to the off screen state; when the proximity sensor 716 detects that the distance between the user and the front surface of the electronic device 700 gradually increases, the processor 701 controls the display screen 705 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 7 is not limiting of the electronic device 700 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
In an exemplary embodiment, a computer readable storage medium is also provided, such as a memory 702, comprising instructions executable by the processor 701 of the electronic device 700 to perform the above-described animation playback method. Alternatively, the computer readable storage medium is a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Read-Only optical disk (Compact Disc Read-Only Memory, CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, or the like.
In an exemplary embodiment, a computer program product is also provided, comprising a computer program code that is executed by a processor of an electronic device to implement the above-described animation playback method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (13)

1. An animation playing method, characterized in that the method comprises the following steps:
determining a first image element to be displayed in a target display object in response to an element replacement instruction, wherein the element replacement instruction is used for indicating the replacement of the first image element, and the element replacement instruction is automatically triggered by a play instruction of a target animation;
Acquiring layout information and service information, wherein the layout information is used for indicating the layout of a second image element to be generated in the target display object, the service information is used for indicating service data included in the second image element, the layout is a part of the second image element which does not change along with the change of the service data, and the service data changes along with the change of a login account on electronic equipment;
Determining the layout of the second image element to be generated in the target display object based on the layout information; adding the business data indicated by the business information into the layout of the second image element to be generated, generating the second image element, and replacing the first image element with the second image element;
Rendering is performed based on the attribute description file of the target animation and the second image element so as to play the target animation in the target display object, wherein the attribute description file comprises attribute information corresponding to an animation effect included in the target animation.
2. The method of claim 1, wherein the rendering based on the property profile of the target animation and the second image element to play the target animation in the target display object comprises:
Rendering the second image element based on the attribute description file of the target animation so as to play the target animation based on the second image element in the target display object.
3. The method according to claim 1, wherein the method further comprises:
Rendering based on the attribute description file to play the target animation in the target display object without the first image element.
4. The method of claim 1, wherein the element replacement instruction is triggered by a display instruction of the target display object.
5. The method of claim 1, wherein the target display object is a resource issuance hint box, the resource issuance box configured to issue virtual resources; or, the target display object is a function control.
6. An animation playback apparatus, characterized in that the apparatus comprises:
A determining unit configured to execute a first image element to be displayed in a target display object in response to an element replacement instruction for instructing replacement of the first image element, the element replacement instruction being automatically triggered by a play instruction for a target animation;
An acquisition unit configured to perform acquisition of layout information for indicating a layout of a second image element to be generated in the target display object, and service information for indicating service data included in the second image element, the layout being a portion of the second image element that does not change with a change in service data that changes with a change in a registered account number on an electronic device;
a generating unit configured to perform determination of a layout of a second image element to be generated in the target display object based on the layout information; adding the business data indicated by the business information into the layout of the second image element to be generated to generate the second image element;
a replacement unit configured to perform replacement of the first image element with the second image element;
and a rendering unit configured to perform rendering based on the attribute description file of the target animation and the second image element, so as to play the target animation in the target display object, wherein the attribute description file comprises attribute information corresponding to an animation effect included in the target animation.
7. The apparatus according to claim 6, wherein the rendering unit is configured to perform rendering of the second image element based on the attribute description file of the target animation to play the target animation based on the second image element in the target display object.
8. The apparatus of claim 6, wherein the rendering unit is further configured to perform rendering based on the attribute description file to play the target animation in the target display object in the absence of the first image element.
9. The apparatus of claim 6, wherein the element replacement instruction is triggered by a display instruction of the target display object.
10. The apparatus of claim 6, wherein the target display object is a resource issuance hint box, the resource issuance box configured to issue virtual resources; or, the target display object is a function control.
11. An electronic device, comprising:
A processor;
A memory for storing the processor-executable instructions;
Wherein the processor is configured to execute the instructions to implement the animation playback method of any one of claims 1 to 5.
12. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the animation playback method of any one of claims 1 to 5.
13. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the animation playback method of any one of claims 1 to 5.
CN202110836317.9A 2021-07-23 2021-07-23 Animation playing method and device, electronic equipment and computer readable storage medium Active CN113538633B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110836317.9A CN113538633B (en) 2021-07-23 2021-07-23 Animation playing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110836317.9A CN113538633B (en) 2021-07-23 2021-07-23 Animation playing method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113538633A CN113538633A (en) 2021-10-22
CN113538633B true CN113538633B (en) 2024-05-14

Family

ID=78120680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110836317.9A Active CN113538633B (en) 2021-07-23 2021-07-23 Animation playing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113538633B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115272536A (en) * 2022-09-26 2022-11-01 深圳乐娱游网络科技有限公司 Animation playing method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003102720A2 (en) * 2002-05-31 2003-12-11 Isioux B.V. Method and system for producing an animation
CN110708596A (en) * 2019-09-29 2020-01-17 北京达佳互联信息技术有限公司 Method and device for generating video, electronic equipment and readable storage medium
CN112052416A (en) * 2020-08-26 2020-12-08 腾讯科技(上海)有限公司 Method and device for displaying image elements
CN112135161A (en) * 2020-09-25 2020-12-25 广州华多网络科技有限公司 Dynamic effect display method and device of virtual gift, storage medium and electronic equipment
CN112308947A (en) * 2019-07-25 2021-02-02 腾讯科技(深圳)有限公司 Animation generation method and device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003102720A2 (en) * 2002-05-31 2003-12-11 Isioux B.V. Method and system for producing an animation
CN112308947A (en) * 2019-07-25 2021-02-02 腾讯科技(深圳)有限公司 Animation generation method and device and storage medium
CN110708596A (en) * 2019-09-29 2020-01-17 北京达佳互联信息技术有限公司 Method and device for generating video, electronic equipment and readable storage medium
CN112052416A (en) * 2020-08-26 2020-12-08 腾讯科技(上海)有限公司 Method and device for displaying image elements
CN112135161A (en) * 2020-09-25 2020-12-25 广州华多网络科技有限公司 Dynamic effect display method and device of virtual gift, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113538633A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN110971930B (en) Live virtual image broadcasting method, device, terminal and storage medium
CN109874312B (en) Method and device for playing audio data
CN109327608B (en) Song sharing method, terminal, server and system
CN108897597B (en) Method and device for guiding configuration of live broadcast template
CN109144346B (en) Song sharing method and device and storage medium
CN110740340B (en) Video live broadcast method and device and storage medium
CN109922356B (en) Video recommendation method and device and computer-readable storage medium
CN113409427B (en) Animation playing method and device, electronic equipment and computer readable storage medium
CN108717365B (en) Method and device for executing function in application program
CN108900925B (en) Method and device for setting live broadcast template
CN110288689B (en) Method and device for rendering electronic map
CN110750734A (en) Weather display method and device, computer equipment and computer-readable storage medium
CN111880888A (en) Preview cover generation method and device, electronic equipment and storage medium
CN111083526B (en) Video transition method and device, computer equipment and storage medium
CN112257006A (en) Page information configuration method, device, equipment and computer readable storage medium
CN111437600A (en) Plot showing method, plot showing device, plot showing equipment and storage medium
CN109660876B (en) Method and device for displaying list
CN111083554A (en) Method and device for displaying live gift
CN113204672B (en) Resource display method, device, computer equipment and medium
CN113032590B (en) Special effect display method, device, computer equipment and computer readable storage medium
CN113538633B (en) Animation playing method and device, electronic equipment and computer readable storage medium
CN112118482A (en) Audio file playing method and device, terminal and storage medium
CN108966026B (en) Method and device for making video file
CN112637624B (en) Live stream processing method, device, equipment and storage medium
CN113485596B (en) Virtual model processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant