WO2023040670A1 - Method for displaying dynamic effect on desktop, and electronic device - Google Patents

Method for displaying dynamic effect on desktop, and electronic device Download PDF

Info

Publication number
WO2023040670A1
WO2023040670A1 PCT/CN2022/116535 CN2022116535W WO2023040670A1 WO 2023040670 A1 WO2023040670 A1 WO 2023040670A1 CN 2022116535 W CN2022116535 W CN 2022116535W WO 2023040670 A1 WO2023040670 A1 WO 2023040670A1
Authority
WO
WIPO (PCT)
Prior art keywords
effect
dynamic effect
animation
desktop
dynamic
Prior art date
Application number
PCT/CN2022/116535
Other languages
French (fr)
Chinese (zh)
Inventor
吴紫康
周雨沛
张云逸
刘磊
马良川
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023040670A1 publication Critical patent/WO2023040670A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • 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

Definitions

  • the embodiments of the present application relate to the technical field of terminals, and in particular, to a desktop dynamic display method and an electronic device.
  • the desktop display content of electronic devices (such as mobile phones, tablets, etc.) is becoming more and more abundant.
  • users can quickly obtain relevant application information, and can increase the interest of the desktop display of electronic devices. sex.
  • the mobile phone displays application program icons, and digital prompt information is displayed around the application icon, and the user can quickly learn application-related information through the digital prompt information.
  • the number prompt information displayed on the email application icon 11 is 3, which is used to indicate that the number of emails to be processed is 3.
  • the number prompt information displayed on the application store icon 12 is 5, which is used to indicate that the number of applications to be updated is 5.
  • the content expressed by the digital prompt information is limited.
  • the mobile phone provides some functions of the application by displaying a card.
  • the weather card 13 displayed on the interface 102 quickly provides users with real-time weather information.
  • time information can be quickly provided to the user.
  • the card can only display part of the application information in the area where the card is located, and the expressed content is also limited.
  • the embodiments of the present application provide a desktop dynamic effect display method and an electronic device.
  • the electronic device can play the dynamic effect of the first desktop element in the area other than the display area used to display the first desktop element on the desktop, enrich the content of the desktop expression, and improve the user experience.
  • a method for displaying a desktop with dynamic effects is provided, which is applied to an electronic device.
  • the method includes: displaying a desktop, the desktop including a first desktop element. Determine to play the first motion effect of the first desktop element.
  • the first motion effect is played on the first area of the desktop, and the first area includes the area other than the area occupied by the first desktop element.
  • the electronic device displays a desktop
  • the desktop includes desktop elements such as application icons, cards, folders, status bars, and the like.
  • the first desktop element playing the first dynamic effect may be a card or an icon corresponding to the first desktop element included in the desktop element.
  • the electronic device can display the dynamic effect of the first desktop element on the desktop, and the dynamic effect of the first desktop element can be displayed in an area other than the display area of the first desktop element. This can enrich the expression content and provide users with a better dynamic experience.
  • the method before determining to play the first dynamic effect, further includes: determining a dynamic playback environment that plays the first dynamic effect; the dynamic playback environment includes that the first content and/or the second content do not exist on the desktop, The first content is the content that affects the playback effect of the first animation, and the second content is the content whose display effect will be affected by the playback of the first animation.
  • the first content or the second content may be a dynamic effect being played on the desktop, or a desktop element such as a floating window.
  • first determine the animation playback environment of the desktop so as to ensure that it will not be affected by the animation effect or other content displayed on the desktop during the playback of the first animation effect, nor will it be affected
  • the playback of the dynamic effect being played on the desktop may affect other content displayed on the desktop, so as to ensure the playback effect of the desktop dynamic effect.
  • the second area displaying the first content intersects with the first key area in the first area, and the first area intersects with the third area displaying the second content The second critical region of .
  • the key area may be a touch area where the user can interact with the dynamic effect.
  • all display areas may be key areas, or there may be no key areas.
  • the play area of motion effect A is a, and the key area is a1; the play area of motion effect B is b, and the key area is b1.
  • the animation module determines that animation B needs to be played.
  • the dynamic effect module determines that the playback area b does not affect the key area a1, and the playback area a does not affect the key area b1, then the dynamic effect module can play the animation effect B during the playback of the animation effect A.
  • the first content or the second content is the content displayed in the floating window or the dynamic content played on the desktop.
  • the desktop further includes a second desktop element
  • the method further includes: acquiring a requirement for playing a second motion effect of the second desktop element. If there is no dynamic playback environment for playing the second dynamic effect, the electronic device does not play the second dynamic effect, or delays playing the second dynamic effect when it is determined that the second dynamic effect is delayed until it is played in a dynamic playback environment with the second dynamic effect. Motion.
  • the electronic device may determine to acquire a need to play the second motion effect of the second desktop element. Or, the electronic device obtains the dynamic effect event at the head of the dynamic effect playing queue, and determines that the dynamic effect event is the dynamic effect event corresponding to the dynamic effect of the second desktop element, then the electronic device can determine that the second desktop element is played The need for the second animation effect of the element. Afterwards, the electronic device can determine whether there is a playing environment for playing the dynamic effect of the second desktop element, so as to determine whether the dynamic effect can be played. If it is determined that the second animation effect cannot be played temporarily, it can be determined whether the second animation effect has a time limit requirement. For example, the second animation effect has a time limit requirement.
  • Playing the animation effect beyond the time limit does not have the meaning of reminding the user, so the second animation effect can no longer be played.
  • the second motion effect does not have a time limit requirement, or the time limit required by the time limit has not yet been reached, and the playback can be delayed.
  • the application corresponding to the second desktop element may determine whether the second motion effect has a time limit requirement, or the motion effect module may determine whether the second motion effect has a time limit requirement.
  • the desktop further includes a third desktop element
  • the method further includes: determining that the first motion effect and the third desktop element are pre-configured with a linkage motion effect.
  • the third motion effect of the third desktop element is played in the fourth area of the desktop.
  • the fourth area includes an area other than the area occupied by the third desktop element.
  • the developer can configure whether the animation of the application can be linked with other applications, and whether it needs to be linked with the hardware functions of the electronic device. For example, if other applications can be linked, you can determine the linkage animation playback effect with the developer of the application that can be linked in advance, configure the corresponding linkage animation in the linkage application, and configure the linkage in this application Animation instructions. Then, in the process of requesting to play the animation effect, the application program can send a motion effect request carrying a linkage animation indication to the animation module, and the linkage indication includes the identification (such as the application ID) of the application program that needs linkage.
  • the motion effect module After the motion effect module receives the motion effect request, it can determine the identifier according to the linkage instruction therein, and then forward the linkage motion effect instruction to the corresponding application program according to the identifier. Then the application program that needs linkage sends a linkage animation request to the animation module according to the linkage animation indication, so as to realize the linkage animation playback. For another example, if the hardware function of the linked electronic device is required, the developer configures the required hardware in the application animation. Then, during the subsequent animation request process, the animation module can know which hardware functions are required for the requested animation, and can request the launcher to call hardware functions, such as requesting the audio module to play the animation sound. Wherein, the number of linked application programs may be one or more.
  • the method before determining to play the dynamic effect of the first desktop element, the method further includes: determining that the first application corresponding to the first desktop element has the permission to play the dynamic effect.
  • the application program needs to obtain the permission to play the animation effect of the electronic device, and the animation effect module can play the animation effect after determining that the application program has the permission to play the animation effect. For example, after receiving the motion effect request sent by the application program, the motion effect module determines that the application program does not have the permission to play the motion effect, and then displays a prompt message for prompting the user to confirm whether to allow the application program to play the motion effect. If the user allows it, the permission to play the dynamic effect is obtained (that is, authorized by the user), and the permission to play the dynamic effect can also be saved. For another example, the electronic device provides a dynamic effect playback permission setting entry in the setting application, allowing the user to set the dynamic effect playback permission.
  • an entry for setting the animation playback permission is preset in the application, allowing the user to set the animation playback permission of the application in the application.
  • the animation module receives an animation request, it needs to determine the application animation playback permission to avoid changes in the animation playback permission caused by the user changing the settings, and the saved animation playback permission is consistent with the user's
  • the set animation playback permissions are different, and abnormalities occur, which affect the user experience.
  • the method before playing the first animation effect in the first area of the desktop, the method further includes: acquiring the animation resource information of the first animation effect; the animation resource information includes The storage location of the dynamic resource of the first dynamic effect and/or the information of the dynamic effect layer corresponding to the first dynamic effect; the number of dynamic effect layers is one or more layers, and the dynamic effect resource includes one or more resources, The information of the dynamic effect layer includes the corresponding relationship between one or more layers of the dynamic effect layer and one or more resources; among them, the storage location of the dynamic effect resource is used to obtain the dynamic effect resource, and the information of the dynamic effect layer is used to determine Play the layer for the first animation.
  • the application program when the electronic device is displaying the desktop, the application program detects a trigger event and requests an available dynamic effect layer from the dynamic effect module.
  • the dynamic effect module sends the information of the dynamic effect layer to the application program (for example, the available dynamic effect layer is 3 layers), and the application program selects one of them according to the obtained information of the dynamic effect layer and the selection rules preset by the developer.
  • One or more layers of dynamic effect layers if one of the dynamic effect layers is selected, the information of the selected dynamic effect layer and the storage location of the corresponding dynamic effect resources can be sent to the dynamic effect module.
  • the dynamic effect module obtains the dynamic effect resource stored in the storage location and draws the dynamic effect on the dynamic effect layer selected by the application program, and plays the dynamic effect on the desktop after the drawing is completed.
  • information about available dynamic layers may also be preconfigured in the application. Then, after the application detects the trigger event, it does not need to request the available dynamic layer information from the dynamic effect module.
  • the animation resources of the animation can be stored in different storage locations, or all of them can be stored in the same storage location.
  • the animation effects corresponding to different animation resources can be played on the same or different animation layers.
  • the storage location of the animation resource and the information of the animation layer used for playback can be preconfigured in the application, for example, the developer can preconfigure these information in the application during the development of the application. Then, when the subsequent electronic device determines that it needs to play the dynamic effect, it can obtain the dynamic effect resource according to the pre-configured information, determine the corresponding dynamic effect layer, and realize the dynamic effect playback.
  • the electronic device can automatically play dynamic effects according to the pre-configured information, reduce the difficulty of user operation, and improve user experience.
  • the dynamic effect resource information is the first application corresponding to the first desktop element determined according to the desktop elements and optional layers included in the desktop, and the optional layers include the first One or more dynamic effect layers determined by the application.
  • the motion effect module sends the desktop element to the application program after receiving the motion effect request sent by the application program.
  • the application program determines whether there is an application program that needs linkage installed in the electronic device, and then sends a linkage animation effect instruction to the animation module to play the linkage animation effect after it is determined that the electronic device has the application program that needs linkage installed.
  • the application program can determine the display effect of the dynamic effect according to the desktop elements. If the card requesting the animation determines that there is an application icon displayed nearby, the animation module may be instructed to display the animation on the nearby application icon.
  • application A (corresponding to card A) in the electronic device is configured with a motion effect
  • the motion effect can be linked with application C (corresponding to card C) to jointly display the motion effect.
  • the dynamic effect module receives the dynamic effect request sent by application A, obtains the desktop element information (displayed with card C), and sends the desktop element information to application A.
  • Application A determines that application C is installed on the electronic device according to the desktop element information, then sends the linkage animation indication corresponding to the linkage animation effect and the animation resource information (such as including the storage location of the animation resource) to the animation module, and the animation module
  • the linkage motion effect indication therein is forwarded to application C, and then application C determines whether to display the linkage motion effect.
  • the application C determines to display the linked motion effect, it can send a motion effect request to the motion effect module. Then assume that the linkage effect includes adding emoticons and garlands on card A, changing the display position of card C, and presenting flowers from card C to card A. Then, the dynamic effect module implements dynamic effect playback according to the received dynamic effect resource information sent by application A and the dynamic effect resource information sent by application C.
  • the electronic device can realize different dynamic playback effects according to the display conditions of the desktop elements, so that the dynamic playback effects can better meet user needs and provide users with a better dynamic playback experience.
  • the method further includes: during the process of playing the first motion effect, detecting the user's operation on the first touch area included in the first motion effect, Stop playing the first animation.
  • the method further includes: during the process of playing the first animation effect, detecting the user's operation on the second touch area included in the first animation effect, Play the first animation again.
  • the developer can configure the touch focus at a specific position in the animation.
  • the touch focus is used to indicate the touch area corresponding to the preset animation interaction position.
  • the user can Interact with the animation effect through the touch area, such as instructing to stop playing the animation effect, replay the animation effect, etc.
  • the command meaning corresponding to the touch focus can also be configured.
  • the electronic device detects the user's operation on the touch focus during the process of playing the dynamic effect, it executes the corresponding command.
  • the electronic device detects the user's operation on a position where the touch focus is not configured (that is, an operation on an area other than the touch area), which causes the focus to break through.
  • the focus executes the command corresponding to the desktop control corresponding to the touch position, thereby reducing the interference of motion effects on desktop operations.
  • the electronic device can interact with the user by touching the focus, so as to improve the user's sense of participation and user experience.
  • playing the first motion effect in the first area of the desktop includes: playing the first motion effect with a preset duration in the first area of the desktop.
  • the application program has a preset duration for playing the animation effect
  • the animation module may stop playing the corresponding animation effect after the duration of playing the animation effect satisfies the duration of the animation effect. This prevents resources from taking too long and affecting the playback of subsequent animation effects. Or, occupy the display space of the desktop and affect the display of desktop elements.
  • the electronic device maintains a dynamic effect play queue, and the dynamic effect play queue is used to save the dynamic effect events corresponding to the dynamic effects to be played, and the dynamic effect events include the dynamic effect events to be played One of the identifier of the application corresponding to the animation, the latest play time of the animation to be played, the mark of the animation event corresponding to the linkage animation of the animation to be played, and the animation resource information of the animation to be played or multiple items.
  • the motion effect module after receiving the motion effect request, the motion effect module will confirm the identification of the application corresponding to the motion effect request, and record it in the corresponding motion effect event, so as to facilitate subsequent signal interaction with the application. time, the corresponding application can be confirmed.
  • some animation effects have a time limit requirement, and playing the animation effect beyond the time limit requirement does not have the meaning of reminding the user. Therefore, the animation module can determine whether the corresponding animation effect has a time limit requirement during the process of creating a dynamic effect event, such as Determine the latest play time of the corresponding motion effect to be played.
  • the motion effect module determines that a certain motion effect can be played, the latest play time of the motion effect has exceeded, and it can be determined whether to delay the playback.
  • some animation effects can be played jointly with animation effects of other applications, that is, linkage animation effects can be played. Therefore, when the motion effect module receives a linkage motion effect that includes two or more motion effects, it needs to mark the motion effect events corresponding to these motion effects (that is, add the motion effect corresponding to the motion effect to be played).
  • the subsequent dynamic effect module needs to determine the other dynamic effect when it determines to play one of the dynamic effects Whether the effect can be played, so as to realize the playback linkage effect.
  • the dynamic effect module needs to obtain the dynamic effect resource information of the dynamic effect to be played in advance to realize the dynamic effect playback, so the dynamic effect module can obtain the dynamic effect resource information from the corresponding application during the process of creating the dynamic effect event.
  • the method further includes: moving the motion event corresponding to the first motion effect out of the motion effect play queue .
  • the dynamic effect module maintains a dynamic effect play queue for sorting the dynamic effects to be played.
  • the animation playback process satisfies the producer consumption mode, where the producer is the application program that requests to play animation effects, the buffer area is used to save the animation playback queue, and the consumer is the animation module.
  • the animation module maintains two threads (such as thread 1 and thread 2). Thread 1 is used to generate corresponding animation events according to the animation request sent by the application and put the animation events into the animation playback queue. Thread 2 is used to take out the dynamic effect event from the head of the dynamic effect playback queue to realize the dynamic effect playback.
  • the animation module After the animation module receives the animation request, it generates a corresponding animation event and places it at the end of the animation playback queue (if the animation playback queue is empty, the generated animation event is placed in the animation playback queue at the head of the queue). Afterwards, after the animation effect module receives the animation effect request, it arranges the corresponding animation effect events in the animation effect playback queue in sequence according to the order in which the animation effect request is received. The dynamic effect module determines whether to play the corresponding dynamic effect sequentially, starting from the dynamic effect event at the head of the queue according to the sequence of the dynamic effect events in the dynamic effect playback queue. When it is determined to play a certain motion effect, the motion effect event corresponding to the motion effect may be removed from the motion effect playback queue.
  • the dynamic effect module After the dynamic effect module starts to play a dynamic effect, it can check whether the dynamic effect playback queue is empty. If it is not empty, determine whether the current queue head animation can be played. If it can be played, the queue head animation can be removed and play. That is, each animation module is to determine whether the animation at the head of the queue can be played.
  • the electronic device realizes orderly animation playback by maintaining the animation playback queue, improves animation processing efficiency, and provides users with a better animation playback experience.
  • a desktop dynamic effect display method is provided, which is applied to electronic equipment.
  • a first desktop element corresponding to the first application is displayed on the desktop of the electronic device; the method includes: detecting a trigger event of playing a first motion effect of the first application.
  • the dynamic effect resource information includes the storage location of the dynamic effect resource of the first dynamic effect and/or the information of the dynamic effect layer corresponding to the first dynamic effect; the number of dynamic effect layers is One or more layers, the dynamic effect resource includes one or more resources, and the information of the dynamic effect layer includes the corresponding relationship between one or more layers of dynamic effect layers and one or more resources; the dynamic effect resource information is used to The first animation effect is played in the first area, and the first area includes an area other than the area occupied by the first desktop element.
  • the dynamic effect resource information is determined by the first application corresponding to the first desktop element according to the desktop elements and optional layers included in the desktop, and the optional layers include one or more layers of dynamic effect images determined by the first application layer.
  • the first application has permission to play dynamic effects.
  • the first desktop element includes a card and/or icon of the first application corresponding to the first desktop element.
  • an electronic device in a third aspect, includes: a processor, a memory and a touch screen, the memory, the touch screen and the processor are coupled, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor reads the computer instructions from the memory, the electronic device executes : display the desktop, and the desktop includes the first desktop element. Determine to play the first motion effect of the first desktop element. The first motion effect is played on the first area of the desktop, and the first area includes the area other than the area occupied by the first desktop element.
  • the processor when the processor reads the computer instruction from the memory, it also causes the electronic device to perform the following operations: determine the dynamic playback environment that plays the first dynamic effect; the dynamic playback environment includes that the first content does not exist on the desktop and /or the second content, the first content is the content that affects the playback effect of the first animation effect, and the second content is the content whose display effect will be affected by the playback of the first animation effect.
  • the second area displaying the first content intersects with the first key area in the first area, and the first area intersects with the third area displaying the second content The second critical region of .
  • the first content or the second content is the content displayed in the floating window or the dynamic content played on the desktop.
  • the desktop further includes a second desktop element, and when the processor reads computer instructions from the memory, the electronic device is also made to perform the following operations: acquire and play the second desktop element The demand for the second motion effect. If there is no dynamic playback environment for playing the second dynamic effect, the electronic device does not play the second dynamic effect, or delays playing the second dynamic effect when it is determined that the second dynamic effect is delayed until it is played in a dynamic playback environment with the second dynamic effect. Motion.
  • the desktop further includes a third desktop element, and when the processor reads computer instructions from the memory, the electronic device is also made to perform the following operations: determine the first motion effect and The third desktop element is pre-configured with a linkage motion effect. During the process of playing the first motion effect in the first area, the third motion effect of the third desktop element is played in the fourth area of the desktop.
  • the electronic device when the processor reads the computer instruction from the memory, the electronic device is further made to perform the following operation: determine that the first application corresponding to the first desktop element has a dynamic playback authority.
  • the electronic device when the processor reads the computer instructions from the memory, the electronic device is also made to perform the following operations: obtain the dynamic effect resource information of the first dynamic effect;
  • the information includes the storage location of the animation resource of the first animation and/or the information of the animation layer corresponding to the first animation; the number of animation layers is one or more layers, and the animation resource includes one or more Resource, the information of the dynamic effect layer includes the corresponding relationship between one or more layers of the dynamic effect layer and one or more resources; where the storage location of the dynamic effect resource is used to obtain the dynamic effect resource, and the information of the dynamic effect layer is used for Used to determine the layer to play the first animation.
  • the dynamic effect resource information is the first application corresponding to the first desktop element determined according to the desktop elements and optional layers included in the desktop, and the optional layers include the first One or more dynamic effect layers determined by the application.
  • the electronic device when the processor reads the computer instructions from the memory, the electronic device also causes the electronic device to perform the following operations: During the process of playing the first motion effect, it is detected that the user The operation of the first touch area included in the first motion effect stops playing the first motion effect.
  • the electronic device when the processor reads the computer instructions from the memory, the electronic device also causes the electronic device to perform the following operations: During the process of playing the first motion effect, it is detected that the user The operation of the second touch area included in the first motion effect replays the first motion effect.
  • playing the first motion effect in the first area of the desktop includes: playing the first motion effect with a preset duration in the first area of the desktop.
  • the first desktop element includes a card and/or icon of the first application corresponding to the first desktop element.
  • the electronic device maintains a dynamic effect play queue, and the dynamic effect play queue is used to save the dynamic effect events corresponding to the dynamic effects to be played, and the dynamic effect events include the dynamic effect events to be played One of the identifier of the application corresponding to the animation, the latest play time of the animation to be played, the mark of the animation event corresponding to the linkage animation of the animation to be played, and the animation resource information of the animation to be played or multiple items.
  • the processor when the processor reads the computer instruction from the memory, it also makes the electronic device perform the following operation: move the animation event corresponding to the first animation effect out of the animation playback queue.
  • an electronic device in a fourth aspect, includes: a processor, a memory and a touch screen, the memory, the touch screen and the processor are coupled, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor reads the computer instructions from the memory, the electronic device executes : A trigger event of playing the first motion effect of the first application is detected.
  • the dynamic effect resource information includes the storage location of the dynamic effect resource of the first dynamic effect and/or the information of the dynamic effect layer corresponding to the first dynamic effect; the number of dynamic effect layers is One or more layers, the dynamic effect resource includes one or more resources, and the information of the dynamic effect layer includes the corresponding relationship between one or more layers of dynamic effect layers and one or more resources; the dynamic effect resource information is used to The first animation effect is played in the first area, and the first area includes an area other than the area occupied by the first desktop element.
  • the dynamic effect resource information is determined by the first application corresponding to the first desktop element according to the desktop elements and optional layers included in the desktop, and the optional layers include one or more layers of dynamic effect images determined by the first application layer.
  • the first application has permission to play dynamic effects.
  • the first desktop element includes a card and/or icon of the first application corresponding to the first desktop element.
  • the embodiment of the present application provides an electronic device, which has the function of realizing the desktop dynamic effect display method as described in the above-mentioned first aspect and any possible implementation; or, the electronic device It has the function of realizing the desktop dynamic effect display method described in the above second aspect and any possible implementation manner.
  • This function can be realized by hardware, and can also be realized by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • a computer-readable storage medium stores a computer program (also referred to as an instruction or code), and when the computer program is executed by the electronic device, the electronic device executes the first aspect or the method in any one of the implementation manners of the first aspect; or , so that the electronic device executes the second aspect or the method in any one implementation manner of the second aspect.
  • a computer program also referred to as an instruction or code
  • the embodiments of the present application provide a computer program product.
  • the electronic device When the computer program product is run on the electronic device, the electronic device is made to execute the method in the first aspect or any one of the implementation manners in the first aspect; or, to make the electronic device The device executes the second aspect or the method in any one implementation manner of the second aspect.
  • the embodiment of the present application provides a circuit system, the circuit system includes a processing circuit, and the processing circuit is configured to execute the method in the first aspect or any one of the implementation manners in the first aspect; or, the processing circuit is configured to execute The second aspect or the method in any one of the implementation manners in the second aspect.
  • the embodiment of the present application provides a chip system, including at least one processor and at least one interface circuit, at least one interface circuit is used to perform the function of sending and receiving, and send instructions to at least one processor, when at least one processor When executing the instruction, at least one processor executes the method of the first aspect or any one of the implementation manners of the first aspect; or, at least one processor executes the second aspect or the method of any one of the implementation manners of the second aspect.
  • Figure 1 is a schematic interface diagram 1 provided by the embodiment of the present application.
  • FIG. 2 is a schematic diagram of the form of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application.
  • FIG. 4A is a schematic diagram of a software structure block diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 4B is a schematic diagram of a desktop dynamic display scene provided by an embodiment of the present application.
  • Fig. 5 is the interface schematic diagram 2 provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of layers provided in the embodiment of the present application.
  • Fig. 7 is a schematic diagram of layer touch focus provided by the embodiment of the present application.
  • Figure 8 is a schematic diagram of the third interface provided by the embodiment of the present application.
  • FIG. 9 is a second schematic diagram of layers provided by the embodiment of the present application.
  • Figure 10 is a schematic diagram of the fourth interface provided by the embodiment of this application.
  • FIG 11 is a schematic diagram of the fifth interface provided by the embodiment of this application.
  • Figure 12 is the sixth schematic diagram of the interface provided by the embodiment of this application.
  • Figure 13 is the seventh schematic diagram of the interface provided by the embodiment of this application.
  • Figure 14 is the eighth schematic diagram of the interface provided by the embodiment of this application.
  • Figure 15 is a schematic diagram of the ninth interface provided by the embodiment of this application.
  • Figure 16 is a tenth schematic diagram of the interface provided by the embodiment of this application.
  • Figure 17 is the eleventh schematic diagram of the interface provided by the embodiment of this application.
  • Figure 18 is a schematic interface diagram twelve provided by the embodiment of this application.
  • Figure 19 is a schematic diagram of the interface provided by the embodiment of this application thirteen;
  • Figure 20 is a schematic diagram of the fourteenth interface provided by the embodiment of this application.
  • Fig. 21 is a flow chart 1 of the desktop dynamic effect display method provided by the embodiment of the present application.
  • Figure 22 is a schematic diagram of the fifteenth interface provided by the embodiment of this application.
  • Figure 23 is a sixteenth schematic diagram of the interface provided by the embodiment of this application.
  • Fig. 24 is the second flow chart of the desktop dynamic effect display method provided by the embodiment of the present application.
  • FIG. 25 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • references to "one embodiment” or “some embodiments” or the like in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
  • the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
  • the term “connected” includes both direct and indirect connections, unless otherwise stated. "First” and “second” are used for descriptive purposes only, and should not be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features.
  • the desktop dynamic effect display method provided in the embodiment of the present application can be applied to electronic devices.
  • the electronic device can specifically be a mobile phone 21, a notebook computer 22, a tablet computer 23, a large-screen display device 24, a wearable device (such as a smart watch, a smart bracelet, etc.) 25, a vehicle-mounted device, a super Terminal devices with display functions such as mobile personal computers (ultra-mobile personal computer, UMPC), netbooks, personal digital assistants (personal digital assistant, PDA), artificial intelligence (artificial intelligence) devices, and the like.
  • Operating systems installed on electronic devices include but are not limited to or other operating systems.
  • the electronic device may be a fixed device or a portable device. This application does not limit the specific type of electronic equipment or the installed operating system.
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 etc. .
  • a processor 110 an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 etc.
  • SIM subscriber identification module
  • the structure shown in the embodiment of the present application does not constitute a specific limitation on the electronic device.
  • the electronic device may include more or fewer components than shown in the illustrations, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP device replication processor, AP device), a modem processor, a graphics processor (grAP device hics processing unit, GPU) , image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit , NPU) etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • the controller can generate operation control signals according to instruction opcodes and timing signals, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and peripheral devices. It can also be used to connect headphones and play audio through them.
  • the interface can also be used to connect other second electronic devices, such as AR devices.
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device.
  • the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device. While the charging management module 140 is charging the battery 142 , it can also provide power for the second electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the wireless communication function of the electronic device can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system, etc. (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
  • GSM global system for mobile communications
  • general packet radio service general packet radio service
  • CDMA code division multiple access
  • WCDMA broadband Code division multiple access
  • time division code division multiple access time-division code division multiple access
  • TD-SCDMA time-division code division multiple access
  • LTE long term evolution
  • BT GNSS
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device realizes the display function through the GPU, the display screen 194, and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (liquid crySTA device l display, LCD), an organic light-emitting diode (organic light-emitting diode, OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the desktop is displayed.
  • the application detects an event that triggers the desktop animation (eg, the weather application detects a weather reminder event)
  • it requests the animation module to play the animation e.g, the weather application detects a weather reminder event
  • the electronic device displays desktop dynamic effects on the display screen 194 through the dynamic effect module.
  • the sensor module 180 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
  • Touch sensor also known as "touch device”.
  • the touch sensor can be arranged on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also called “touch screen”.
  • the touch sensor is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor may also be disposed on the surface of the electronic device, which is different from the position of the display screen 194 .
  • the electronic device detects the user's operation at the preset focus position of the desktop dynamic effect through the touch sensor, and then executes the corresponding operation. If it is detected that the user clicks the preset operation of closing the focus of the animation in the desktop animation, the desktop animation is exited and the desktop is displayed.
  • the electronic device detects the user's operation on the desktop animation other than the preset focus through the touch sensor, then exits the desktop animation, and performs corresponding operations in response to the touch position. If the electronic device detects through the touch sensor that the user clicks the application program icon during the process of displaying the desktop dynamic effect, the desktop dynamic effect will be exited, and the application program corresponding to the application program icon will be started.
  • the electronic device can realize the shooting function through ISP, camera 193 , video codec, GPU, display screen 194 and application processor.
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device can realize the audio function through the audio module 170 and the application processor. Such as music playback, recording, etc.
  • the audio module 170 may include a speaker, a receiver, a microphone, an earphone jack, and the like. It is used to convert digital audio information to analog audio signal output, and also to convert analog audio input to digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to realize contact and separation with the electronic device.
  • the electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the Android system with layered architecture is taken as an example to illustrate the software structure of the electronic device.
  • FIG. 4A is a block diagram of the software structure of the electronic device according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
  • the application layer can consist of a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, a phone manager, a dynamic effect module, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
  • the phone manager is used to provide communication functions of electronic devices. For example, the management of call status (including connected, hung up, etc.).
  • the dynamic effect module is used to manage desktop dynamic effects, such as controlling the play and stop of desktop full-screen dynamic effects.
  • the electronic device uses the motion effect module 42 as an intermediary or interface between the desktop (such as launcher) 43 and the application program 41 to transmit interactive messages, so as to realize the motion effect corresponding to the playback application program 41 .
  • the application program 41 detects the trigger event of playing the animation effect, it sends an animation effect request to the animation effect module 42 for requesting to play the animation effect.
  • the motion effect module 42 determines that the application program 41 has the permission to play the motion effect based on the motion effect request, it obtains the storage location of the motion effect resource of the motion effect to be played from the application program 41 .
  • the dynamic effect module 42 judges whether there is a desktop dynamic effect playback environment at present, if there is a desktop dynamic effect playback environment (such as the desktop does not play the dynamic effect, or the dynamic effect being played and the dynamic effect requested to play do not affect the playback effect each other),
  • the dynamic effect resource can be obtained according to the storage location of the dynamic effect resource to play the dynamic effect.
  • the dynamic effect module 42 requests the launcher 43 to invoke hardware resources. If the dynamic effect playback process needs to play sound, the dynamic effect module 42 calls the audio module of the electronic device through the launcher 43 to play sound during the dynamic effect playback process.
  • the dynamic effect module 42 can be packaged in the launcher 43 as a module in the application of the launcher 43. Then, during the interactive process of the above-mentioned dynamic effect playback, the application program 41 can directly interact with the launcher 43 to realize the dynamic effect playback. Alternatively, the dynamic effect module 42 can also be used as an independent application, packaged separately to realize dynamic effect playback.
  • the dynamic effect module 42 can also be described as a dynamic effect application (application), a full-screen dynamic effect APP, a dynamic effect service, a dynamic effect management service, etc., which is not limited in this embodiment of the present application, no matter the name of the module is Anything, as long as it is a module with similar functions and conforms to the technical idea of the method provided by the embodiment of this application, should be covered within the scope of protection of this application.
  • the above-mentioned application program requesting to play the animation effect may be a native APP installed in the electronic device, or a third-party APP installed in the electronic device.
  • the native APP is an APP provided by an electronic device manufacturer, such as a text message application in a mobile phone is a native APP.
  • the third-party APP is the APP provided by other manufacturers, such as the mobile phone The application is a three-party APP.
  • the Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • a system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • one or more of the application icon, the application card, and the folder containing the application icon may be displayed on the desktop.
  • an electronic device status bar may also be displayed on the desktop for displaying the status of the electronic device, such as network connection status, battery power status, and the like.
  • the desktop element of the electronic device includes the above content displayed on the desktop.
  • the desktop elements that can be applied for playing animation effects may be some of the desktop elements, such as application cards and application icons.
  • an interface 501 is shown in (a) of FIG. 5 , and the interface 501 displays a desktop of an electronic device.
  • Application program icons such as a clock icon 51
  • Application cards such as the music application card 52
  • a folder 53 containing application program icons.
  • the interface 502 shown in (b) in FIG. 5 is an interface displayed after the electronic device detects that the user clicks on the folder 53, and is used to display the application program icons contained in the folder.
  • a status bar can also be displayed on the desktop, as shown in the dotted line box indicated by reference numeral 54 , information such as the power of the electronic device can be displayed in the status bar.
  • the application program running the application service may request to play the desktop dynamic effect.
  • the cards displayed on the desktop can run application services, and can apply to play animation effects.
  • the clock application card can support changing with the time and display the content of the card, so the application service is running.
  • the application programs running in the background can run application services, and can apply for playing animation effects.
  • the icon of the application is displayed on the desktop, and application for playing desktop animation cannot be applied.
  • the application program running the application service can apply for full-screen dynamic display when the electronic device displays the desktop.
  • the desktop dynamic effect display method provided by the embodiment of the present application can display information in areas other than the area where the application program icon or card is located. It can also display application-related information, such as displaying the full-screen animation of the application, so that the desktop animation can contain more application information, and supports developers to customize the animation display effect, which can increase user interactivity and improve user usage experience.
  • the developer may add application animations and trigger events for triggering the application animations to the application according to requirements. Then, later, when the electronic device is displaying the desktop, after the application program detects the trigger event, it can apply to the dynamic effect module to play the dynamic effect.
  • the developer presets information related to motion effects in the application development kit, such as motion effect resources for preset motion effects (such as image resources, text resources, video resources, etc. required during animation playback), animation playback duration and other information.
  • Trigger events include trigger events related to application function attributes.
  • the calendar application has the function of adding a schedule, and the trigger event preset by the developer in the calendar application satisfies the schedule reminder conditions set by the user.
  • the calendar application detects the trigger event, it can request the animation module to play the animation effect.
  • the animation module Such as playing schedule reminder information on the desktop, etc.
  • the dynamic effect module in the electronic device adds one or more layers on the desktop for playing the dynamic effect.
  • the application requests some or all of these layers to be applied and provides animation resources.
  • the dynamic effect module obtains the dynamic effect resource, it can play the dynamic effect in the requested dynamic effect layer.
  • the layer on which the electronic device displays the desktop may be regarded as a desktop layer.
  • the dynamic effect layer can include one or more of the layers below the desktop layer, the desktop layer, the layer between the desktop layer and the floating window layer, and the layer above the floating window layer. kind of layer.
  • the dynamic effect module can play dynamic effects on the desktop layer according to the application request.
  • the application program when the electronic device is displaying the desktop, the application program detects a trigger event and requests an available dynamic effect layer from the dynamic effect module.
  • the dynamic effect module sends the information of the dynamic effect layer to the application program (for example, the available dynamic effect layer is 3 layers), and the application program selects one of them according to the obtained information of the dynamic effect layer and the selection rules preset by the developer.
  • One or more layers of dynamic effect layers if one of the dynamic effect layers is selected, the information of the selected dynamic effect layer and the storage location of the corresponding dynamic effect resources can be sent to the dynamic effect module.
  • the dynamic effect module obtains the dynamic effect resource stored in the storage location and draws the dynamic effect on the dynamic effect layer selected by the application, such as drawing the dynamic effect on the dynamic effect layer shown in (b) in Figure 6, and plays it on the desktop after the drawing is completed Dynamic effect, displaying the interface 602 shown in (c) in FIG. 6 , including the desktop layer and the dynamic effect layer.
  • information about available dynamic layers may also be preconfigured in the application. Then, after the application detects the trigger event, it does not need to request the available dynamic effect layer from the dynamic effect module.
  • the motion effect module may request the corresponding application program to obtain the motion effect resource information of the motion effect to be played.
  • the dynamic effect resource information includes the storage location of the dynamic effect resource of the dynamic effect to be played and/or the information of the corresponding dynamic effect layer.
  • the number of dynamic effect layers is one or more layers
  • the dynamic effect resources include one or more resources (the multiple flowers included in the scene as shown in Figure 6 are multiple resources)
  • the information of the dynamic effect layers includes one The corresponding relationship between one or more layers of dynamic effects and one or more resources. That is to say, the application program determines the dynamic effect layer used to play the dynamic effect, and determines which dynamic effect resource corresponds to which dynamic effect layer to play.
  • the dynamic effect resource information includes the storage location of the dynamic effect resource of the dynamic effect to be played and the information of the corresponding dynamic effect layer. Then in the future, the dynamic effect module can obtain the corresponding dynamic effect resource from the storage location of the dynamic effect resource (different dynamic effect resources can be stored in different storage locations), and determine which dynamic effect layer to play according to the information of the dynamic effect layer Which animation resource to animate. If different animation resources have their own animation resource identifiers, the animation module can determine the animation to play the corresponding animation resources according to the corresponding relationship between the animation resource identifiers and the animation layer identifiers included in the information of the animation layer. Effect layer. Wherein, the dynamic effect resource identifier may include an identifier of a storage location of the dynamic effect resource and a layer identifier. If it is determined that resource 1 is stored in location 1, the corresponding animation will be played on layer 1.
  • the dynamic effect resource information includes the storage location of the dynamic effect resource of the dynamic effect to be played. Then, after the animation module obtains the corresponding animation resource from the storage location of the animation resource, it can play the animation in the corresponding animation layer or the default layer.
  • the electronic device can distinguish different storage locations of different dynamic effect resources through identifiers of dynamic effect resources. For example, it is determined that resource 1 is stored in location 1.
  • the dynamic effect resource information includes the information of the corresponding dynamic effect layer.
  • the dynamic effect module can obtain all the dynamic effect resources from the storage location of the dynamic effect resources, and can determine the corresponding dynamic effect according to the corresponding relationship between the dynamic effect resource identifier and the layer identifier included in the information of the dynamic effect layer The layer for the animation effect of the resource.
  • the electronic device can distinguish different dynamic effect layers corresponding to different dynamic effect resources through the identification of the dynamic effect resources. For example, it is determined that the animation effect corresponding to resource 1 is played on layer 1.
  • the developer can configure the touch focus at a specific position in the animation.
  • the touch focus is used to indicate the touch area corresponding to the preset animation interaction position.
  • the user can Interact with the animation effect through the touch area, such as instructing to stop playing the animation effect, replay the animation effect, etc.
  • the command meaning corresponding to the touch focus can also be configured.
  • the electronic device detects the user's operation on the touch focus during the process of playing the dynamic effect, it executes the corresponding command.
  • the electronic device detects the user's operation on a position where the touch focus is not configured (that is, an operation on an area other than the touch area), which causes the focus to break through.
  • the focus executes the command corresponding to the desktop control corresponding to the touch position, thereby reducing the interference of motion effects on desktop operations.
  • multiple touch focuses are preset in the dynamic effect layer, including the touch focus in the displayed flower center, replaying the touch focus, and closing the touch focus.
  • the electronic device detects that the user clicks on the center of the flower and touches the focus 71 during the playback of the dynamic effect
  • the electronic device controls the flower to display corresponding dynamic effects through the dynamic effect module, such as rotating petals.
  • the dynamic effect module such as rotating petals.
  • the electronic device detects the user's operation of clicking the replay touch focus 72
  • the motion effect is played again through the motion effect module.
  • the electronic device detects that the user clicks to close the touch focus 73 it exits the dynamic playback through the dynamic effect module and displays the desktop.
  • the electronic device detects that the user clicks the position indicated by reference numeral 61 , determines that the user's operation position is not the preset touch focus position of the dynamic effect layer, and then exits the dynamic effect through the dynamic effect module. Further, the electronic device determines that the user's operation position corresponds to the position of the card C displayed on the desktop layer, determines that the user needs to start the application corresponding to the card C, and starts the application. That is, the dynamic effect played by the dynamic effect module will not affect the user's operation on the desktop, and will not affect the user experience while increasing interactivity.
  • other functions corresponding to the touch focus can also be configured in the application program to achieve different operation effects, such as presetting the touch focus for playing the next animation effect.
  • the dynamic effect module After the dynamic effect module detects the touch operation of other touch focus points other than the custom touch focus, it sends the touch event to the application program module, and the application program determines the corresponding function of the touch operation, and sends the corresponding dynamic effect resource to the animation module. After receiving the touch resource corresponding to the touch operation, the dynamic effect module plays the corresponding dynamic effect.
  • the application may have sent all the dynamic resources including the dynamic resources corresponding to the touch operation when sending the dynamic resource of the dynamic effect, then the application does not need to send the dynamic effect module to the dynamic effect module after receiving the touch event. Instead, it sends a dynamic effect indication, which is used to instruct the dynamic effect module to play the dynamic effect based on which dynamic effect resources.
  • the operation of exiting the motion effect is preset, and after the electronic device detects the operation of exiting the motion effect, the motion effect module stops playing the motion effect.
  • the operation of exiting the dynamic effect may include the operation of clicking to close the touch focus (as shown in FIG. 7 , closing the touch focus 73 ), and the closing touch focus may be defined by an application program or by a dynamic effect module.
  • the operation of exiting the dynamic effect may also include a preset gesture operation at a position other than the preset touch focus in the displayed dynamic effect. For example, if the electronic device detects a click operation at a position other than the touch focus, the dynamic effect playback can be exited through the dynamic effect module.
  • the electronic device detects the user's preset gesture operation (such as a double-tap operation) at a position other than the touch focus, it can exit the animation playback through the animation module, so as to avoid the animation exit caused by the user's mistaken touch. Furthermore, after the animation module determines the exit animation, it can also play the exit animation during the exit process.
  • the exit animation can be defined by an animation module or an application program. Such as including fading out, side sliding out of the display screen, application custom dynamic effects, etc.
  • the electronic device can interact with the user by touching the focus, so as to improve the user's sense of participation and user experience.
  • the developer can configure whether the animation of the application can be linked with other applications, and whether it needs to be linked with the hardware function of the electronic device. For example, if other applications can be linked, you can determine the linkage animation playback effect with the developer of the application that can be linked in advance, configure the corresponding linkage animation in the linkage application, and configure the linkage in this application Animation instructions. Then, in the process of requesting to play the animation effect, the application program can send a motion effect request carrying a linkage animation indication to the animation module, and the linkage indication includes the identification (such as the application ID) of the application program that needs linkage.
  • the motion effect module After the motion effect module receives the motion effect request, it can determine that the motion effect needs to be played according to the linkage indication, and forward the linkage motion effect indication to the corresponding application program according to the identification. Then the application program that needs linkage sends a linkage animation request to the animation module according to the linkage animation indication, so as to realize the linkage animation playback. For another example, if the hardware function of the linked electronic device is required, the developer configures the required hardware in the application animation. Then, during the subsequent animation request process, the animation module can know which hardware functions are required for the requested animation, and can request the launcher to call hardware functions, such as requesting the audio module to play the animation sound. Wherein, the number of linked application programs may be one or more.
  • the animation module can play the animation of the application alone without playing the animation of the linkage; or, the animation module does not play the animation of the application. If the electronic device is not equipped with hardware that needs to be linked, then the animation module can play the animation of the application alone without linking the relevant hardware; or, the animation module does not play the animation of the application.
  • the animation module receives the animation request sent by the application including the linkage request, and if it determines that the electronic device does not meet the linkage conditions, it sends a linkage failure response to the application, and the application determines whether to play the animation and how to play it. Motion.
  • the application judging rule is a preset rule configured by the developer during the application development process.
  • the dynamic effect module sends the desktop elements and hardware capabilities to the application program after receiving the motion effect request sent by the application program.
  • the application program determines whether there is an application program that needs linkage installed in the electronic device, and then sends a linkage animation effect instruction to the animation module to play the linkage animation effect after it is determined that the electronic device has the application program that needs linkage installed.
  • the application program also judges whether the electronic device has the hardware capability that needs to be linked according to the received hardware capability of the electronic device. If it has the corresponding capability, it sends a linkage animation instruction to the animation module to start the corresponding hardware. .
  • the dynamic effect module receives the dynamic effect request sent by application A, obtains the desktop element information (displayed with card C), and sends the desktop element information to application A.
  • Application A determines that application C is installed on the electronic device according to the desktop element information, then sends the linkage animation indication corresponding to the linkage animation effect and the animation resource information (such as including the storage location of the animation resource) to the animation module, and the animation module
  • the linkage motion effect indication therein is forwarded to application C, and then application C determines whether to display the linkage motion effect. If the application C determines to play the linked motion effect, it can send a motion effect request to the motion effect module. Then assume that the linkage effect includes adding emoticons and garlands on card A, changing the display position of card C, and presenting flowers from card C to card A.
  • the dynamic effect module draws the dynamic effect according to the received dynamic effect resource information sent by application A and the dynamic effect resource information sent by application C, and displays the interface 802 shown in (b) in FIG. 8 , and plays on the interface 802 Dynamic effects corresponding to application A and application C.
  • the animation effect of application A may also include hardware support, for example, music needs to be played during the playback of the animation effect.
  • application A adds a hardware support request to the motion effect request, and the motion effect module requests the launcher to call the audio module of the electronic device to play music according to the motion effect request, so that in the process of playing the motion effect shown in interface 802, play music.
  • the pre-configured linkage animation in the application animation may not specify the specific linkage application, but indicate linkage with the desktop element attached to the card or icon displayed on the desktop corresponding to the application.
  • linkage application C is not configured in the animation effect of application A, but a linkage animation effect is configured to display a card near card A corresponding to linkage application A.
  • application A After receiving the desktop element information, application A obtains the display position of each element displayed on the desktop, determines that card C is located near card A according to the display position, and satisfies the linkage animation playback conditions, then requests linkage card C to play in the linkage request Linkage animation effect, and the animation resource of card C linkage animation effect is pre-configured in application A. Then, after the motion effect module receives the motion effect request, it can request application C to allow the play of the motion effect, or it does not need to request the permission of the application C to play the motion effect, but directly controls the card C to display the linkage motion effect through the launcher.
  • the application program may request some or all of the one or more layers of the animation effect provided by the animation module to play the animation effect.
  • application A selects all three animation layers for playing the animation.
  • application A sends a dynamic effect request to the dynamic effect module, it can carry the dynamic effect layer information in the dynamic effect request, including which dynamic effect layers are requested to be used, and the content to be displayed in each dynamic effect layer.
  • the motion effect module determines the motion effect playback requirement according to the motion effect request sent by application A, and plays the required motion effect on the corresponding layer. For example, as shown in FIG.
  • the dynamic effect module plays the flower presentation action in the dynamic effect (including hands and flowers, the dynamic effect and the dynamic effect layer can also be requested by application C) on the bottom layer 901, and on the desktop layer Play 902 the moving position dynamic effect of card C in the dynamic effect (the dynamic effect and the dynamic effect layer can also be requested by the application C), and play other dynamic effects in the dynamic effect on the top layer 903, so that the dynamic effect After the layers are superimposed and displayed, the complete animation can be played.
  • the application program needs to obtain the permission to play the animation effect of the electronic device, and the animation effect module can play the animation effect after determining that the application program has the permission to play the animation effect. For example, after receiving the motion effect request sent by the application program, the motion effect module determines that the application program does not have the permission to play the motion effect, and then displays a prompt message for prompting the user to confirm whether to allow the application program to play the motion effect. If the user allows it, the permission to play the dynamic effect is obtained (that is, authorized by the user), and the permission to play the dynamic effect can also be saved. For another example, the electronic device provides a dynamic effect playback permission setting entry in the setting application, allowing the user to set the dynamic effect playback permission.
  • an entry for setting the animation playback permission is preset in the application, allowing the user to set the animation playback permission of the application in the application.
  • the animation module receives an animation request, it needs to determine the application animation playback permission to avoid changes in the animation playback permission caused by the user changing the settings, and the saved animation playback permission is consistent with the user's
  • the set animation playback permissions are different, and abnormalities occur, which affect the user experience.
  • the electronic device displays prompt information 101 for prompting the user to confirm whether application A is allowed to play desktop animation. If it is detected that the user clicks the operation of the allow control 102, it can be determined that the user allows to play the desktop animation of application A, and the animation can be played through the animation module. If it is detected that the user clicks the disallowed control 103, it can be determined that the user does not allow the desktop animation of application A to be played, and the corresponding animation can be canceled.
  • the electronic device displays rights management setting options, detects the user's operation of clicking the dynamic control 111 , and displays the interface 1102 shown in (b) in FIG. 11 .
  • the user can set the animation play permission of the application program installed in the electronic device.
  • the application A has the animation playback permission
  • the application B does not have the animation playback permission.
  • the electronic device detects the user's operation of clicking the control 112 and determines that the user needs to set the animation play permission of application B, and may display an interface 1103 as shown in (c) in FIG. 11 .
  • the electronic device detects that the user clicks the operation of the permission control 113, it determines that the user has enabled the dynamic effect playback permission of application B, and may display an interface 1104 as shown in (d) in FIG. open.
  • the dynamic effect module maintains a dynamic effect play queue for sorting the dynamic effects to be played.
  • the animation playback process satisfies the producer consumption mode, where the producer is the application program that requests to play animation effects, the buffer area is used to save the animation playback queue, and the consumer is the animation module.
  • the animation module maintains two threads (such as thread 1 and thread 2). Thread 1 is used to generate corresponding animation events according to the animation request sent by the application and put the animation events into the animation playback queue. Thread 2 is used to take out the dynamic effect event from the head of the dynamic effect playback queue to realize the dynamic effect playback.
  • the animation module After the animation module receives the animation request, it generates a corresponding animation event and places it at the end of the animation playback queue (if the animation playback queue is empty, the generated animation event is placed in the animation playback queue at the head of the queue). Afterwards, after the animation effect module receives the animation effect request, it arranges the corresponding animation effect events in the animation effect playback queue in sequence according to the order in which the animation effect request is received. The dynamic effect module determines whether to play the corresponding dynamic effect sequentially starting from the dynamic effect event at the head of the queue according to the sequence of the dynamic effect events in the dynamic effect playback queue. When it is determined to play a certain motion effect, the motion effect event corresponding to the motion effect may be removed from the motion effect playback queue.
  • the dynamic effect module After the dynamic effect module starts to play a dynamic effect, it can check whether the dynamic effect playback queue is empty. If it is not empty, determine whether the current queue head animation can be played. If it can be played, the queue head animation can be removed and play. That is, each animation module is to determine whether the animation at the head of the queue can be played.
  • the motion event may include one or more of the corresponding application information (such as application identification, etc.) that reported the motion effect, the latest play time of the motion effect, the animation play instance, and the information of the associated application program, etc. multiple.
  • the dynamic effect playback example may include the relative playback time of each dynamic effect requested to be played in the dynamic effect request corresponding to the dynamic effect event (in the scene shown in FIG. The playback time interval of the animation), the playback area (for example, including the playback position and the animation layer), the storage location of the animation resource (such as the link of the animation resource), the playback duration, touch focus information, etc.
  • the dynamic effect event may not include the dynamic effect playback instance, but when it is determined that the animation effect corresponding to the animation effect event needs to be played, the corresponding application program is requested to acquire the corresponding dynamic effect playback instance.
  • the dynamic effect module can determine whether there is currently a dynamic effect playback environment according to the dynamic effect playback conditions, that is, whether the corresponding dynamic effect can be played.
  • the dynamic effect playback conditions include that the electronic device displays the desktop, and the corresponding application has a dynamic effect playback Permissions, current desktop elements (such as displayed icons, cards, etc.) do not affect the playback of animation effects, the animation effects being played on the desktop and the animation effects requested to play do not affect each other, and the animation playback time limit has not expired, etc. For example, if the position of the dynamic effect being played or the position of the table card affects the playback position of the dynamic effect of the head of the queue, the dynamic effect can not be played temporarily.
  • the animation effect can be moved to the end of the playback queue to determine whether the next animation effect can be played, so as to improve the efficiency of animation playback. For another example, if the animation effect is time-sensitive and currently does not meet the playing conditions, the application program can cancel playing the animation effect.
  • the dynamic effect module can play one or more dynamic effects on the desktop. For example, the dynamic effect module determines that the head of the dynamic effect playback queue is the dynamic effect A, and the dynamic effect A has the condition of dynamic effect playback, then plays the dynamic effect A and removes the dynamic effect A from the dynamic effect playback queue. Afterwards, the animation module determines that the head of the animation playback queue is animation B, and animation B has the animation playback conditions (including the playback of animation A and the playback of animation B do not affect each other), then the playback of animation A Play animation B during the process, and remove animation B from the animation playback queue.
  • the key areas of the animation can be pre-configured. For example, if the animation effect requested to be played and the animation effect being played do not affect the animation playback in the key area, it can be determined that the animation playback process does not affect each other, and the animation effects can be played at the same time. That is, the motion effect module can determine whether there is a motion effect playback environment and whether the current motion effect to be played can be played according to the key area of the motion effect.
  • the key area of the animation is pre-configured in the application, and when the application sends the animation request, the information of the key area of the animation can be carried in the animation request.
  • the key area of the animation effect is less than or equal to the area occupied by the animation effect, the number of the key area of the animation effect can be one or more, and the key area of the animation effect can be the touch area where the user can perform interactive operations during the playback of the animation effect. control area.
  • some animation effects may also have no key area (such as animation effects occupying a small display area of the desktop, etc.).
  • the play area of motion effect A is a, and the key area is a1; the play area of motion effect B is b, and the key area is b1.
  • the animation module determines that animation B needs to be played.
  • the dynamic effect module determines that the playback area b does not affect the key area a1, and the playback area a does not affect the key area b1, then the dynamic effect module can play the animation effect B during the playback of the animation effect A.
  • the dynamic effect module when it determines that there is no playing environment with linked dynamic effects, it can place the dynamic effect events corresponding to the multiple linked dynamic effects in the dynamic effect playback queue and mark them. Then the follow-up animation module can determine multiple animation effects that need to be played in linkage according to the mark.
  • the multiple animation events corresponding to the linkage animation may be located in adjacent positions in the animation playback queue, or may be located in non-adjacent positions.
  • application A requests to play animation A, and requests to play a linked animation with application B.
  • application B sends a motion effect request of motion effect B to the motion effect module according to the linkage motion effect instruction.
  • the dynamic effect module puts the dynamic effect event A corresponding to the dynamic effect A and the dynamic effect event B corresponding to the dynamic effect B in the dynamic effect playback queue, and adds a mark 0 to both.
  • the dynamic effect module determines that the dynamic effect event at the head of the queue is the dynamic effect event A, and according to the mark 0, it is determined that the dynamic effect event B needs to be linked, and it can be determined at the same time whether the dynamic effects corresponding to the two dynamic effect events meet the dynamic effect playback conditions , and then realize the playback linkage effect.
  • the electronic device switches to display the desktop (such as displaying the desktop after being unlocked from the lock screen state, exiting the application program interface to display the desktop, etc.), or refreshing the desktop (such as the application program requests to refresh the desktop to display dynamic effects, or the desktop is regularly refreshed. desktop, etc.), the animation module can obtain the animation playback queue, and check whether the animation playback queue is empty. If it is not empty, you need to determine whether to play the animation according to the above method.
  • the electronic device when the electronic device does not display the desktop, after the application detects the trigger event, it can send a dynamic effect request to the dynamic effect module. Request the corresponding animation event, and put the animation event at the end of the animation playback queue.
  • the interface 1201 shown in (a) of FIG. 12 is used to display the desktop, including the card B corresponding to the chat software B and the card C corresponding to the shopping software C.
  • chat software B receives a message containing a product link
  • chat software B determines that the event of receiving the message is a trigger event, and can send a motion effect request to the motion effect module.
  • the animation play queue is empty, after receiving the animation request, the animation module puts the corresponding animation event at the head of the queue, and judges whether the trigger event satisfies the playback conditions. efficient resources.
  • the dynamic effect module plays the dynamic effect of card B indicated by reference numeral 121 on the desktop.
  • the chat software B has a preset linkage effect between the trigger event and the shopping software C. Then, after the chat software B receives the desktop element information after sending the motion effect request, it can determine that the card C of the shopping software C is displayed on the desktop according to the desktop element information, and can send a linkage motion effect instruction to the motion effect module, and the motion effect module will The linkage animation effect is forwarded to the shopping software C.
  • Shopping software C sends a motion effect request to the motion effect module after receiving the linkage motion effect instruction.
  • the dynamic effect module After receiving the dynamic effect request sent by shopping software C, the dynamic effect module determines that it is used to request the display to be played together with the dynamic effect of chat software B to realize the linkage dynamic effect, regardless of whether there are other dynamic effect events in the dynamic effect playback queue. Put the dynamic effect event corresponding to the shopping software C after the dynamic effect event corresponding to the dynamic effect of the chat software B in the dynamic effect playback queue, (or if the dynamic effect module has played the corresponding dynamic effect of the chat software B, then the corresponding dynamic effect event It has been removed from the animation playback queue, so the animation event corresponding to the animation of shopping software C is placed at the head of the animation playback queue; or the animation event corresponding to the animation of shopping software C is not placed in the animation playback queue, directly play the linkage animation effect), so that the interface 1203 shown in (c) in FIG.
  • the linked animation indication sent by the application program B to the animation module may also include the detected shopping link, and the shopping link preconfigured in the shopping software C Function to search for items based on shopping links. Then, the shopping software C can automatically search for products according to the pre-configured function after receiving the linkage motion effect indication, and display product information during the motion effect playback process. As shown in interface 1204 in (d) of FIG. 12 , after the shopping software searches for commodity information, the dynamic effect resource sent to the dynamic effect module includes the commodity information.
  • the dynamic effect module can also display product information as shown by reference numeral 123 during the process of playing the linked dynamic effect, so the user can directly view the product information in the desktop dynamic effect without starting the shopping software C to search for the product. Further enhance the user experience.
  • the display of the original desktop elements is affected (that is, the product information covers the cards and icons displayed on the original desktop, affecting the user to view the original desktop elements). Therefore, the touch focus 124 is preset to be closed. After the electronic device detects that the user clicks to close the touch focus 124, the product information will no longer be displayed through the dynamic effect module, so that the user can view the original desktop elements covered by the product information.
  • the playback duration of the commodity information is preset, and the dynamic effect module can automatically stop playing the commodity information after the display duration meets the preset duration.
  • the linked motion effect includes the application corresponding to the card displayed on the linked desktop as described in the above scenario, and may also include the application corresponding to the icon of the application running the application service displayed on the linked desktop.
  • the application icon can be directly displayed on the desktop, and can also be displayed in a desktop folder.
  • the interface 1301 shown in FIG. 13 shows the icon of the shopping software C on the desktop, assuming that the shopping software C runs application services (for example, the shopping software C is running in the background).
  • the dynamic effect module forwards the linked dynamic effect instruction to the shopping software C after receiving the linked dynamic effect instruction sent by the chat software B. Afterwards, as indicated by reference numeral 131, the dynamic effect module receives the dynamic effect resource corresponding to the icon of the shopping software C, and plays the dynamic effect.
  • the interface 1401 shown in (a) of FIG. 14 shows a shopping software folder on the desktop.
  • the shopping software folder contains shopping software C, and shopping software C runs application services (for example, shopping software C is running in the background).
  • the dynamic effect module forwards the linked dynamic effect instruction to the shopping software C after receiving the linked dynamic effect instruction sent by the chat software B.
  • the dynamic effect module plays the dynamic effect on the shopping software folder.
  • the electronic device detects that the user clicks on the shopping software folder, it opens the folder and displays an interface 1402 as shown in (b) in FIG.
  • the motion effect shown by reference numeral 142 is shown in (a) of FIG.
  • the motion effect module determines that the application program to be linked (such as shopping software C) is not running the application service, it can wake up the application program to play the linked motion effect. Or, the dynamic effect module sends the situation that the application program to be linked does not run the application service to the application program (such as chat software B) that requests to play the linked animation effect, and the application program that requests to play the linked animation effect determines whether to cancel the playback of the linked animation effect. effect. If the application program that requests to play the linked animation effect decides to cancel the playback of the linked animation effect, the animation module can only play the animation effect of the application program that requests to play the linked animation effect, or cancel playing all the animations corresponding to the application program that requests to play the linked animation effect.
  • the decision is determined by the application and executed by the animation module. If the application program that requests to play the linked animation effect determines not to cancel the playback of the linked animation effect, it can instruct the animation module to wake up the application program to be linked; or the application program that requests to play the linked animation effect presets the animation resource of the linked animation effect, The dynamic effect resources of the linkage animation can be sent to the animation module to realize the linkage animation playback.
  • desktop elements running application services can be displayed in conjunction with desktop elements running application services in the same interface on the desktop (in the scenario shown in Figure 12, card B and card C Linkage animation effect), and desktop elements running application services displayed in different interfaces on the desktop may also be linked.
  • the interface 1501 shown in (a) in FIG. 15 the interface 1501 displayed on the desktop displays the card B of the chat software B, and the chat software B and the shopping software C are preset to be linked. Motion.
  • the chat software B receives the desktop element information sent by the dynamic effect module, it determines that the desktop element corresponding to the shopping software C is not displayed on the interface 1501, but the desktop element corresponding to the shopping software C is displayed on other interfaces of the desktop.
  • the dynamic effect resource sent by the effect module may include the dynamic effect resource shown by reference numeral 151.
  • the dynamic effect module is used to prompt the user to display the application that can view the product on other interfaces by displaying the indicating arrow, and indicate the direction of the interface.
  • the electronic device After the electronic device detects that the user clicks the arrow indicated by reference numeral 151 or slides the interface indicated by the arrow, it displays an interface 1502 as shown in (b) in FIG. 15 , which is used for displaying and chatting software
  • the card of B's linked shopping software C, the dynamic effect module can play the linked dynamic effect on the interface 1502 .
  • the linkage animation effect can be played to provide a better user experience for the user.
  • the number of motion trigger events pre-configured in the application is one or more, the motion effects corresponding to different motion trigger events are the same or different, and the number of motion effects corresponding to each trigger event is one or more.
  • the application program sends a motion effect request to the motion effect module for requesting to play one or more corresponding motion effects, and the motion effect event generated by the motion effect module corresponds to the one or more motion effects.
  • the module sends a corresponding motion effect request, which is used to request to play two motion effects, and these two motion effects are coordinated motion effects.
  • One of the animation effects includes zooming in on the card B 161 to display an explosion expression and displaying a surprised expression on desktop elements (such as icons, cards), and the other animation effect is to play the explosion animation in full screen on the desktop.
  • the dynamic effect module plays the dynamic effect displayed on the interface 1602 shown in (b) of FIG. 16 and plays the full-screen explosion dynamic effect displayed on the interface 1603 shown in FIG. 16 (c) according to the motion effect request.
  • the full-screen explosion animation effect can also request the audio module of the linked electronic device to play the explosion sound, then the animation module plays the explosion sound while playing the full-screen explosion animation effect through the launcher linkage electronic equipment audio module according to the linkage animation effect instruction.
  • the dynamic effect request may include a dynamic effect playback instance, which includes the playback time interval of the above two dynamic effects (as shown in the playback interface 1603 after 3 seconds of the dynamic effect shown in the interface 1602 The full-screen explosion animation effect), the playing duration of the two animation effects (for example, during the playback of the full-screen explosion animation effect, the animation effect shown in the display interface 1602 is maintained), etc.
  • the application program can preset the application start touch focus in the dynamic effect, and after detecting the user's operation of clicking the touch focus, the corresponding application program can be directly launched and the corresponding function interface can be displayed.
  • the electronic device detects that the user clicks on the preset application to start the operation of the touch focus 162 (such as a chat dialog box), starts the chat software B, and displays as shown in FIG. 16
  • the interface 1604 shown in (d) is the chat interface corresponding to the explosion expression received in the chat software B.
  • the user can directly access the functional interface corresponding to the dynamic effect in the application through the touch focus.
  • the user can view the functional interface corresponding to the dynamic effect without having to go through step-by-step operations, which reduces the difficulty of user operation and improves the user experience.
  • the playback of some animation effects is time-sensitive, and playback of animation effects beyond the time limit does not serve as a reminder, which affects user experience. Therefore, when the dynamic effect module determines that the desktop has a dynamic playback environment (for example, desktop elements do not affect dynamic playback), and sends desktop element information to the application, it will also send a timeliness confirmation request to the application for confirmation of the current Whether the animation effect to be played exceeds the time limit requirement. After the application program receives the time limit confirmation request, if it is confirmed that the time limit has been exceeded, all or part of the corresponding animation effects can be canceled (if multiple animation effects are requested, some of the animation effects can be canceled).
  • the motion effect module adds it to the motion effect play queue. Then, later, when the electronic device is displaying the desktop, some or all of the animation effects in the animation playback queue may have exceeded the time limit requirement, and the application program can cancel playing the corresponding animation effects.
  • dynamic effects with a time limit include, for example, schedule dynamic effects, message dynamic effects, and the like.
  • the motion effect request includes the latest play time, and the motion effect module adds the latest play time to the corresponding motion effect event after receiving the motion effect request.
  • the subsequent animation module obtains the head animation event in the animation playback queue, it determines that the current time is later than or equal to the latest playback time, and can send a timeliness confirmation request to the corresponding application to confirm whether it needs to be played The animation.
  • the message received by the chat software B is time-sensitive. For example, after the message exceeds a certain time limit, it does not have timeliness, and the function of reminder is reduced, so the chat software B can cancel the playback animation effect. For another example, if other messages are received after the explosion emoticon, if other animation effects are triggered, the effect of playing the animation effect corresponding to the explosion emoticon will be reduced, so the chat software B can cancel the playback of the animation effect. Then, the message time limit can be preset in the chat software B, and after the time of receiving the time limit confirmation request exceeds the message time limit requirement, the animation playback can be canceled. For example, suppose the message time limit is 10 minutes.
  • chat software B receives a time limit confirmation request within 10 minutes after sending the motion effect request, it will confirm that the time limit is not exceeded and the motion effect can be played. If the chat software B receives a time limit confirmation request 10 minutes after sending the motion effect request, it is confirmed that the time limit has been exceeded, and the playback of the motion effect can be canceled, and a motion effect cancellation instruction can be sent to the motion effect module to instruct the motion effect module Cancel the current animation playback. After the motion effect module receives the motion effect cancellation instruction, it removes the motion effect event corresponding to the motion effect from the motion effect playback queue.
  • the chat software B can set different message time limits for the two animation effects, for example, the time limit for the animation effect shown in interface 1602 is not limited, and the message time limit for the full-screen explosion animation effect is limited to 10 minutes .
  • chat software B receives the time limit confirmation request 10 minutes after sending the motion effect request, and then confirms that the full-screen explosion motion effect has exceeded the time limit.
  • the dynamic effect module only displays the dynamic effect shown in the interface 1602 shown in (b) in FIG. 16 , and cancels the display of the full-screen explosion dynamic effect shown in (c) in FIG. 16 .
  • the dynamic effect module after the dynamic effect module returns to display the desktop or refreshes the desktop, and confirms that the dynamic effect play queue is not empty, it cannot confirm whether the dynamic effects to be played in the dynamic effect play queue exceed the time limit requirement, so it is necessary to Validity period is confirmed.
  • an application program sends a motion effect request, it may carry a time limit identifier in the motion effect request, and the motion effect module determines that the corresponding motion effect has a time limit requirement according to the time limit identifier, and a time limit confirmation is required.
  • the dynamic effect requested by some applications has strong timeliness, such as setting the schedule reminder in the calendar application as a reminder of a certain schedule at a certain time on a certain day, and then playing the dynamic effect after that time , the reminder effect is reduced. Therefore, the application can carry the priority playback tag in the motion request corresponding to this type of motion effect.
  • the motion effect module receives such a request during the process of displaying the desktop, and according to the tag information, puts the corresponding motion event on the The head of the effect playback queue to play the animation effect as soon as possible. That is, the animation module no longer puts the corresponding animation events at the end of the animation playback queue in the order of receiving them.
  • the animation module when the animation module receives an animation request with a priority playback tag while the desktop is not displayed, it can directly place the corresponding animation event at the head of the animation playback queue, and then confirm when the desktop is displayed Whether the time limit requirement is exceeded. Or, when the desktop is not displayed, the dynamic effect module sends a temporarily unplayable signal to the application program after receiving the dynamic effect request with the priority playback tag, which is used to notify the application program that the current electronic device does not have a dynamic effect playback environment, so as to Confirm whether to cancel the playback animation.
  • a calendar card and a clock card are displayed on the desktop.
  • the calendar application can obtain time information, and according to user A's schedule settings, send a motion effect request to the motion effect module at the corresponding time, and carry a priority tag in the motion effect request. If the motion effect module receives the motion effect request during the process of displaying the desktop, it places the motion effect event corresponding to the motion effect request at the head of the motion effect play queue.
  • the dynamic effect module sends the desktop element to the calendar application, and the calendar application can determine that there is a clock card displayed on the desktop and the display position of the clock card according to the received desktop element, and can send a linkage motion effect instruction to the dynamic effect module. Then the clock application determines whether to display the linkage animation effect after receiving the linkage animation indication forwarded by the animation module. If it is confirmed to be displayed, send a dynamic effect request to the dynamic effect module.
  • the motion effect module sends the desktop element to the clock application according to the motion effect request of the clock application, and then the clock application can determine the calendar card displayed on the desktop and the display position of the calendar card according to the desktop element.
  • the dynamic effect module obtains the dynamic effect resources provided by the calendar application and the clock application, it displays the dynamic effect shown by reference numeral 171 in the interface 1701, such as a clock card finger calendar card (the dynamic effect can be a calendar application The linkage motion effect corresponding to the clock application), so that user A can notice the schedule settings displayed on the calendar card in the more eye-catching motion effect.
  • the dynamic effect module obtains the dynamic effect resources provided by the calendar application and the clock application, it displays the dynamic effect shown by reference numeral 171 in the interface 1701, such as a clock card finger calendar card (the dynamic effect can be a calendar application The linkage motion effect corresponding to the clock application), so that user A can notice the schedule settings displayed on the calendar card in the more eye-catching motion effect.
  • the scene shown in FIG. 17 above may not be implemented as a scene with linkage animation effects.
  • the calendar application determines that there is a clock card displayed on the desktop according to the desktop elements obtained after sending the dynamic effect request, and can determine the position of the clock card.
  • the animation resource for the animation shown Then, after the dynamic effect module acquires the storage location of the dynamic effect resource, it can directly display the dynamic effect as shown in FIG. 17 .
  • the application program has a preset duration for playing the animation effect, and the animation module may stop playing the corresponding animation effect after the duration of playing the animation effect satisfies the duration of the animation effect. This prevents resources from taking too long and affecting the playback of subsequent animation effects. Or, occupy the display space of the desktop and affect the display of desktop elements.
  • the duration of each animation included in the animation may be the same or different.
  • some animation effects require a smaller playing area, and do not affect the display of the desktop elements, or have less impact on the desktop elements. Then, the playback duration of these animation effects may not be preset, and the animation module can keep playing these animation effects on the desktop before detecting the user's operation to close the animation effects.
  • this kind of animation effect is preset in the application as a permanent animation effect.
  • the application program carries a corresponding tag in the motion effect request, so that the motion effect module can distinguish such motion effects.
  • the resident dynamic effect will add it to the dynamic effect playback queue every time the display desktop is switched or the desktop is refreshed, so as to realize the resident display.
  • the dynamic effect module keeps playing the dynamic effect shown by reference numeral 181 on the desktop.
  • the weather application program includes displaying other cards (such as a clock card) under the weather card after learning the desktop elements.
  • the weather application determines that the current weather is light rain, then in the process of displaying the animation effect of light rain, the animation effect of splashing water can be displayed on the top of the clock card (this animation effect can be a linkage animation effect between the weather application and the clock application, or it can be a The combination of two motion effects controlled by an application preset in the weather application) to match the light rain motion effect.
  • the electronic device does not display the desktop in full screen, and the motion effect module can play the motion effect on the screen displaying the desktop.
  • the electronic device is displayed in split screens, and the dynamic effect module plays the dynamic effect on the display screen displaying the desktop.
  • the interface 1901 is used to display a chat application interface
  • the interface 1902 is used to display a desktop with music cards displayed on the desktop.
  • the music application detects the trigger event and sends a motion effect request to the motion effect module, then as shown in (b) in Figure 19, the motion effect module plays the motion effect on the interface 1902 (that is, the interface displaying the desktop), but does not display the desktop interface
  • the chat application interface is still displayed on the 1901, and no animation is played.
  • the electronic device can also play animation effects, which meets the user's demand for playing animation effects in the split-screen scene, and improves the user experience.
  • the electronic device may also display the motion effect in the window displaying the desktop according to the motion effect request sent by the application program.
  • the smart multi-window application bar 201 is displayed on the side, and then the operation of clicking the calculator icon 202 by the user is detected, the floating window is activated, and the interface 2002 shown in (b) in FIG. 20 is displayed, and the calculator application interface is displayed in the floating window 203 .
  • the electronic device displays the floating window 203 at a position that will not affect the dynamic effect corresponding to the weather application.
  • the dynamic effect module can also send information such as the position of the floating window to the weather application, and the weather application determines whether to continue playing the dynamic effect.
  • the electronic device detects the user's operation of moving the floating window 203, and if the display position of the moved floating window 203 covers the dynamic effect corresponding to the weather application, the electronic device can continue to play the dynamic effect under the floating window 203 through the dynamic effect module. (If the floating window 203 completely covers the dynamic effect, the user cannot see the dynamic effect), that is, the display position of the floating window 203 is moved, opened, or closed, without affecting the playback of the desktop dynamic effect.
  • the electronic device displays the floating window, if it is determined that the floating window does not affect the playing of the dynamic effect, the electronic device continues to play the moving effect; if it is determined that the floating window affects the playing of the moving effect, then stop playing the moving effect, or stop playing the non-resident moving effect.
  • the electronic device can also play motion effects to meet the user's needs for playing motion effects in the smart multi-window scene and improve the user experience.
  • FIG. 21 is a schematic diagram of a desktop dynamic display method provided in an embodiment of the present application. As shown in Figure 21, the method may include S2101-S2113:
  • the application program detects a trigger event.
  • the triggering event is a dynamic effect triggering event preset by the developer in the application.
  • the event that chat software B receives a product link is a trigger event.
  • the event that the calendar application detects that the time is the schedule reminder time set by the user is a trigger event.
  • the application program sends a motion effect request to the motion effect module.
  • the application after the application detects the trigger event, it can send a motion effect request to the motion effect module.
  • the motion effect module receives the motion effect request.
  • the dynamic effect module determines whether the application program has the permission to play dynamic effects. If yes, execute step S2104; if not, do not display the corresponding animation (not shown in FIG. 21, for example, the application program sends an unauthorized signal to the animation module).
  • the motion effect module after receiving the motion effect request, the motion effect module needs to confirm whether the corresponding application has permission to play the motion effect. If it is determined that there is no animation playback permission, user authorization is required. If the user does not authorize, the corresponding animation will not be displayed.
  • the electronic device displays prompt information to obtain user authorization. After the electronic device detects the authorization operation authorized by the user, it sends an authorization signal to the dynamic effect module, and the dynamic effect module determines that the application program has the authorization to play the dynamic effect.
  • the dynamic effect module sends the desktop element information and the dynamic effect layer information to the application program.
  • the application program determines the dynamic effect resource.
  • step S2104 and step S2105 after the dynamic effect module determines that the application program has the permission to play dynamic effect, it sends the desktop element information and dynamic effect layer information to the application program, so that the application program can determine the corresponding dynamic effect resource .
  • the application program A determines to use the card C to realize the playback linkage effect according to the desktop element information. Moreover, the application A determines to select three of the dynamic effect layers for playing the dynamic effect according to the dynamic effect layer information, and determines the corresponding dynamic effect resource of each dynamic effect layer.
  • the application program sends the dynamic effect resource to the dynamic effect module.
  • the application program determines the dynamic effect resource, it can send the dynamic effect resource to the dynamic effect module.
  • the dynamic effect module receives dynamic effect resources.
  • the dynamic effect module maintains a dynamic effect play queue. After any of the above steps S2102, S2103 and S2106, the dynamic effect module can put the corresponding dynamic effect event in the dynamic effect play queue In, such as placed at the end of the queue. Moreover, if the animation module has added a corresponding animation event in the animation playback queue in one of the steps, then the subsequent steps do not need to add the corresponding animation event to avoid repeated addition.
  • the motion effect module receives the motion effect request (ie after step S2102), it puts the corresponding motion effect event at the end of the motion effect play queue. Then, later, when the dynamic effect event is at the head of the queue (that is, when it is to be displayed), it is necessary to determine the dynamic effect playback permission. If it is determined that the dynamic effect playback permission is not available, the dynamic effect event can be removed from the dynamic effect playback queue.
  • the animation module puts the corresponding animation event at the end of the animation playback queue, it directly confirms whether it has the animation permission and whether it needs to be removed from the animation playback queue.
  • the animation module places the corresponding animation event at the end of the animation playback queue. Then, later, when the dynamic effect event is at the head of the queue (that is, when it is to be displayed), the corresponding dynamic effect resource needs to be obtained. If the dynamic effect resource acquisition fails, the dynamic effect event can be removed from the dynamic effect playback queue. Alternatively, after the dynamic effect module puts the corresponding dynamic effect event at the end of the dynamic effect playback queue, it directly confirms whether there is a corresponding dynamic effect resource and whether it needs to be removed from the dynamic effect playback queue.
  • the dynamic effect module receives the dynamic effect resource (ie after step S2106), it puts the corresponding dynamic effect event at the end of the dynamic effect playback queue. Then, later, when the dynamic effect event is at the head of the queue (that is, when it is to be displayed), directly determine whether there is a dynamic effect playback environment (see the following step S2108), if there is a dynamic effect playback environment, you can directly call the dynamic effect resource, Realize dynamic playback.
  • the dynamic effect module displays the desktop.
  • the dynamic effect module displaying the desktop is used to indicate that the dynamic effect module displays the desktop through the launcher, including switching to display the desktop, or notifying the application program to refresh the displayed desktop.
  • the electronic device detects the operation of the user returning to the desktop on the music application interface (assuming that the music application has not been exited), and displays the interface 2202 shown in Figure 22 (b), the interface 2202 It is used to display the desktop, and music dynamic effects can be displayed on the desktop.
  • the animation effect is a full-screen cheering animation effect.
  • the sports health application sends a dynamic effect request to the dynamic effect module and requests to refresh the desktop to play the full-screen desktop Dynamic effect; or the dynamic effect module automatically refreshes and displays the desktop after receiving the corresponding dynamic effect resource in the above step S2106.
  • the dynamic effect module obtains the dynamic effect playing queue, and determines whether there is a dynamic effect playing environment. If yes, execute step S2109; if not, execute step S2110.
  • the electronic device after switching or refreshing the displayed desktop, acquires the stored dynamic effect play queue, determines the dynamic effect at the head of the queue, and determines whether the current desktop has a dynamic effect playback environment for the dynamic effect. For example, whether one or more dynamic effects being played affect the playing of the dynamic effect, and/or, whether the playing of the dynamic effect affects the playing of one or more dynamic effects being played.
  • the dynamic effect module plays the dynamic effect.
  • the motion effect module determines that the motion effect has a motion effect playing environment, it plays the motion effect at the head of the motion effect playing queue and removes the motion effect from the motion effect playing queue.
  • playing the motion effect includes playing a linkage motion effect.
  • the music card is linked to the clock card to display a linkage effect.
  • the linkage motion effect includes the note falling motion effect of the music card, and the dancing motion effect of the clock motion effect.
  • the linkage motion effect please refer to the relevant introduction of the above-mentioned embodiments (scenes shown in FIGS. 12-15 ), which will not be repeated here.
  • the touch focus can be preset in the animation effect of the application program, and the user can interact with the animation effect by touching the focus focus.
  • the corresponding motion effect is played repeatedly.
  • the electronic device detects that the user clicks to close the touch focus 2302 it exits the playback of the corresponding motion effect, and may further display the exit motion effect.
  • the motion effect module delays the play request to the application program.
  • the motion effect module determines that the motion effect does not have a motion effect playback environment, it sends a delayed play request to the corresponding application program to confirm whether the motion effect can be played in a delayed manner.
  • the corresponding application program receives the delayed playback request sent by the dynamic effect module.
  • the application program determines whether to delay playing.
  • the application program sends a delayed playback response to the dynamic effect module.
  • step S2111 and step S2112 the application program determines whether the corresponding animation effect has a playback time limit requirement according to the delayed playback request. If there is no playback time limit requirement, the delayed playback response can carry a delayed playback approval signal; if there is a playback time limit requirement, a delayed playback response can be carried with a non-agreeable delay signal. Furthermore, if the application confirms that the animation has a playback time limit and must be played, the delayed playback response may also carry a forced playback signal.
  • the music application may not set a playback time limit requirement, then the delayed playback response sent by the music application to the animation module carries a delay-approving signal.
  • the calendar application is set with a playback time limit requirement corresponding to the animation effect, and the delayed playback response sent by the calendar application to the animation module carries a delay delay signal. Further, the delayed playback response may also carry a forced playback signal.
  • the animation module moves the animation effect to the end of the animation playback queue; if it is determined not to delay the playback, the animation module removes the animation effect from the head of the animation playback queue.
  • the dynamic effect module receives the delayed playback response sent by the application program. If the delayed playback response carries a delay-approved signal, it is determined to delay the playback of the animation effect, and the animation module moves the animation effect to the end of the animation playback queue, and waits to confirm whether it can be played again later. If the delayed playback response carries a delay delay signal, the animation module removes the animation at the head of the animation playback queue, that is, cancels the playback of the animation. Furthermore, if the delayed playback response carrying the delay signal of disapproval also carries a forced playback signal, the animation module will force the animation to be played regardless of the current playback environment, so as to avoid missing important items and affecting user experience.
  • the dynamic effect module can forcibly play the dynamic effect of the calendar application according to the forced play signal, so as to prevent the user from missing the in-app purchase event. Further, if the electronic device is in a dormant state when it is necessary to forcibly play the motion effect, the motion effect module can forcibly wake up the electronic device to display the motion effect. If the electronic device displays other application interfaces when the animation needs to be played forcibly, the animation module cannot display the corresponding animation effects, and the user can be reminded of the corresponding matters through a message reminder, and then display the animation effects after the user exits the application interface.
  • step S2107-step S2113 is a loop step, after the animation effect module plays the animation effect, it will take out the animation effect at the head of the animation effect playing queue. If the animation effect at the head of the queue is taken out and the animation playback queue is not empty, then determine whether the animation at the next head of the queue has a playback environment, and play all the animations in the animation playback queue in sequence. If all the animation effects in the animation playback queue cannot be played during the display of the desktop, save the animation playback queue, and after displaying the desktop next time, determine whether the animation effects can be played in turn from the queue head.
  • FIG. 24 is a schematic diagram of another desktop dynamic display method provided in the embodiment of the present application.
  • the method may include S2401-S2403:
  • the electronic device displays a desktop, where the desktop includes a first desktop element.
  • the electronic device displays a desktop
  • the desktop elements included in the desktop include, for example, application icons, cards, folders, status bars, and the like.
  • the first desktop element playing the first motion effect may be a card and/or icon of the first application corresponding to the first desktop element included in the desktop element.
  • the first desktop element may be the card A shown in the interface 801 shown in (a) of FIG. 8 .
  • the electronic device determines to play the first motion effect of the first desktop element.
  • the first application corresponding to the first desktop element runs the application service, so that the first application can detect the triggering event of the motion effect and request to play the motion effect.
  • the first application corresponding to the first desktop element has the permission to play the animation effect. If you have the permission to play animation effects, you are allowed to play the first animation effect; if you do not have permission to play animation effects, you need to obtain authorization from the user before you are allowed to play the first animation effect.
  • the relevant content of the animation play permission can refer to the relevant content shown in the above-mentioned FIG. 10 and FIG. 11 , which will not be repeated here.
  • the electronic device before determining to play the first motion effect, it is determined whether there is a motion effect playing environment for playing the first motion effect.
  • the electronic device can play the dynamic effect after determining the dynamic effect playing environment capable of playing the first dynamic effect.
  • the dynamic effect playback environment includes that the first content and/or the second content do not exist on the desktop, the first content is content that affects the playback effect of the first dynamic effect, and the second content is that the display effect will be played by the first dynamic effect affected content.
  • the second area displaying the first content intersects the first key area in the first area, and the first area intersects the second key area in the third area displaying the second content.
  • the first content or the second content is the content displayed in the floating window or the dynamic content played on the desktop.
  • the key area may be a touch area where the user can interact with the dynamic effect.
  • all display areas may be key areas, or there may be no key areas.
  • the play area of motion effect A is a, and the key area is a1; the play area of motion effect B is b, and the key area is b1.
  • the animation module determines that animation B needs to be played.
  • the dynamic effect module determines that the playback area b does not affect the key area a1, and the playback area a does not affect the key area b1, then the dynamic effect module can play the animation effect B during the playback of the animation effect A.
  • the electronic device when the electronic device obtains the demand for playing the second motion effect of the second desktop element, it determines that there is no motion effect playback for playing the second motion effect of the second desktop element. environment, the electronic device does not play the second animation effect, or delays playing the second animation effect when it is determined that the second animation effect is delayed until the second animation effect is played in a animation playback environment that has the second animation effect played.
  • the electronic device may determine to acquire a need to play the second motion effect of the second desktop element. Or, the electronic device obtains the dynamic effect event at the head of the dynamic effect playing queue, and determines that the dynamic effect event is the dynamic effect event corresponding to the second dynamic effect of the second desktop element, then the electronic device can determine that the dynamic effect event obtained to play the first 2. Requirements for the second animation effect of desktop elements. Afterwards, the electronic device can determine whether there is a playing environment for playing the dynamic effect of the second desktop element, so as to determine whether the dynamic effect can be played. If it is determined that the second animation effect cannot be played temporarily, it can be determined whether the second animation effect has a time limit requirement.
  • the second animation effect has a time limit requirement. Playing the animation effect beyond the time limit does not have the meaning of reminding the user, so the second animation effect can no longer be played. Or, the second motion effect does not have a time limit requirement, or the time limit required by the time limit has not yet been reached, and the playback can be delayed.
  • the electronic device before determining to play the first animation effect, the electronic device also acquires the animation resource information of the first animation effect.
  • the dynamic effect resource information includes the storage location of the dynamic effect resource of the first dynamic effect and/or the information of the dynamic effect layer corresponding to the first dynamic effect.
  • the number of dynamic effect layers is one or more layers
  • the dynamic effect resources include one or more resources
  • the information of the dynamic effect layers includes the corresponding relationship between one or more layers of dynamic effect layers and one or more resources.
  • the dynamic effect resource information is that the first application corresponding to the first desktop element is determined according to the desktop elements and optional layers included in the desktop, and the optional layers include one or more dynamic effect layers determined by the first application.
  • the storage location of the dynamic effect resource is used to obtain the dynamic effect resource
  • the information of the dynamic effect layer is used to determine the layer for playing the first dynamic effect.
  • the relevant content of the dynamic effect layer can refer to the relevant content shown in the above-mentioned FIG. 6 and FIG. 9 , which will not be repeated here.
  • the electronic device plays the first motion effect on the first area of the desktop, where the first area includes an area other than the area occupied by the first desktop element.
  • the electronic device can acquire the dynamic effect resource stored in the storage location. According to the corresponding relationship between one or more layers of animation effects and animation resources, the first animation effect is played on the first area of the desktop.
  • the motion effect is pre-configured with a touch area where the user can perform interactive operations. For example, during the process of playing the first motion effect, it is detected that the user's operation on the first touch area included in the first motion effect stops playing the first motion effect. For another example, in the process of playing the first motion effect, it is detected that the user operates the second touch area included in the first motion effect, and the first motion effect is played again.
  • the touch area is used to indicate an area corresponding to a preset dynamic interaction position.
  • the application program has a preset duration for playing the animation effect
  • the animation module may stop playing the corresponding animation effect after the duration of playing the animation effect satisfies the duration of the animation effect. This prevents resources from taking too long and affecting the playback of subsequent animation effects. Or, occupy the display space of the desktop and affect the display of desktop elements. For example, the first motion effect with a preset duration is played on the first area of the desktop.
  • the electronic device maintains a dynamic effect play queue
  • the dynamic effect play queue is used to store the dynamic effect events corresponding to the dynamic effects to be played
  • the dynamic effect events include the identification of the application corresponding to the dynamic effects to be played, the One or more of the latest play time of the animation effect, the mark of the animation event corresponding to the linkage animation effect of the animation effect to be played, and the animation resource information of the animation effect to be played.
  • the electronic device after determining to play the first motion effect, the electronic device removes the motion effect event corresponding to the first motion effect out of the motion effect playing queue.
  • the first motion effect and the third desktop element are pre-configured with a linkage motion effect. Then, during the process of playing the first motion effect in the first area, the third motion effect of the third desktop element is played in the fourth area of the desktop.
  • the fourth area includes an area other than the area occupied by the third desktop element.
  • the relevant content of the linkage motion effect can refer to the above-mentioned related content shown in FIG. 8 , FIG. 12-FIG. 15 , and FIG. 17 , which will not be repeated here.
  • the desktop dynamic effect display method provided by the embodiment of the present application can also display application-related information in areas other than the area where the application icon or card is located, such as displaying the full-screen dynamic effect of the application, so that the desktop dynamic effect can contain more application information, and supports developers to customize dynamic display effects, which can increase user interactivity and improve user experience.
  • the desktop animation display method provided by the embodiment of the present application has been described in detail above with reference to FIGS. 5-24 .
  • the desktop dynamic effect display device provided by the embodiment of the present application will be described in detail below with reference to FIG. 25 .
  • FIG. 25 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • an electronic device 2500 may include: a display unit 2501 and a processing unit 2502 .
  • the electronic device 2500 may be used to implement the functions of the electronic device involved in the foregoing method embodiments.
  • the display unit 2501 is configured to support the electronic device 2500 to display interface content; and/or support the electronic device 2500 to execute S2107 in FIG. 21 ; and/or support the electronic device 2500 to execute S2401 and S2403 in FIG. 24 .
  • the processing unit 2502 is configured to support the electronic device 2500 to execute S2101-S2106 and S2108-S2113 in FIG. 21 ; and/or, support the electronic device 2500 to execute S2402 in FIG. 24 .
  • the electronic device 2500 may further include a transceiver unit (not shown in FIG. 25 ), which can receive a user's touch operation on the desktop.
  • the transceiving unit may include a receiving unit and a transmitting unit, may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module.
  • the operation and/or function of each unit in the electronic device 2500 is to realize the corresponding flow of the desktop dynamic effect display method described in the above method embodiment, and all relevant content of each step involved in the above method embodiment can be referred to the corresponding
  • the description of the functions of the functional units will not be repeated here.
  • the electronic device 2500 shown in FIG. 25 may further include a storage unit (not shown in FIG. 25 ), where programs or instructions are stored.
  • a storage unit not shown in FIG. 25
  • programs or instructions are stored.
  • the display unit 2501 and the processing unit 2502 execute the program or instruction
  • the electronic device 2500 shown in FIG. 25 can execute the method for displaying the desktop with dynamic effects described in the above method embodiments.
  • the technical effect of the electronic device 2500 shown in FIG. 25 can refer to the technical effect of the method for displaying desktop dynamic effects described in the above method embodiments, which will not be repeated here.
  • the technical solution provided in this application may also be a functional unit or a chip in the electronic device, or a device matched with the electronic device.
  • the embodiment of the present application also provides a chip system, including: a processor, the processor is coupled with a memory, and the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the The system on chip implements the method in any one of the foregoing method embodiments.
  • processors in the chip system there may be one or more processors in the chip system.
  • the processor can be realized by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software codes stored in a memory.
  • the memory may be integrated with the processor, or may be configured separately from the processor, which is not limited in this embodiment of the present application.
  • the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips.
  • the arrangement manner of the memory and the processor is not specifically limited.
  • the chip system may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated chip (AP device application specific integrated circuit, ASIC), or a system on chip (system on chip, SoC ), it can also be a central processing unit (central processor unit, CPU), it can also be a network processor (network processor, NP), it can also be a digital signal processing circuit (digital signal processor, DSP), it can also be a microcontroller (micro controller unit, MCU), can also be a programmable controller (programmable logic device, PLD) or other integrated chips.
  • FPGA field programmable gate array
  • ASIC application specific integrated circuit
  • SoC system on chip
  • CPU central processing unit
  • CPU central processor unit, NP
  • DSP digital signal processing circuit
  • microcontroller micro controller unit, MCU
  • PLD programmable logic device
  • each step in the foregoing method embodiments may be implemented by an integrated logic circuit of hardware in a processor or instructions in the form of software.
  • the method steps disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is run on the computer, the computer is made to perform the above-mentioned related steps, so as to realize the above-mentioned embodiment.
  • the desktop animation display method is a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is run on the computer, the computer is made to perform the above-mentioned related steps, so as to realize the above-mentioned embodiment.
  • An embodiment of the present application further provides a computer program product, which, when running on a computer, causes the computer to execute the above-mentioned related steps, so as to realize the method for displaying the desktop with dynamic effects in the above-mentioned embodiment.
  • the apparatus, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding method provided above. Therefore, the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
  • the steps of the methods or algorithms described in connection with the disclosure of the embodiments of the present application may be implemented in the form of hardware, or may be implemented in the form of a processor executing software instructions.
  • the software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (random access memory, RAM), flash memory, read only memory (read only memory, ROM), erasable programmable read-only memory (erasable programmable ROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM), registers, hard disk, removable hard disk, CD-ROM, or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium.
  • the storage medium may also be a component of the processor.
  • the processor and the storage medium may be located in an application specific integrated circuit (AP device application specific integrated circuit, ASIC).
  • the disclosed method may be implemented in other ways.
  • the device embodiments described above are illustrative only.
  • the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored, or not.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules or units may be in electrical, mechanical or other forms.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • Computer-readable storage media include but are not limited to any of the following: U disk, mobile hard disk, read-only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, etc.
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk or optical disk etc.
  • Various media that can store program code include but are not limited to any of the following: U disk, mobile hard disk, read-only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, etc.
  • Various media that can store program code include but are not limited to any of the following: U disk, mobile hard disk, read-only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, etc.

Landscapes

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

Abstract

The present application relates to the technical field of terminals. Provided are a method for displaying a dynamic effect on a desktop, and an electronic device. By means of the electronic device of the present application, a dynamic effect of a first desktop element can be played in an area, other than a display area for displaying the first desktop element, on a desktop, thereby enriching the expression content of the desktop, and improving the usage experience of a user. The method comprises: during the process of displaying a desktop, an electronic device determining a dynamic effect for playing a first desktop element among desktop elements, which operation can be performed in an area other than a display area for displaying the first desktop element.

Description

桌面动效显示方法及电子设备Desktop dynamic effect display method and electronic device
本申请要求于2021年09月18日提交国家知识产权局、申请号为202111113324.2、发明名称为“桌面动效显示方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office on September 18, 2021, with application number 202111113324.2, and the title of the invention is "Desktop dynamic display method and electronic equipment", the entire content of which is incorporated herein by reference. Applying.
技术领域technical field
本申请实施例涉及终端技术领域,尤其涉及一种桌面动效显示方法及电子设备。The embodiments of the present application relate to the technical field of terminals, and in particular, to a desktop dynamic display method and an electronic device.
背景技术Background technique
随着终端技术的发展,电子设备(如手机、平板等)桌面显示内容越来越丰富,在显示桌面的过程中,用户就可以快速获得应用的相关信息,并且能够增加电子设备桌面显示的趣味性。With the development of terminal technology, the desktop display content of electronic devices (such as mobile phones, tablets, etc.) is becoming more and more abundant. During the process of displaying the desktop, users can quickly obtain relevant application information, and can increase the interest of the desktop display of electronic devices. sex.
示例性的,如图1中(a)所示界面101,手机显示应用程序图标,在应用图标周围显示数字提示信息,用户可以通过数字提示信息,快速获知应用的相关信息。比如,电子邮件应用图标11上显示的数字提示信息为3,用于表示待处理邮件数量为3。又比如,应用商城图标12上显示数字提示信息为5,用于表示待更新应用数量为5。但是可以看出,数字提示信息表达的内容有限。Exemplarily, on the interface 101 shown in (a) of FIG. 1 , the mobile phone displays application program icons, and digital prompt information is displayed around the application icon, and the user can quickly learn application-related information through the digital prompt information. For example, the number prompt information displayed on the email application icon 11 is 3, which is used to indicate that the number of emails to be processed is 3. For another example, the number prompt information displayed on the application store icon 12 is 5, which is used to indicate that the number of applications to be updated is 5. However, it can be seen that the content expressed by the digital prompt information is limited.
又示例性的,如图1中(b)所示界面102,手机通过显示卡片,提供应用的部分功能。如界面102上显示的天气卡片13,为用户快速提供实时天气信息。或者,如界面102上显示的时钟卡片14,为用户快速提供时间信息。但是,卡片只能在卡片所在的区域内显示部分应用信息,表达的内容同样有限。As another example, as shown in the interface 102 in (b) of FIG. 1 , the mobile phone provides some functions of the application by displaying a card. For example, the weather card 13 displayed on the interface 102 quickly provides users with real-time weather information. Alternatively, as the clock card 14 displayed on the interface 102, time information can be quickly provided to the user. However, the card can only display part of the application information in the area where the card is located, and the expressed content is also limited.
发明内容Contents of the invention
为了解决上述的技术问题,本申请实施例提供了一种桌面动效显示方法及电子设备。本申请实施例提供的技术方案,电子设备能够在桌面上用于显示第一桌面元素的显示区域以外的区域播放第一桌面元素的动效,丰富桌面表达内容,提升用户使用体验。In order to solve the above-mentioned technical problems, the embodiments of the present application provide a desktop dynamic effect display method and an electronic device. According to the technical solution provided by the embodiment of the present application, the electronic device can play the dynamic effect of the first desktop element in the area other than the display area used to display the first desktop element on the desktop, enrich the content of the desktop expression, and improve the user experience.
为了实现上述的技术目的,本申请实施例提供了如下技术方案:In order to achieve the above-mentioned technical purpose, the embodiment of the present application provides the following technical solutions:
第一方面,提供一种桌面动效显示方法,应用于电子设备。该方法包括:显示桌面,桌面包括第一桌面元素。确定播放第一桌面元素的第一动效。在桌面的第一区域播放第一动效,第一区域包括第一桌面元素所占区域以外的区域。In a first aspect, a method for displaying a desktop with dynamic effects is provided, which is applied to an electronic device. The method includes: displaying a desktop, the desktop including a first desktop element. Determine to play the first motion effect of the first desktop element. The first motion effect is played on the first area of the desktop, and the first area includes the area other than the area occupied by the first desktop element.
示例性的,电子设备显示桌面,桌面包括的桌面元素例如为应用图标、卡片、文件夹、状态栏等。其中,播放第一动效的第一桌面元素可以是桌面元素中包括的第一桌面元素对应的卡片、图标。Exemplarily, the electronic device displays a desktop, and the desktop includes desktop elements such as application icons, cards, folders, status bars, and the like. Wherein, the first desktop element playing the first dynamic effect may be a card or an icon corresponding to the first desktop element included in the desktop element.
如此,电子设备能够实现在桌面上显示第一桌面元素的动效,并且第一桌面元素的动效能够显示在第一桌面元素的显示区域以外的区域。从而能够丰富表达内容,为用户提供更好的动效体验。In this way, the electronic device can display the dynamic effect of the first desktop element on the desktop, and the dynamic effect of the first desktop element can be displayed in an area other than the display area of the first desktop element. This can enrich the expression content and provide users with a better dynamic experience.
根据第一方面,在确定播放第一动效之前,方法还包括:确定具有播放第一动效的动效播放环境;动效播放环境包括桌面上不存在第一内容和/或第二内容,第一内容 为影响第一动效的播放效果的内容,第二内容为显示效果会被第一动效的播放所影响的内容。According to the first aspect, before determining to play the first dynamic effect, the method further includes: determining a dynamic playback environment that plays the first dynamic effect; the dynamic playback environment includes that the first content and/or the second content do not exist on the desktop, The first content is the content that affects the playback effect of the first animation, and the second content is the content whose display effect will be affected by the playback of the first animation.
示例性的,第一内容或第二内容可以为桌面上正在播放的动效,或者悬浮窗口等桌面元素。Exemplarily, the first content or the second content may be a dynamic effect being played on the desktop, or a desktop element such as a floating window.
如此,在播放第一动效之前先对桌面的动效播放环境进行确定,保证在第一动效播放过程中不会被桌面正在播放的动效或显示的其他内容所影响,也不会影响桌面正在播放的动效的播放或者影响桌面上显示的其他内容,从而保证桌面动效的播放效果。In this way, before playing the first animation effect, first determine the animation playback environment of the desktop, so as to ensure that it will not be affected by the animation effect or other content displayed on the desktop during the playback of the first animation effect, nor will it be affected The playback of the dynamic effect being played on the desktop may affect other content displayed on the desktop, so as to ensure the playback effect of the desktop dynamic effect.
根据第一方面,或者以上第一方面的任意一种实现方式,显示第一内容的第二区域与第一区域中的第一关键区域相交,第一区域与显示第二内容的第三区域中的第二关键区域相交。According to the first aspect, or any implementation of the above first aspect, the second area displaying the first content intersects with the first key area in the first area, and the first area intersects with the third area displaying the second content The second critical region of .
可选的,关键区域可以为用户能够与动效进行交互的触控区域。部分动效可能全部显示区域均为关键区域,或者不存在关键区域。Optionally, the key area may be a touch area where the user can interact with the dynamic effect. For some animation effects, all display areas may be key areas, or there may be no key areas.
示例性的,假设动效A的播放区域为a,关键区域为a1;动效B的播放区域为b,关键区域为b1。动效模块在播放动效A的过程中,确定需要播放动效B。动效模块确定播放区域b不影响关键区域a1,播放区域a不影响关键区域b1,那么动效模块可在播放动效A的过程中播放动效B。Exemplarily, it is assumed that the play area of motion effect A is a, and the key area is a1; the play area of motion effect B is b, and the key area is b1. During the playback of animation effect A, the animation module determines that animation B needs to be played. The dynamic effect module determines that the playback area b does not affect the key area a1, and the playback area a does not affect the key area b1, then the dynamic effect module can play the animation effect B during the playback of the animation effect A.
根据第一方面,或者以上第一方面的任意一种实现方式,第一内容或第二内容为悬浮窗口显示的内容或在桌面播放的动效内容。According to the first aspect, or any implementation manner of the above first aspect, the first content or the second content is the content displayed in the floating window or the dynamic content played on the desktop.
根据第一方面,或者以上第一方面的任意一种实现方式,桌面还包括第二桌面元素,方法还包括:获取播放第二桌面元素的第二动效的需求。若不具有播放第二动效的动效播放环境,电子设备不播放第二动效,或者在确定第二动效延迟播放时推迟至具有播放第二动效的动效播放环境时播放第二动效。According to the first aspect, or any implementation manner of the above first aspect, the desktop further includes a second desktop element, and the method further includes: acquiring a requirement for playing a second motion effect of the second desktop element. If there is no dynamic playback environment for playing the second dynamic effect, the electronic device does not play the second dynamic effect, or delays playing the second dynamic effect when it is determined that the second dynamic effect is delayed until it is played in a dynamic playback environment with the second dynamic effect. Motion.
在一些实施例中,电子设备接收到第二桌面元素的动效请求后,可确定获取到播放第二桌面元素的第二动效的需求。或者,电子设备获取到动效播放队列中的位于队头的动效事件,确定该动效事件为第二桌面元素的动效对应的动效事件,那么电子设备可确定获取到播放第二桌面元素的第二动效的需求。那么之后,电子设备可确定是否具有播放第二桌面元素的动效的播放环境,以确定是否可以播放动效。如确定当前暂不能播放第二动效,可确定第二动效是否具有时限要求。比如,第二动效具有时限要求,超出时限要求再播放动效不具备提醒用户的意义,可不再播放第二动效。或者,第二动效不具有时限要求,或者还未到时限要求的时限,可延迟播放。可选的,可以由第二桌面元素对应的应用确定第二动效是否具有时限要求,或者由动效模块确定第二动效是否具有时限要求。In some embodiments, after receiving the motion effect request of the second desktop element, the electronic device may determine to acquire a need to play the second motion effect of the second desktop element. Or, the electronic device obtains the dynamic effect event at the head of the dynamic effect playing queue, and determines that the dynamic effect event is the dynamic effect event corresponding to the dynamic effect of the second desktop element, then the electronic device can determine that the second desktop element is played The need for the second animation effect of the element. Afterwards, the electronic device can determine whether there is a playing environment for playing the dynamic effect of the second desktop element, so as to determine whether the dynamic effect can be played. If it is determined that the second animation effect cannot be played temporarily, it can be determined whether the second animation effect has a time limit requirement. For example, the second animation effect has a time limit requirement. Playing the animation effect beyond the time limit does not have the meaning of reminding the user, so the second animation effect can no longer be played. Or, the second motion effect does not have a time limit requirement, or the time limit required by the time limit has not yet been reached, and the playback can be delayed. Optionally, the application corresponding to the second desktop element may determine whether the second motion effect has a time limit requirement, or the motion effect module may determine whether the second motion effect has a time limit requirement.
如此,即使桌面当前不具有动效播放环境,对于部分动效还是可以实现延迟播放,保证用户的动效播放体验。In this way, even if the desktop does not currently have a dynamic playback environment, it is still possible to implement delayed playback for some dynamic effects to ensure the user's dynamic playback experience.
根据第一方面,或者以上第一方面的任意一种实现方式,桌面还包括第三桌面元素,方法还包括:确定第一动效与第三桌面元素预配置有联动动效。在第一区域播放第一动效的过程中,在桌面的第四区域播放第三桌面元素的第三动效。According to the first aspect, or any implementation manner of the above first aspect, the desktop further includes a third desktop element, and the method further includes: determining that the first motion effect and the third desktop element are pre-configured with a linkage motion effect. During the process of playing the first motion effect in the first area, the third motion effect of the third desktop element is played in the fourth area of the desktop.
可选的,第四区域包括第三桌面元素所占的区域以外的区域。Optionally, the fourth area includes an area other than the area occupied by the third desktop element.
在一些实施例中,开发者在配置应用程序动效的过程中,可以配置应用程序动效 是否可以联动其他应用程序、以及是否需要联动电子设备的硬件功能。比如,若可以联动其他应用程序,可预先与可以联动的应用程序的开发者确定联动的动效播放效果,将对应的联动动效配置到联动的应用程序中,并且在本应用程序中配置联动动效指示。那么,后续在应用程序在请求播放动效的过程中,可以向动效模块发送携带联动动效指示的动效请求,并且联动指示中包括需要联动的应用程序的标识(如应用ID)。动效模块在接收到动效请求后,可以根据其中的联动指示确定标识,之后根据标识将联动动效指示转发至对应的应用程序。那么该需要联动的应用程序根据联动动效指示,向动效模块发送联动动效请求,进而实现播放联动动效。又比如,若需要联动电子设备的硬件功能,开发者在应用程序动效中配置需要的硬件。那么后续在动效请求过程中,动效模块可以获知请求播放的动效需要哪些硬件功能,可向launcher请求调用硬件功能,如请求音频模块播放动效声音。其中,联动的应用程序的数量可以为一个或多个。In some embodiments, during the process of configuring the animation of the application, the developer can configure whether the animation of the application can be linked with other applications, and whether it needs to be linked with the hardware functions of the electronic device. For example, if other applications can be linked, you can determine the linkage animation playback effect with the developer of the application that can be linked in advance, configure the corresponding linkage animation in the linkage application, and configure the linkage in this application Animation instructions. Then, in the process of requesting to play the animation effect, the application program can send a motion effect request carrying a linkage animation indication to the animation module, and the linkage indication includes the identification (such as the application ID) of the application program that needs linkage. After the motion effect module receives the motion effect request, it can determine the identifier according to the linkage instruction therein, and then forward the linkage motion effect instruction to the corresponding application program according to the identifier. Then the application program that needs linkage sends a linkage animation request to the animation module according to the linkage animation indication, so as to realize the linkage animation playback. For another example, if the hardware function of the linked electronic device is required, the developer configures the required hardware in the application animation. Then, during the subsequent animation request process, the animation module can know which hardware functions are required for the requested animation, and can request the launcher to call hardware functions, such as requesting the audio module to play the animation sound. Wherein, the number of linked application programs may be one or more.
如此,通过全屏桌面动效,能够为用户显示更多的应用程序对应的信息,并且能够实现智能联动,帮助用户更加简便的使用电子设备,提升用户使用体验。In this way, through the full-screen desktop dynamic effect, more information corresponding to the application program can be displayed for the user, and intelligent linkage can be realized to help the user use the electronic device more easily and improve the user experience.
根据第一方面,或者以上第一方面的任意一种实现方式,在确定播放第一桌面元素的动效之前,方法还包括:确定第一桌面元素对应的第一应用具有动效播放权限。According to the first aspect, or any implementation manner of the above first aspect, before determining to play the dynamic effect of the first desktop element, the method further includes: determining that the first application corresponding to the first desktop element has the permission to play the dynamic effect.
在一些实施例中,应用程序播放动效需要获得电子设备动效播放的权限,动效模块在确定应用程序具有动效播放权限后,可播放动效。比如,动效模块在接收到应用程序发送的动效请求后,确定该应用程序不具备动效播放权限,则显示提示信息,用于提示用户确认是否允许该应用程序播放动效。若用户允许,则获得动效播放权限(即获得用户授权),还可以保存该动效播放权限。又比如,电子设备在设置应用中提供动效播放权限设置入口,允许用户对动效播放权限进行设置。再比如,在应用程序中预置动效播放权限设置入口,允许用户在应用程序中对该应用程序的动效播放权限进行设置。可选的,动效模块每一次在接收到动效请求后,均需对应用程序动效播放权限进行确定,避免由于用户更改设置导致的动效播放权限变化,保存的动效播放权限与用户设置的动效播放权限不同,出现异常,影响用户使用体验。In some embodiments, the application program needs to obtain the permission to play the animation effect of the electronic device, and the animation effect module can play the animation effect after determining that the application program has the permission to play the animation effect. For example, after receiving the motion effect request sent by the application program, the motion effect module determines that the application program does not have the permission to play the motion effect, and then displays a prompt message for prompting the user to confirm whether to allow the application program to play the motion effect. If the user allows it, the permission to play the dynamic effect is obtained (that is, authorized by the user), and the permission to play the dynamic effect can also be saved. For another example, the electronic device provides a dynamic effect playback permission setting entry in the setting application, allowing the user to set the dynamic effect playback permission. For another example, an entry for setting the animation playback permission is preset in the application, allowing the user to set the animation playback permission of the application in the application. Optionally, each time the animation module receives an animation request, it needs to determine the application animation playback permission to avoid changes in the animation playback permission caused by the user changing the settings, and the saved animation playback permission is consistent with the user's The set animation playback permissions are different, and abnormalities occur, which affect the user experience.
根据第一方面,或者以上第一方面的任意一种实现方式,在桌面的第一区域播放第一动效之前,方法还包括:获取第一动效的动效资源信息;动效资源信息包括第一动效的动效资源的存储位置和/或第一动效对应的动效图层的信息;动效图层的数量为一层或多层,动效资源包括一个或多个资源,动效图层的信息包括一层或多层动效图层与一个或多个资源的对应关系;其中,动效资源的存储位置用于获取动效资源,动效图层的信息用于确定播放第一动效的图层。According to the first aspect, or any implementation manner of the above first aspect, before playing the first animation effect in the first area of the desktop, the method further includes: acquiring the animation resource information of the first animation effect; the animation resource information includes The storage location of the dynamic resource of the first dynamic effect and/or the information of the dynamic effect layer corresponding to the first dynamic effect; the number of dynamic effect layers is one or more layers, and the dynamic effect resource includes one or more resources, The information of the dynamic effect layer includes the corresponding relationship between one or more layers of the dynamic effect layer and one or more resources; among them, the storage location of the dynamic effect resource is used to obtain the dynamic effect resource, and the information of the dynamic effect layer is used to determine Play the layer for the first animation.
在一些实施例中,电子设备在显示桌面的过程中,应用程序检测到触发事件,向动效模块请求可用的动效图层。动效模块向应用程序发送动效图层的信息(如可用的动效图层为3层),应用程序根据获得的动效图层的信息以及开发者预置的选择规则,选择其中的一层或多层动效图层,如选择了其中1层动效图层,可将选择的动效图层的信息以及相应的动效资源的存储位置发送至动效模块。动效模块获得存储位置存储的动效资源并在应用程序选择的动效图层绘制动效,绘制完成后在桌面播放动效。可选的,应用程序中也可以预配置有可用的动效图层的信息。那么,应用程序在检测到 触发事件后,可以不必向动效模块请求可用的动效图层信息。In some embodiments, when the electronic device is displaying the desktop, the application program detects a trigger event and requests an available dynamic effect layer from the dynamic effect module. The dynamic effect module sends the information of the dynamic effect layer to the application program (for example, the available dynamic effect layer is 3 layers), and the application program selects one of them according to the obtained information of the dynamic effect layer and the selection rules preset by the developer. One or more layers of dynamic effect layers, if one of the dynamic effect layers is selected, the information of the selected dynamic effect layer and the storage location of the corresponding dynamic effect resources can be sent to the dynamic effect module. The dynamic effect module obtains the dynamic effect resource stored in the storage location and draws the dynamic effect on the dynamic effect layer selected by the application program, and plays the dynamic effect on the desktop after the drawing is completed. Optionally, information about available dynamic layers may also be preconfigured in the application. Then, after the application detects the trigger event, it does not need to request the available dynamic layer information from the dynamic effect module.
一些实施例中,动效的动效资源可以存储在不同的存储位置,或者全部存储在相同的存储位置。此外,不同的动效资源对应的动效可以在相同或不相同的动效图层上进行播放。动效资源的存储位置和用于播放的动效图层的信息可预配置在应用程序中,如开发者在应用程序开发过程中可将这些信息预配置在应用程序中。那么后续电子设备在确定需要进行动效播放时,可以根据预配置信息,获取动效资源,确定对应的动效图层,实现动效播放。In some embodiments, the animation resources of the animation can be stored in different storage locations, or all of them can be stored in the same storage location. In addition, the animation effects corresponding to different animation resources can be played on the same or different animation layers. The storage location of the animation resource and the information of the animation layer used for playback can be preconfigured in the application, for example, the developer can preconfigure these information in the application during the development of the application. Then, when the subsequent electronic device determines that it needs to play the dynamic effect, it can obtain the dynamic effect resource according to the pre-configured information, determine the corresponding dynamic effect layer, and realize the dynamic effect playback.
如此,电子设备根据预配置信息能够实现自动的动效播放,降低用户操作难度,提升用户使用体验。In this way, the electronic device can automatically play dynamic effects according to the pre-configured information, reduce the difficulty of user operation, and improve user experience.
根据第一方面,或者以上第一方面的任意一种实现方式,动效资源信息为第一桌面元素对应的第一应用根据桌面包括的桌面元素和可选图层确定,可选图层包括第一应用确定的一层或多层动效图层。According to the first aspect, or any implementation of the above first aspect, the dynamic effect resource information is the first application corresponding to the first desktop element determined according to the desktop elements and optional layers included in the desktop, and the optional layers include the first One or more dynamic effect layers determined by the application.
在一些实施例中,动效模块在接收到应用程序发送的动效请求后,向该应用程序发送桌面元素。应用程序根据桌面元素,确定电子设备中是否安装有需要联动的应用程序,在确定电子设备安装有需要联动的应用程序后,再向动效模块发送联动动效指示,以播放联动动效。或者,应用程序能根据桌面元素,确定动效的显示效果。如请求动效的卡片确定附近显示有应用图标,可以指示动效模块在附近的应用图标上显示动效。In some embodiments, the motion effect module sends the desktop element to the application program after receiving the motion effect request sent by the application program. According to the desktop elements, the application program determines whether there is an application program that needs linkage installed in the electronic device, and then sends a linkage animation effect instruction to the animation module to play the linkage animation effect after it is determined that the electronic device has the application program that needs linkage installed. Or, the application program can determine the display effect of the dynamic effect according to the desktop elements. If the card requesting the animation determines that there is an application icon displayed nearby, the animation module may be instructed to display the animation on the nearby application icon.
示例性的,假设电子设备中应用A(对应于卡片A)配置有动效,且该动效可以联动应用C(对应于卡片C)共同显示联动动效。动效模块接收到应用A发送的动效请求,获取桌面元素信息(显示有卡片C),并将桌面元素信息发送至应用A。应用A根据桌面元素信息,确定电子设备安装有应用C,则将联动动效对应的联动动效指示和动效资源信息(如包括动效资源的存储位置)发送至动效模块,动效模块将其中的联动动效指示转发至应用C,再由应用C确定是否显示联动动效。若应用C确定显示联动动效,可向动效模块发送动效请求。那么假设联动动效包括在卡片A上添加表情和花环、卡片C变化显示位置、以及由卡片C向卡片A献花。那么,动效模块根据接收到的应用A发送的动效资源信息和应用C发送的动效资源信息,实现动效播放。Exemplarily, it is assumed that application A (corresponding to card A) in the electronic device is configured with a motion effect, and the motion effect can be linked with application C (corresponding to card C) to jointly display the motion effect. The dynamic effect module receives the dynamic effect request sent by application A, obtains the desktop element information (displayed with card C), and sends the desktop element information to application A. Application A determines that application C is installed on the electronic device according to the desktop element information, then sends the linkage animation indication corresponding to the linkage animation effect and the animation resource information (such as including the storage location of the animation resource) to the animation module, and the animation module The linkage motion effect indication therein is forwarded to application C, and then application C determines whether to display the linkage motion effect. If the application C determines to display the linked motion effect, it can send a motion effect request to the motion effect module. Then assume that the linkage effect includes adding emoticons and garlands on card A, changing the display position of card C, and presenting flowers from card C to card A. Then, the dynamic effect module implements dynamic effect playback according to the received dynamic effect resource information sent by application A and the dynamic effect resource information sent by application C.
如此,电子设备可以根据桌面元素显示情况,实现不同的动效播放效果,使得动效播放效果更能满足用户需求,为用户提供更好的动效播放体验。In this way, the electronic device can realize different dynamic playback effects according to the display conditions of the desktop elements, so that the dynamic playback effects can better meet user needs and provide users with a better dynamic playback experience.
根据第一方面,或者以上第一方面的任意一种实现方式,方法还包括:在播放第一动效的过程中,检测到用户对第一动效中包括的第一触控区域的操作,停止播放第一动效。According to the first aspect, or any implementation manner of the above first aspect, the method further includes: during the process of playing the first motion effect, detecting the user's operation on the first touch area included in the first motion effect, Stop playing the first animation.
根据第一方面,或者以上第一方面的任意一种实现方式,方法还包括:在播放第一动效的过程中,检测到用户对第一动效中包括的第二触控区域的操作,重新播放第一动效。According to the first aspect, or any implementation manner of the above first aspect, the method further includes: during the process of playing the first animation effect, detecting the user's operation on the second touch area included in the first animation effect, Play the first animation again.
在一些实施例中,开发者在配置应用程序动效的过程中,可以配置动效中的特定位置的触摸焦点,该触摸焦点用于表示预设动效互动位置对应的触控区域,用户可以通过该触控区域与动效进行交互,如指示停止播放动效、重新播放动效等。进一步的,还可以配置触摸焦点对应的命令含义。那么后续,电子设备在播放动效的过程中,检 测到用户在触摸焦点上的操作后,则执行对应的命令。进一步的,电子设备检测到用户在未配置触摸焦点的位置上的操作(即在触控区域以外的区域上的操作),导致焦点击穿,动效模块确定需要停止动效播放,穿透触摸焦点执行触摸位置对应的桌面控件对应的命令,从而降低动效对桌面操作的干扰。In some embodiments, during the process of configuring the application animation, the developer can configure the touch focus at a specific position in the animation. The touch focus is used to indicate the touch area corresponding to the preset animation interaction position. The user can Interact with the animation effect through the touch area, such as instructing to stop playing the animation effect, replay the animation effect, etc. Furthermore, the command meaning corresponding to the touch focus can also be configured. Then, after the electronic device detects the user's operation on the touch focus during the process of playing the dynamic effect, it executes the corresponding command. Furthermore, the electronic device detects the user's operation on a position where the touch focus is not configured (that is, an operation on an area other than the touch area), which causes the focus to break through. The focus executes the command corresponding to the desktop control corresponding to the touch position, thereby reducing the interference of motion effects on desktop operations.
如此,电子设备在播放动效的过程中,通过触摸焦点实现与用户进行交互,提高用户参与感,提升用户使用体验。In this way, during the process of playing the dynamic effect, the electronic device can interact with the user by touching the focus, so as to improve the user's sense of participation and user experience.
根据第一方面,或者以上第一方面的任意一种实现方式,在桌面的第一区域播放第一动效,包括:在桌面的第一区域播放预设时长的第一动效。According to the first aspect, or any implementation manner of the above first aspect, playing the first motion effect in the first area of the desktop includes: playing the first motion effect with a preset duration in the first area of the desktop.
在一些实施例中,应用程序中预设有动效播放时长,在播放动效的时间满足动效播放时长后,动效模块可停止播放对应动效。从而防止资源占用时间过长,影响后续动效的播放。或者,占用桌面显示空间,影响桌面元素显示。In some embodiments, the application program has a preset duration for playing the animation effect, and the animation module may stop playing the corresponding animation effect after the duration of playing the animation effect satisfies the duration of the animation effect. This prevents resources from taking too long and affecting the playback of subsequent animation effects. Or, occupy the display space of the desktop and affect the display of desktop elements.
根据第一方面,或者以上第一方面的任意一种实现方式,电子设备维护动效播放队列,动效播放队列用于保存待播放的动效对应的动效事件,动效事件包括待播放的动效对应的应用的标识、待播放的动效的最晚播放时间、待播放的动效的联动动效对应的动效事件的标记、待播放的动效的动效资源信息中的一项或多项内容。According to the first aspect, or any implementation of the above first aspect, the electronic device maintains a dynamic effect play queue, and the dynamic effect play queue is used to save the dynamic effect events corresponding to the dynamic effects to be played, and the dynamic effect events include the dynamic effect events to be played One of the identifier of the application corresponding to the animation, the latest play time of the animation to be played, the mark of the animation event corresponding to the linkage animation of the animation to be played, and the animation resource information of the animation to be played or multiple items.
在一些实施例中,动效模块在接收到动效请求后,会确认动效请求对应的应用的标识,并在记录在对应的动效事件中,以便于后续需要与该应用进行信号交互的时候,能够确认对应的应用。此外,部分动效具有时限要求,超出时限要求再播放该动效则不具备提醒用户的意义,因此动效模块在建立动效事件的过程中,可确定对应的动效是否有时限要求,如有确定对应的待播放的动效的最晚播放时间。那么后续假设动效模块在确定可播放某动效时,已超出该动效的最晚播放时间,可确定是否需要延迟播放。此外,部分动效可以与其他应用程序的动效进行联合播放,即可播放联动动效。因此,动效模块在接收到包括两个或两个以上的动效的联动动效时,需要将这些动效对应的动效事件进行标记(即添加待播放的动效的联动动效对应的动效事件的标记),如把联动动效包括的两个动效对应的两个动效事件均标记为1,那么后续动效模块在确定播放其中一个动效时,还需要确定另一个动效是否可以播放,从而实现播放联动动效。此外,动效模块实现动效播放需要预先获得待播放的动效的动效资源信息,因此在创建动效事件的过程中动效模块可以从对应的应用处获得动效资源信息。In some embodiments, after receiving the motion effect request, the motion effect module will confirm the identification of the application corresponding to the motion effect request, and record it in the corresponding motion effect event, so as to facilitate subsequent signal interaction with the application. time, the corresponding application can be confirmed. In addition, some animation effects have a time limit requirement, and playing the animation effect beyond the time limit requirement does not have the meaning of reminding the user. Therefore, the animation module can determine whether the corresponding animation effect has a time limit requirement during the process of creating a dynamic effect event, such as Determine the latest play time of the corresponding motion effect to be played. Then, it is subsequently assumed that when the motion effect module determines that a certain motion effect can be played, the latest play time of the motion effect has exceeded, and it can be determined whether to delay the playback. In addition, some animation effects can be played jointly with animation effects of other applications, that is, linkage animation effects can be played. Therefore, when the motion effect module receives a linkage motion effect that includes two or more motion effects, it needs to mark the motion effect events corresponding to these motion effects (that is, add the motion effect corresponding to the motion effect to be played). mark of the dynamic effect event), if the two dynamic effect events corresponding to the two dynamic effects included in the linkage dynamic effect are marked as 1, then the subsequent dynamic effect module needs to determine the other dynamic effect when it determines to play one of the dynamic effects Whether the effect can be played, so as to realize the playback linkage effect. In addition, the dynamic effect module needs to obtain the dynamic effect resource information of the dynamic effect to be played in advance to realize the dynamic effect playback, so the dynamic effect module can obtain the dynamic effect resource information from the corresponding application during the process of creating the dynamic effect event.
根据第一方面,或者以上第一方面的任意一种实现方式,在确定播放第一桌面元素的第一动效之后,方法还包括:将第一动效对应的动效事件移出动效播放队列。According to the first aspect, or any implementation manner of the above first aspect, after determining to play the first motion effect of the first desktop element, the method further includes: moving the motion event corresponding to the first motion effect out of the motion effect play queue .
在一些实施例中,动效模块维护一个动效播放队列,用于对待播放的动效进行排序。动效播放过程满足生产者消费模式,其中生产者为请求播放动效的应用程序,缓存区用于保存动效播放队列,消费者为动效模块。比如,动效模块维护两个线程(如线程1和线程2),线程1用于根据应用程序发送的动效请求,生成对应的动效事件并将动效事件放入动效播放队列中,线程2用于从动效播放队列的队头取出动效事件,以实现动效播放。具体的,动效模块在接收到动效请求后,生成对应的动效事件置于动效播放队列的队尾(如动效播放队列为空,则生成的动效事件放入动效播放队列后位于队头)。之后,动效模块再接收到动效请求后,按照接收动效请求的顺序,依次在动效播放队列中排列对应的动效事件。动效模块按照动效播放队列中动效事件的顺 序,从位于队头的动效事件开始,依次确定是否播放对应的动效。在确定播放某动效时,可将该动效对应的动效事件移出动效播放队列。从而动效模块在开始播放一个动效后,可以查看动效播放队列是否为空,若不为空,则确定当前队头动效是否可以播放,若可以播放,可移出该队头动效并播放。即每一次动效模块都是在确定位于队头的动效是否可以播放。In some embodiments, the dynamic effect module maintains a dynamic effect play queue for sorting the dynamic effects to be played. The animation playback process satisfies the producer consumption mode, where the producer is the application program that requests to play animation effects, the buffer area is used to save the animation playback queue, and the consumer is the animation module. For example, the animation module maintains two threads (such as thread 1 and thread 2). Thread 1 is used to generate corresponding animation events according to the animation request sent by the application and put the animation events into the animation playback queue. Thread 2 is used to take out the dynamic effect event from the head of the dynamic effect playback queue to realize the dynamic effect playback. Specifically, after the animation module receives the animation request, it generates a corresponding animation event and places it at the end of the animation playback queue (if the animation playback queue is empty, the generated animation event is placed in the animation playback queue at the head of the queue). Afterwards, after the animation effect module receives the animation effect request, it arranges the corresponding animation effect events in the animation effect playback queue in sequence according to the order in which the animation effect request is received. The dynamic effect module determines whether to play the corresponding dynamic effect sequentially, starting from the dynamic effect event at the head of the queue according to the sequence of the dynamic effect events in the dynamic effect playback queue. When it is determined to play a certain motion effect, the motion effect event corresponding to the motion effect may be removed from the motion effect playback queue. Therefore, after the dynamic effect module starts to play a dynamic effect, it can check whether the dynamic effect playback queue is empty. If it is not empty, determine whether the current queue head animation can be played. If it can be played, the queue head animation can be removed and play. That is, each animation module is to determine whether the animation at the head of the queue can be played.
如此,电子设备通过维护动效播放队列,实现有序的动效播放,提升动效处理效率,为用户提供更好的动效播放体验。In this way, the electronic device realizes orderly animation playback by maintaining the animation playback queue, improves animation processing efficiency, and provides users with a better animation playback experience.
第二方面,提供一种桌面动效显示方法,应用于电子设备。电子设备的桌面上显示有第一应用对应的第一桌面元素;方法包括:检测到播放第一应用的第一动效的触发事件。确定第一动效的动效资源信息;动效资源信息包括第一动效的动效资源的存储位置和/或第一动效对应的动效图层的信息;动效图层的数量为一层或多层,动效资源包括一个或多个资源,动效图层的信息包括一层或多层动效图层与一个或多个资源的对应关系;动效资源信息用于在桌面的第一区域播放第一动效,第一区域包括第一桌面元素所占区域以外的区域。In a second aspect, a desktop dynamic effect display method is provided, which is applied to electronic equipment. A first desktop element corresponding to the first application is displayed on the desktop of the electronic device; the method includes: detecting a trigger event of playing a first motion effect of the first application. Determine the dynamic effect resource information of the first dynamic effect; the dynamic effect resource information includes the storage location of the dynamic effect resource of the first dynamic effect and/or the information of the dynamic effect layer corresponding to the first dynamic effect; the number of dynamic effect layers is One or more layers, the dynamic effect resource includes one or more resources, and the information of the dynamic effect layer includes the corresponding relationship between one or more layers of dynamic effect layers and one or more resources; the dynamic effect resource information is used to The first animation effect is played in the first area, and the first area includes an area other than the area occupied by the first desktop element.
根据第二方面,动效资源信息为第一桌面元素对应的第一应用根据桌面包括的桌面元素和可选图层确定,可选图层包括第一应用确定的一层或多层动效图层。According to the second aspect, the dynamic effect resource information is determined by the first application corresponding to the first desktop element according to the desktop elements and optional layers included in the desktop, and the optional layers include one or more layers of dynamic effect images determined by the first application layer.
根据第二方面,或者以上第二方面的任意一种实现方式,第一应用具有动效播放权限。According to the second aspect, or any implementation manner of the above second aspect, the first application has permission to play dynamic effects.
根据第二方面,或者以上第二方面的任意一种实现方式,第一桌面元素包括第一桌面元素对应的第一应用的卡片和/或图标。According to the second aspect, or any implementation manner of the above second aspect, the first desktop element includes a card and/or icon of the first application corresponding to the first desktop element.
第二方面以及第二方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。For the second aspect and the technical effects corresponding to any one of the implementations in the second aspect, refer to the above-mentioned first aspect and the technical effects corresponding to any one of the implementations in the first aspect, which will not be repeated here.
第三方面,提供一种电子设备。该电子设备包括:处理器、存储器和触摸屏,存储器、触摸屏与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器从存储器中读取计算机指令,使得电子设备执行:显示桌面,桌面包括第一桌面元素。确定播放第一桌面元素的第一动效。在桌面的第一区域播放第一动效,第一区域包括第一桌面元素所占区域以外的区域。In a third aspect, an electronic device is provided. The electronic device includes: a processor, a memory and a touch screen, the memory, the touch screen and the processor are coupled, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor reads the computer instructions from the memory, the electronic device executes : display the desktop, and the desktop includes the first desktop element. Determine to play the first motion effect of the first desktop element. The first motion effect is played on the first area of the desktop, and the first area includes the area other than the area occupied by the first desktop element.
根据第三方面,当处理器从存储器中读取计算机指令,还使得电子设备执行如下操作:确定具有播放第一动效的动效播放环境;动效播放环境包括桌面上不存在第一内容和/或第二内容,第一内容为影响第一动效的播放效果的内容,第二内容为显示效果会被第一动效的播放所影响的内容。According to the third aspect, when the processor reads the computer instruction from the memory, it also causes the electronic device to perform the following operations: determine the dynamic playback environment that plays the first dynamic effect; the dynamic playback environment includes that the first content does not exist on the desktop and /or the second content, the first content is the content that affects the playback effect of the first animation effect, and the second content is the content whose display effect will be affected by the playback of the first animation effect.
根据第三方面,或者以上第三方面的任意一种实现方式,显示第一内容的第二区域与第一区域中的第一关键区域相交,第一区域与显示第二内容的第三区域中的第二关键区域相交。According to the third aspect, or any implementation of the above third aspect, the second area displaying the first content intersects with the first key area in the first area, and the first area intersects with the third area displaying the second content The second critical region of .
根据第三方面,或者以上第三方面的任意一种实现方式,第一内容或第二内容为悬浮窗口显示的内容或在桌面播放的动效内容。According to the third aspect, or any implementation manner of the above third aspect, the first content or the second content is the content displayed in the floating window or the dynamic content played on the desktop.
根据第三方面,或者以上第三方面的任意一种实现方式,桌面还包括第二桌面元素,当处理器从存储器中读取计算机指令,还使得电子设备执行如下操作:获取播放第二桌面元素的第二动效的需求。若不具有播放第二动效的动效播放环境,电子设备 不播放第二动效,或者在确定第二动效延迟播放时推迟至具有播放第二动效的动效播放环境时播放第二动效。According to the third aspect, or any implementation manner of the above third aspect, the desktop further includes a second desktop element, and when the processor reads computer instructions from the memory, the electronic device is also made to perform the following operations: acquire and play the second desktop element The demand for the second motion effect. If there is no dynamic playback environment for playing the second dynamic effect, the electronic device does not play the second dynamic effect, or delays playing the second dynamic effect when it is determined that the second dynamic effect is delayed until it is played in a dynamic playback environment with the second dynamic effect. Motion.
根据第三方面,或者以上第三方面的任意一种实现方式,桌面还包括第三桌面元素,当处理器从存储器中读取计算机指令,还使得电子设备执行如下操作:确定第一动效与第三桌面元素预配置有联动动效。在第一区域播放第一动效的过程中,在桌面的第四区域播放第三桌面元素的第三动效。According to the third aspect, or any implementation manner of the above third aspect, the desktop further includes a third desktop element, and when the processor reads computer instructions from the memory, the electronic device is also made to perform the following operations: determine the first motion effect and The third desktop element is pre-configured with a linkage motion effect. During the process of playing the first motion effect in the first area, the third motion effect of the third desktop element is played in the fourth area of the desktop.
根据第三方面,或者以上第三方面的任意一种实现方式,当处理器从存储器中读取计算机指令,还使得电子设备执行如下操作:确定第一桌面元素对应的第一应用具有动效播放权限。According to the third aspect, or any implementation manner of the above third aspect, when the processor reads the computer instruction from the memory, the electronic device is further made to perform the following operation: determine that the first application corresponding to the first desktop element has a dynamic playback authority.
根据第三方面,或者以上第三方面的任意一种实现方式,当处理器从存储器中读取计算机指令,还使得电子设备执行如下操作:获取第一动效的动效资源信息;动效资源信息包括第一动效的动效资源的存储位置和/或第一动效对应的动效图层的信息;动效图层的数量为一层或多层,动效资源包括一个或多个资源,动效图层的信息包括一层或多层动效图层与一个或多个资源的对应关系;其中,动效资源的存储位置用于获取动效资源,动效图层的信息用于确定播放第一动效的图层。According to the third aspect, or any implementation of the above third aspect, when the processor reads the computer instructions from the memory, the electronic device is also made to perform the following operations: obtain the dynamic effect resource information of the first dynamic effect; The information includes the storage location of the animation resource of the first animation and/or the information of the animation layer corresponding to the first animation; the number of animation layers is one or more layers, and the animation resource includes one or more Resource, the information of the dynamic effect layer includes the corresponding relationship between one or more layers of the dynamic effect layer and one or more resources; where the storage location of the dynamic effect resource is used to obtain the dynamic effect resource, and the information of the dynamic effect layer is used for Used to determine the layer to play the first animation.
根据第三方面,或者以上第三方面的任意一种实现方式,动效资源信息为第一桌面元素对应的第一应用根据桌面包括的桌面元素和可选图层确定,可选图层包括第一应用确定的一层或多层动效图层。According to the third aspect, or any implementation of the above third aspect, the dynamic effect resource information is the first application corresponding to the first desktop element determined according to the desktop elements and optional layers included in the desktop, and the optional layers include the first One or more dynamic effect layers determined by the application.
根据第三方面,或者以上第三方面的任意一种实现方式,当处理器从存储器中读取计算机指令,还使得电子设备执行如下操作:在播放第一动效的过程中,检测到用户对第一动效中包括的第一触控区域的操作,停止播放第一动效。According to the third aspect, or any implementation manner of the above third aspect, when the processor reads the computer instructions from the memory, the electronic device also causes the electronic device to perform the following operations: During the process of playing the first motion effect, it is detected that the user The operation of the first touch area included in the first motion effect stops playing the first motion effect.
根据第三方面,或者以上第三方面的任意一种实现方式,当处理器从存储器中读取计算机指令,还使得电子设备执行如下操作:在播放第一动效的过程中,检测到用户对第一动效中包括的第二触控区域的操作,重新播放第一动效。According to the third aspect, or any implementation manner of the above third aspect, when the processor reads the computer instructions from the memory, the electronic device also causes the electronic device to perform the following operations: During the process of playing the first motion effect, it is detected that the user The operation of the second touch area included in the first motion effect replays the first motion effect.
根据第三方面,或者以上第三方面的任意一种实现方式,在桌面的第一区域播放第一动效,包括:在桌面的第一区域播放预设时长的第一动效。According to the third aspect, or any implementation manner of the above third aspect, playing the first motion effect in the first area of the desktop includes: playing the first motion effect with a preset duration in the first area of the desktop.
根据第三方面,或者以上第三方面的任意一种实现方式,第一桌面元素包括第一桌面元素对应的第一应用的卡片和/或图标。According to the third aspect, or any implementation manner of the above third aspect, the first desktop element includes a card and/or icon of the first application corresponding to the first desktop element.
根据第三方面,或者以上第三方面的任意一种实现方式,电子设备维护动效播放队列,动效播放队列用于保存待播放的动效对应的动效事件,动效事件包括待播放的动效对应的应用的标识、待播放的动效的最晚播放时间、待播放的动效的联动动效对应的动效事件的标记、待播放的动效的动效资源信息中的一项或多项内容。According to the third aspect, or any implementation of the above third aspect, the electronic device maintains a dynamic effect play queue, and the dynamic effect play queue is used to save the dynamic effect events corresponding to the dynamic effects to be played, and the dynamic effect events include the dynamic effect events to be played One of the identifier of the application corresponding to the animation, the latest play time of the animation to be played, the mark of the animation event corresponding to the linkage animation of the animation to be played, and the animation resource information of the animation to be played or multiple items.
根据第三方面,或者以上第三方面的任意一种实现方式,当处理器从存储器中读取计算机指令,还使得电子设备执行如下操作:将第一动效对应的动效事件移出动效播放队列。According to the third aspect, or any implementation of the above third aspect, when the processor reads the computer instruction from the memory, it also makes the electronic device perform the following operation: move the animation event corresponding to the first animation effect out of the animation playback queue.
第三方面以及第三方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。For the technical effect corresponding to the third aspect and any one of the implementations in the third aspect, please refer to the above-mentioned first aspect and the technical effect corresponding to any one of the implementations in the first aspect, which will not be repeated here.
第四方面,提供一种电子设备。该电子设备包括:处理器、存储器和触摸屏,存储器、触摸屏与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括 计算机指令,当处理器从存储器中读取计算机指令,使得电子设备执行:检测到播放第一应用的第一动效的触发事件。确定第一动效的动效资源信息;动效资源信息包括第一动效的动效资源的存储位置和/或第一动效对应的动效图层的信息;动效图层的数量为一层或多层,动效资源包括一个或多个资源,动效图层的信息包括一层或多层动效图层与一个或多个资源的对应关系;动效资源信息用于在桌面的第一区域播放第一动效,第一区域包括第一桌面元素所占区域以外的区域。In a fourth aspect, an electronic device is provided. The electronic device includes: a processor, a memory and a touch screen, the memory, the touch screen and the processor are coupled, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor reads the computer instructions from the memory, the electronic device executes : A trigger event of playing the first motion effect of the first application is detected. Determine the dynamic effect resource information of the first dynamic effect; the dynamic effect resource information includes the storage location of the dynamic effect resource of the first dynamic effect and/or the information of the dynamic effect layer corresponding to the first dynamic effect; the number of dynamic effect layers is One or more layers, the dynamic effect resource includes one or more resources, and the information of the dynamic effect layer includes the corresponding relationship between one or more layers of dynamic effect layers and one or more resources; the dynamic effect resource information is used to The first animation effect is played in the first area, and the first area includes an area other than the area occupied by the first desktop element.
根据第四方面,动效资源信息为第一桌面元素对应的第一应用根据桌面包括的桌面元素和可选图层确定,可选图层包括第一应用确定的一层或多层动效图层。According to the fourth aspect, the dynamic effect resource information is determined by the first application corresponding to the first desktop element according to the desktop elements and optional layers included in the desktop, and the optional layers include one or more layers of dynamic effect images determined by the first application layer.
根据第四方面,或者以上第四方面的任意一种实现方式,第一应用具有动效播放权限。According to the fourth aspect, or any implementation manner of the above fourth aspect, the first application has permission to play dynamic effects.
根据第四方面,或者以上第四方面的任意一种实现方式,第一桌面元素包括第一桌面元素对应的第一应用的卡片和/或图标。According to the fourth aspect, or any implementation manner of the above fourth aspect, the first desktop element includes a card and/or icon of the first application corresponding to the first desktop element.
第四方面以及第四方面中任意一种实现方式所对应的技术效果,可参见上述第二方面及第二方面中任意一种实现方式所对应的技术效果,此处不再赘述。For the fourth aspect and the technical effects corresponding to any one of the implementations in the fourth aspect, refer to the above-mentioned second aspect and the technical effects corresponding to any one of the implementations in the second aspect, which will not be repeated here.
第五方面,本申请实施例提供一种电子设备,该电子设备具有实现如上述第一方面及其中任一种可能的实现方式中所述的桌面动效显示方法的功能;或者,该电子设备具有实现如上述第二方面及其中任一种可能的实现方式中所述的桌面动效显示方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应地软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In the fifth aspect, the embodiment of the present application provides an electronic device, which has the function of realizing the desktop dynamic effect display method as described in the above-mentioned first aspect and any possible implementation; or, the electronic device It has the function of realizing the desktop dynamic effect display method described in the above second aspect and any possible implementation manner. This function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions.
第五方面以及第五方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。For the fifth aspect and the technical effects corresponding to any one of the implementations in the fifth aspect, please refer to the above-mentioned first aspect and the technical effects corresponding to any one of the implementations in the first aspect, which will not be repeated here.
第六方面,提供一种计算机可读存储介质。计算机可读存储介质存储有计算机程序(也可称为指令或代码),当该计算机程序被电子设备执行时,使得电子设备执行第一方面或第一方面中任意一种实施方式的方法;或者,使得电子设备执行第二方面或第二方面中任意一种实施方式的方法。In a sixth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as an instruction or code), and when the computer program is executed by the electronic device, the electronic device executes the first aspect or the method in any one of the implementation manners of the first aspect; or , so that the electronic device executes the second aspect or the method in any one implementation manner of the second aspect.
第六方面以及第六方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。For the sixth aspect and the technical effects corresponding to any one of the implementations in the sixth aspect, please refer to the above-mentioned first aspect and the technical effects corresponding to any one of the implementations in the first aspect, which will not be repeated here.
第七方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行第一方面或第一方面中任意一种实施方式的方法;或者,使得电子设备执行第二方面或第二方面中任意一种实施方式的方法。In the seventh aspect, the embodiments of the present application provide a computer program product. When the computer program product is run on the electronic device, the electronic device is made to execute the method in the first aspect or any one of the implementation manners in the first aspect; or, to make the electronic device The device executes the second aspect or the method in any one implementation manner of the second aspect.
第七方面以及第七方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。For the technical effect corresponding to the seventh aspect and any one of the implementation manners in the seventh aspect, refer to the above-mentioned first aspect and the technical effect corresponding to any one of the implementation manners in the first aspect, which will not be repeated here.
第八方面,本申请实施例提供一种电路***,电路***包括处理电路,处理电路被配置为执行第一方面或第一方面中任意一种实施方式的方法;或者,处理电路被配置为执行第二方面或第二方面中任意一种实施方式的方法。In an eighth aspect, the embodiment of the present application provides a circuit system, the circuit system includes a processing circuit, and the processing circuit is configured to execute the method in the first aspect or any one of the implementation manners in the first aspect; or, the processing circuit is configured to execute The second aspect or the method in any one of the implementation manners in the second aspect.
第八方面以及第八方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。For the technical effect corresponding to the eighth aspect and any one of the implementation manners in the eighth aspect, refer to the above-mentioned first aspect and the technical effect corresponding to any one of the implementation manners in the first aspect, which will not be repeated here.
第九方面,本申请实施例提供一种芯片***,包括至少一个处理器和至少一个接口电路,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,当 至少一个处理器执行指令时,至少一个处理器执行第一方面或第一方面中任意一种实施方式的方法;或者,至少一个处理器执行第二方面或第二方面中任意一种实施方式的方法。In the ninth aspect, the embodiment of the present application provides a chip system, including at least one processor and at least one interface circuit, at least one interface circuit is used to perform the function of sending and receiving, and send instructions to at least one processor, when at least one processor When executing the instruction, at least one processor executes the method of the first aspect or any one of the implementation manners of the first aspect; or, at least one processor executes the second aspect or the method of any one of the implementation manners of the second aspect.
第九方面以及第九方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。For the technical effect corresponding to the ninth aspect and any one of the implementation manners in the ninth aspect, refer to the above-mentioned first aspect and the technical effect corresponding to any one of the implementation manners in the first aspect, which will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的界面示意图一;Figure 1 is a schematic interface diagram 1 provided by the embodiment of the present application;
图2为本申请实施例提供的电子设备的形态的示意图;FIG. 2 is a schematic diagram of the form of an electronic device provided by an embodiment of the present application;
图3为本申请实施例提供的电子设备的硬件结构示意图;FIG. 3 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application;
图4A为本申请实施例提供的电子设备的软件结构框图示意图;FIG. 4A is a schematic diagram of a software structure block diagram of an electronic device provided in an embodiment of the present application;
图4B为本申请实施例提供的桌面动效显示的场景示意图;FIG. 4B is a schematic diagram of a desktop dynamic display scene provided by an embodiment of the present application;
图5为本申请实施例提供的界面示意图二;Fig. 5 is the interface schematic diagram 2 provided by the embodiment of the present application;
图6为本申请实施例提供的图层示意图一;FIG. 6 is a schematic diagram of layers provided in the embodiment of the present application;
图7为本申请实施例提供的图层触摸焦点示意图;Fig. 7 is a schematic diagram of layer touch focus provided by the embodiment of the present application;
图8为本申请实施例提供的界面示意图三;Figure 8 is a schematic diagram of the third interface provided by the embodiment of the present application;
图9为本申请实施例提供的图层示意图二;FIG. 9 is a second schematic diagram of layers provided by the embodiment of the present application;
图10为本申请实施例提供的界面示意图四;Figure 10 is a schematic diagram of the fourth interface provided by the embodiment of this application;
图11为本申请实施例提供的界面示意图五;Figure 11 is a schematic diagram of the fifth interface provided by the embodiment of this application;
图12为本申请实施例提供的界面示意图六;Figure 12 is the sixth schematic diagram of the interface provided by the embodiment of this application;
图13为本申请实施例提供的界面示意图七;Figure 13 is the seventh schematic diagram of the interface provided by the embodiment of this application;
图14为本申请实施例提供的界面示意图八;Figure 14 is the eighth schematic diagram of the interface provided by the embodiment of this application;
图15为本申请实施例提供的界面示意图九;Figure 15 is a schematic diagram of the ninth interface provided by the embodiment of this application;
图16为本申请实施例提供的界面示意图十;Figure 16 is a tenth schematic diagram of the interface provided by the embodiment of this application;
图17为本申请实施例提供的界面示意图十一;Figure 17 is the eleventh schematic diagram of the interface provided by the embodiment of this application;
图18为本申请实施例提供的界面示意图十二;Figure 18 is a schematic interface diagram twelve provided by the embodiment of this application;
图19为本申请实施例提供的界面示意图十三;Figure 19 is a schematic diagram of the interface provided by the embodiment of this application thirteen;
图20为本申请实施例提供的界面示意图十四;Figure 20 is a schematic diagram of the fourteenth interface provided by the embodiment of this application;
图21为本申请实施例提供的桌面动效显示方法流程图一;Fig. 21 is a flow chart 1 of the desktop dynamic effect display method provided by the embodiment of the present application;
图22为本申请实施例提供的界面示意图十五;Figure 22 is a schematic diagram of the fifteenth interface provided by the embodiment of this application;
图23为本申请实施例提供的界面示意图十六;Figure 23 is a sixteenth schematic diagram of the interface provided by the embodiment of this application;
图24为本申请实施例提供的桌面动效显示方法流程图二;Fig. 24 is the second flow chart of the desktop dynamic effect display method provided by the embodiment of the present application;
图25为本申请实施例提供的电子设备的结构示意图。FIG. 25 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个或 两个以上(包含两个)。The technical solutions in the embodiments of the present application are described below with reference to the drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to include Expressions such as "one or more" unless the context clearly dictates otherwise. It should also be understood that in the following embodiments of the present application, "at least one" and "one or more" refer to one or more than two (including two).
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。术语“连接”包括直接连接和间接连接,除非另外说明。“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。Reference to "one embodiment" or "some embodiments" or the like in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "including", "comprising", "having" and variations thereof mean "including but not limited to", unless specifically stated otherwise. The term "connected" includes both direct and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only, and should not be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features.
在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplarily" or "for example" are used as examples, illustrations or descriptions. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a concrete manner.
本申请实施例提供的桌面动效显示方法,可以应用于电子设备。例如,如图2所示,该电子设备具体可以是手机21、笔记本电脑22、平板电脑23、大屏显示设备24、可穿戴设备(如智能手表,智能手环等)25、车载设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、人工智能(artificial intelligence)设备等具有显示功能的终端设备。电子设备安装的操作***包括但不限于
Figure PCTCN2022116535-appb-000001
Figure PCTCN2022116535-appb-000002
或者其它操作***。在一些实施例中,电子设备可以为固定式设备,也可以为便携式设备。本申请对电子设备的具体类型、所安装的操作***均不作限制。
The desktop dynamic effect display method provided in the embodiment of the present application can be applied to electronic devices. For example, as shown in Figure 2, the electronic device can specifically be a mobile phone 21, a notebook computer 22, a tablet computer 23, a large-screen display device 24, a wearable device (such as a smart watch, a smart bracelet, etc.) 25, a vehicle-mounted device, a super Terminal devices with display functions such as mobile personal computers (ultra-mobile personal computer, UMPC), netbooks, personal digital assistants (personal digital assistant, PDA), artificial intelligence (artificial intelligence) devices, and the like. Operating systems installed on electronic devices include but are not limited to
Figure PCTCN2022116535-appb-000001
Figure PCTCN2022116535-appb-000002
or other operating systems. In some embodiments, the electronic device may be a fixed device or a portable device. This application does not limit the specific type of electronic equipment or the installed operating system.
图3本申请实施例提供的一种电子设备结构示意图。FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 etc. .
可以理解的是,本申请实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure shown in the embodiment of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the illustrations, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(AP设备plication processor,AP设备),调制解调处理器,图形处理器(grAP设备hics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP device replication processor, AP device), a modem processor, a graphics processor (grAP device hics processing unit, GPU) , image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit , NPU) etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行 指令的控制。The controller can generate operation control signals according to instruction opcodes and timing signals, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备充电,也可以用于电子设备与***设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他第二电子设备,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and peripheral devices. It can also be used to connect headphones and play audio through them. The interface can also be used to connect other second electronic devices, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为第二电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device. While the charging management module 140 is charging the battery 142 , it can also provide power for the second electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
无线通信模块160可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system, etc. (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在一些实施例中,电子设备的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯***(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位***(global positioning system,GPS),全球导航卫星***(global navigation satellite system,GLONASS),北斗卫星导航***(beidou navigation satellite system,BDS),准天顶卫星***(quasi-zenith satellite system,QZSS)和/或星基增强***(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device realizes the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crySTA设备l display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (liquid crySTA device l display, LCD), an organic light-emitting diode (organic light-emitting diode, OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
在一些实施例中,电子设备检测到解锁操作,或检测到退出应用程序返回桌面的操作后,显示桌面。在通过显示屏194显示桌面的过程中,应用程序检测到触发桌面动效的事件(如天气应用检测到天气提醒事件)则向动效模块请求播放动效。之后,电子设备通过动效模块在显示屏194上显示桌面动效。In some embodiments, after the electronic device detects an unlocking operation, or detects an operation of exiting an application program and returning to the desktop, the desktop is displayed. In the process of displaying the desktop through the display screen 194, if the application detects an event that triggers the desktop animation (eg, the weather application detects a weather reminder event), it requests the animation module to play the animation. Afterwards, the electronic device displays desktop dynamic effects on the display screen 194 through the dynamic effect module.
传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。The sensor module 180 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
触摸传感器,也称“触控器件”。触摸传感器可以设置于显示屏194,由触摸传感器与显示屏194组成触摸屏,也称“触控屏”。触摸传感器用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器也可以设置于电子设备的表面,与显示屏194所处的位置不同。Touch sensor, also known as "touch device". The touch sensor can be arranged on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also called “touch screen”. The touch sensor is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In some other embodiments, the touch sensor may also be disposed on the surface of the electronic device, which is different from the position of the display screen 194 .
在一些实施例中,电子设备在显示桌面动效的过程中,通过触摸传感器检测到用户在桌面动效预设焦点位置的操作,则执行对应的操作。如检测到用户点击桌面动效中预设的关闭动效焦点的操作,则退出桌面动效,显示桌面。又或者,电子设备在显示桌面动效的过程中,通过触摸传感器检测到用户在桌面动效除预设焦点以外的操作,则退出桌面动效,响应于触摸位置执行对应的操作。如电子设备在显示桌面动效的过程中,通过触摸传感器检测到用户点击应用程序图标的操作,则退出桌面动效,启动该应用程序图标对应的应用程序。In some embodiments, during the process of displaying the desktop dynamic effect, the electronic device detects the user's operation at the preset focus position of the desktop dynamic effect through the touch sensor, and then executes the corresponding operation. If it is detected that the user clicks the preset operation of closing the focus of the animation in the desktop animation, the desktop animation is exited and the desktop is displayed. Alternatively, during the process of displaying the desktop animation, the electronic device detects the user's operation on the desktop animation other than the preset focus through the touch sensor, then exits the desktop animation, and performs corresponding operations in response to the touch position. If the electronic device detects through the touch sensor that the user clicks the application program icon during the process of displaying the desktop dynamic effect, the desktop dynamic effect will be exited, and the application program corresponding to the application program icon will be started.
电子设备可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device can realize the shooting function through ISP, camera 193 , video codec, GPU, display screen 194 and application processor.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。The internal memory 121 may be used to store computer-executable program codes including instructions. The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. The processor 110 executes various functional applications and data processing of the electronic device by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
电子设备可以通过音频模块170,以及应用处理器等实现音频功能。例如音乐播放,录音等。音频模块170可以包括扬声器,受话器,麦克风,耳机接口等。用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The electronic device can realize the audio function through the audio module 170 and the application processor. Such as music playback, recording, etc. The audio module 170 may include a speaker, a receiver, a microphone, an earphone jack, and the like. It is used to convert digital audio information to analog audio signal output, and also to convert analog audio input to digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键 信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过***SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。The SIM card interface 195 is used for connecting a SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to realize contact and separation with the electronic device. The electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
电子设备的软件***可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android***为例,示例性说明电子设备的软件结构。The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In this embodiment of the present application, the Android system with layered architecture is taken as an example to illustrate the software structure of the electronic device.
图4A是本申请实施例的电子设备的软件结构框图。FIG. 4A is a block diagram of the software structure of the electronic device according to the embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android***分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和***库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
应用程序层可以包括一系列应用程序包。The application layer can consist of a series of application packages.
如图4A所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in FIG. 4A, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图4A所示,应用程序框架层可以包括窗口管理器,内容提供器,视图***,资源管理器,通知管理器,电话管理器,动效模块等。As shown in FIG. 4A , the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, a phone manager, a dynamic effect module, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断 等)。The phone manager is used to provide communication functions of electronic devices. For example, the management of call status (including connected, hung up, etc.).
动效模块用于管理桌面动效,如控制桌面全屏动效的播放、停止等。The dynamic effect module is used to manage desktop dynamic effects, such as controlling the play and stop of desktop full-screen dynamic effects.
示例性的,如图4B所示,电子设备中通过动效模块42作为桌面(如launcher)43和应用程序41的中介者或接口,传输交互消息,以实现播放应用程序41对应的动效。应用程序41在检测到播放动效的触发事件后,向动效模块42发送动效请求,用于请求播放动效。动效模块42基于动效请求确定应用程序41具有动效播放权限后,从应用程序41获取待播放的动效的动效资源的存储位置。之后,动效模块42判断当前是否有桌面动效播放环境,若具有桌面动效播放环境(如桌面未播放动效,或正在播放的动效与请求播放的动效互不影响播放效果),可根据动效资源的存储位置获得动效资源,以播放动效。如通过launcher 43播放动效。进一步的,若动效播放还可能需要硬件支持,则动效模块42请求launcher 43调用硬件资源。如动效播放过程需要播放声音,则动效模块42通过launcher 43调用电子设备的音频模块在播放动效的过程中播放声音。Exemplarily, as shown in FIG. 4B , the electronic device uses the motion effect module 42 as an intermediary or interface between the desktop (such as launcher) 43 and the application program 41 to transmit interactive messages, so as to realize the motion effect corresponding to the playback application program 41 . After the application program 41 detects the trigger event of playing the animation effect, it sends an animation effect request to the animation effect module 42 for requesting to play the animation effect. After the motion effect module 42 determines that the application program 41 has the permission to play the motion effect based on the motion effect request, it obtains the storage location of the motion effect resource of the motion effect to be played from the application program 41 . Afterwards, the dynamic effect module 42 judges whether there is a desktop dynamic effect playback environment at present, if there is a desktop dynamic effect playback environment (such as the desktop does not play the dynamic effect, or the dynamic effect being played and the dynamic effect requested to play do not affect the playback effect each other), The dynamic effect resource can be obtained according to the storage location of the dynamic effect resource to play the dynamic effect. Such as playing animation effects through launcher 43. Further, if the dynamic effect playback may also require hardware support, the dynamic effect module 42 requests the launcher 43 to invoke hardware resources. If the dynamic effect playback process needs to play sound, the dynamic effect module 42 calls the audio module of the electronic device through the launcher 43 to play sound during the dynamic effect playback process.
在一些实施例中,如图4B所示,动效模块42可以封装在launcher 43中,作为launcher 43应用中的模块。那么在上述动效播放的交互过程中,应用程序41可以直接与launcher 43交互,实现动效播放。或者,动效模块42也可以作为一个独立的应用,单独封装,实现动效播放。可选的,动效模块42也可以描述为动效应用(application)、全屏动效APP、动效服务、动效管理服务等,对此本申请实施例不做限制,无论该模块的名称是什么,只要是具备类似功能的模块,符合本申请实施例提供的方法的技术思路,都应涵盖在本申请的保护范围之内。In some embodiments, as shown in FIG. 4B, the dynamic effect module 42 can be packaged in the launcher 43 as a module in the application of the launcher 43. Then, during the interactive process of the above-mentioned dynamic effect playback, the application program 41 can directly interact with the launcher 43 to realize the dynamic effect playback. Alternatively, the dynamic effect module 42 can also be used as an independent application, packaged separately to realize dynamic effect playback. Optionally, the dynamic effect module 42 can also be described as a dynamic effect application (application), a full-screen dynamic effect APP, a dynamic effect service, a dynamic effect management service, etc., which is not limited in this embodiment of the present application, no matter the name of the module is Anything, as long as it is a module with similar functions and conforms to the technical idea of the method provided by the embodiment of this application, should be covered within the scope of protection of this application.
需要说明的是,上述请求播放动效的应用程序可以为电子设备中安装的原生APP,也可以为电子设备中安装的三方APP。其中,原生APP为电子设备厂商提供的APP,如手机中的短信应用为原生APP。三方APP为其他厂商提供的APP,如手机中的
Figure PCTCN2022116535-appb-000003
应用为三方APP。
It should be noted that, the above-mentioned application program requesting to play the animation effect may be a native APP installed in the electronic device, or a third-party APP installed in the electronic device. Among them, the native APP is an APP provided by an electronic device manufacturer, such as a text message application in a mobile phone is a native APP. The third-party APP is the APP provided by other manufacturers, such as the mobile phone
Figure PCTCN2022116535-appb-000003
The application is a three-party APP.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓***的调度和管理。Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)等。A system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
在一些实施例中,电子设备在安装应用程序后,可以在桌面显示应用程序图标、应用程序卡片、包含应用程序图标的文件夹中的一项或几项。可选的,桌面上还会显示电子设备状态栏,用于显示电子设备状态,如网络连接状态、电池电量状态等。其中,电子设备的桌面元素包括上述桌面上显示的内容。可选的,可以申请播放动效的桌面元素可以是其中的部分桌面元素,如应用程序卡片、应用程序图标。In some embodiments, after the application is installed on the electronic device, one or more of the application icon, the application card, and the folder containing the application icon may be displayed on the desktop. Optionally, an electronic device status bar may also be displayed on the desktop for displaying the status of the electronic device, such as network connection status, battery power status, and the like. Wherein, the desktop element of the electronic device includes the above content displayed on the desktop. Optionally, the desktop elements that can be applied for playing animation effects may be some of the desktop elements, such as application cards and application icons.
示例性的,如图5中(a)所示界面501,界面501显示的为电子设备桌面。在桌面上显示有应用程序图标,如时钟图标51。桌面上还显示有应用程序卡片,如音乐应用卡片52。桌面上还显示有包含应用程序图标的文件夹53。其中如图5中(b)所示界面502,为电子设备检测到用户点击文件夹53的操作后,显示的界面,用于显示文件夹中包含的应用程序图标,进一步的,如图5中(a)所示界面501,桌面上还可以显示状态栏,如附图标记54指示的虚线框内的所示,状态栏中可以显示电子设备的电量等信息。Exemplarily, an interface 501 is shown in (a) of FIG. 5 , and the interface 501 displays a desktop of an electronic device. Application program icons, such as a clock icon 51, are displayed on the desktop. Application cards, such as the music application card 52, are also displayed on the desktop. Also displayed on the desktop is a folder 53 containing application program icons. Among them, the interface 502 shown in (b) in FIG. 5 is an interface displayed after the electronic device detects that the user clicks on the folder 53, and is used to display the application program icons contained in the folder. Further, as shown in FIG. 5 In the interface 501 shown in (a), a status bar can also be displayed on the desktop, as shown in the dotted line box indicated by reference numeral 54 , information such as the power of the electronic device can be displayed in the status bar.
在一些实施例中,电子设备显示桌面的过程中,运行应用服务的应用程序可以申请播放桌面动效。比如,桌面显示的卡片能够运行应用服务,可以申请播放动效。如时钟应用卡片,能够支持跟随时间变化,变化显示卡片内容,因此在运行应用服务。又比如,桌面显示的应用图标对应的应用程序中,后台运行的应用程序能够运行应用服务,可以申请播放动效。但是,若应用程序未在后台运行,那么桌面显示该应用程序的图标,也不能申请播放桌面动效。In some embodiments, when the electronic device displays the desktop, the application program running the application service may request to play the desktop dynamic effect. For example, the cards displayed on the desktop can run application services, and can apply to play animation effects. For example, the clock application card can support changing with the time and display the content of the card, so the application service is running. For another example, among the application programs corresponding to the application icons displayed on the desktop, the application programs running in the background can run application services, and can apply for playing animation effects. However, if the application is not running in the background, the icon of the application is displayed on the desktop, and application for playing desktop animation cannot be applied.
如此,运行应用服务的应用程序在电子设备显示桌面的过程中,能够申请进行全屏动效显示。相对于现有技术中的只能在应用程序图标或卡片所在的区域内显示应用程序的部分信息,本申请实施例提供的桌面动效显示方法,在应用程序图标或卡片所在的区域以外的区域也可以显示应用的相关信息,如显示应用的全屏动效,使得桌面动效可以包含更多的应用程序信息,并且支持开发者自定义动效显示效果,能够增加用户的交互性,提升用户使用体验。In this way, the application program running the application service can apply for full-screen dynamic display when the electronic device displays the desktop. Compared with the prior art that can only display part of the information of the application program in the area where the application program icon or card is located, the desktop dynamic effect display method provided by the embodiment of the present application can display information in areas other than the area where the application program icon or card is located. It can also display application-related information, such as displaying the full-screen animation of the application, so that the desktop animation can contain more application information, and supports developers to customize the animation display effect, which can increase user interactivity and improve user usage experience.
在一些实施例中,开发者在应用程序开发过程中,可以根据需求为应用程序添加应用程序的动效,以及触发应用程序动效的触发事件。那么后续,电子设备在显示桌面的过程中,应用程序检测到触发事件后,可向动效模块申请播放动效。其中,开发者在应用程序开发包中预置动效的相关信息,例如预置动效的动效资源(如动效播放过程中需要的图片资源、文字资源、视频资源等)、动效播放时长等信息。触发事件包括与应用功能属性相关的触发事件。比如,日历应用具有添加日程的功能,开发者在日历应用中预置的触发事件为满足用户设置的日程提醒条件,那么日历应用在检测到触发事件后,可向动效模块请求播放动效,如在桌面上播放日程提醒信息等。下文结合具体场景对触发事件可能的实现方式进行具体介绍,在此不再赘述。In some embodiments, during the application development process, the developer may add application animations and trigger events for triggering the application animations to the application according to requirements. Then, later, when the electronic device is displaying the desktop, after the application program detects the trigger event, it can apply to the dynamic effect module to play the dynamic effect. Among them, the developer presets information related to motion effects in the application development kit, such as motion effect resources for preset motion effects (such as image resources, text resources, video resources, etc. required during animation playback), animation playback duration and other information. Trigger events include trigger events related to application function attributes. For example, the calendar application has the function of adding a schedule, and the trigger event preset by the developer in the calendar application satisfies the schedule reminder conditions set by the user. Then, after the calendar application detects the trigger event, it can request the animation module to play the animation effect. Such as playing schedule reminder information on the desktop, etc. The possible implementation of triggering events will be introduced in detail below in combination with specific scenarios, and details will not be repeated here.
在一些实施例中,电子设备中的动效模块在桌面上添加一个或多个图层,用于播放动效。之后,应用程序请求应用其中的部分或全部图层,并提供动效资源。动效模 块在获取到动效资源后,可在请求的动效图层中播放动效。可选的,电子设备显示桌面的图层可以视为一个桌面图层。其中,动效图层可以包括桌面图层之下的图层、桌面图层、桌面图层与悬浮窗图层之间的图层、悬浮窗图层之上的图层中的一种或多种图层。动效模块可以根据应用程序请求在桌面图层播放动效。In some embodiments, the dynamic effect module in the electronic device adds one or more layers on the desktop for playing the dynamic effect. The application then requests some or all of these layers to be applied and provides animation resources. After the dynamic effect module obtains the dynamic effect resource, it can play the dynamic effect in the requested dynamic effect layer. Optionally, the layer on which the electronic device displays the desktop may be regarded as a desktop layer. Wherein, the dynamic effect layer can include one or more of the layers below the desktop layer, the desktop layer, the layer between the desktop layer and the floating window layer, and the layer above the floating window layer. kind of layer. The dynamic effect module can play dynamic effects on the desktop layer according to the application request.
示例性的,如图6中(a)所示界面601,电子设备在显示桌面的过程中,应用程序检测到触发事件,向动效模块请求可用的动效图层。动效模块向应用程序发送动效图层的信息(如可用的动效图层为3层),应用程序根据获得的动效图层的信息以及开发者预置的选择规则,选择其中的一层或多层动效图层,如选择了其中1层动效图层,可将选择的动效图层的信息以及相应的动效资源的存储位置发送至动效模块。动效模块获得存储位置存储的动效资源并在应用程序选择的动效图层绘制动效,如在图6中(b)所示的动效图层绘制动效,绘制完成后在桌面播放动效,显示如图6中(c)所示界面602,包括桌面图层和动效图层。可选的,应用程序中也可以预配置有可用的动效图层的信息。那么,应用程序在检测到触发事件后,可以不必向动效模块请求可用的动效图层。Exemplarily, as shown in the interface 601 in (a) of FIG. 6 , when the electronic device is displaying the desktop, the application program detects a trigger event and requests an available dynamic effect layer from the dynamic effect module. The dynamic effect module sends the information of the dynamic effect layer to the application program (for example, the available dynamic effect layer is 3 layers), and the application program selects one of them according to the obtained information of the dynamic effect layer and the selection rules preset by the developer. One or more layers of dynamic effect layers, if one of the dynamic effect layers is selected, the information of the selected dynamic effect layer and the storage location of the corresponding dynamic effect resources can be sent to the dynamic effect module. The dynamic effect module obtains the dynamic effect resource stored in the storage location and draws the dynamic effect on the dynamic effect layer selected by the application, such as drawing the dynamic effect on the dynamic effect layer shown in (b) in Figure 6, and plays it on the desktop after the drawing is completed Dynamic effect, displaying the interface 602 shown in (c) in FIG. 6 , including the desktop layer and the dynamic effect layer. Optionally, information about available dynamic layers may also be preconfigured in the application. Then, after the application detects the trigger event, it does not need to request the available dynamic effect layer from the dynamic effect module.
在一些实施例中,动效模块在接收到动效请求后,可向对应的应用程序请求获取待播放的动效的动效资源信息。其中,动效资源信息包括待播放的动效的动效资源的存储位置和/或对应的动效图层的信息。其中,动效图层的数量为一层或多层,动效资源包括一个或多个资源(如图6所示场景包括的多个花朵为多个资源),动效图层的信息包括一层或多层动效图层与一个或多个资源的对应关系。也就是说,应用程序确定用于播放动效的动效图层,以及确定在哪一动效图层播放哪些动效资源对应的动效。In some embodiments, after receiving the motion effect request, the motion effect module may request the corresponding application program to obtain the motion effect resource information of the motion effect to be played. Wherein, the dynamic effect resource information includes the storage location of the dynamic effect resource of the dynamic effect to be played and/or the information of the corresponding dynamic effect layer. Wherein, the number of dynamic effect layers is one or more layers, and the dynamic effect resources include one or more resources (the multiple flowers included in the scene as shown in Figure 6 are multiple resources), and the information of the dynamic effect layers includes one The corresponding relationship between one or more layers of dynamic effects and one or more resources. That is to say, the application program determines the dynamic effect layer used to play the dynamic effect, and determines which dynamic effect resource corresponds to which dynamic effect layer to play.
比如,动效资源信息包括待播放的动效的动效资源的存储位置和对应的动效图层的信息。那么后续,动效模块能够从动效资源的存储位置获取对应的动效资源(不同的动效资源可以存储于不同的存储位置),并根据动效图层的信息确定哪一动效图层播放哪一动效资源的动效。如不同的动效资源具有各自的动效资源标识,动效模块可以根据动效图层的信息中包括的动效资源标识和动效图层标识的对应关系,确定播放对应动效资源的动效的动效图层。其中,动效资源标识可以包括动效资源的存储位置的标识和图层标识。如确定资源1存储在位置1,对应的动效在图层1进行播放。For example, the dynamic effect resource information includes the storage location of the dynamic effect resource of the dynamic effect to be played and the information of the corresponding dynamic effect layer. Then in the future, the dynamic effect module can obtain the corresponding dynamic effect resource from the storage location of the dynamic effect resource (different dynamic effect resources can be stored in different storage locations), and determine which dynamic effect layer to play according to the information of the dynamic effect layer Which animation resource to animate. If different animation resources have their own animation resource identifiers, the animation module can determine the animation to play the corresponding animation resources according to the corresponding relationship between the animation resource identifiers and the animation layer identifiers included in the information of the animation layer. Effect layer. Wherein, the dynamic effect resource identifier may include an identifier of a storage location of the dynamic effect resource and a layer identifier. If it is determined that resource 1 is stored in location 1, the corresponding animation will be played on layer 1.
又比如,假设可用于播放动效的动效图层的数量为1个,或者用于播放动效的动效图层为默认图层。动效资源信息包括待播放的动效的动效资源的存储位置。那么后续,动效模块从动效资源的存储位置获取到对应的动效资源后,可以在对应的1个动效图层或默认图层中进行动效播放。其中,电子设备可以通过动效资源的标识区分不同动效资源的不同存储位置。如确定资源1存储在位置1。For another example, it is assumed that the number of animation layers available for playing animation effects is one, or the animation layer used for playing animation effects is a default layer. The dynamic effect resource information includes the storage location of the dynamic effect resource of the dynamic effect to be played. Then, after the animation module obtains the corresponding animation resource from the storage location of the animation resource, it can play the animation in the corresponding animation layer or the default layer. Wherein, the electronic device can distinguish different storage locations of different dynamic effect resources through identifiers of dynamic effect resources. For example, it is determined that resource 1 is stored in location 1.
再比如,假设全部动效资源的存储位置相同(如全部动效资源打包后进行存储),动效资源信息包括对应的动效图层的信息。那么后续,动效模块能够从动效资源的存储位置获取全部的动效资源,并可以根据动效图层的信息中包括的动效资源标识和图层标识的对应关系,确定播放对应动效资源的动效的图层。其中,电子设备可以通过动效资源的标识区分不同动效资源对应的不同动效图层。如确定资源1对应的动效在图层1进行播放。For another example, assuming that all dynamic effect resources are stored in the same location (for example, all dynamic effect resources are packaged and stored), the dynamic effect resource information includes the information of the corresponding dynamic effect layer. Then, the dynamic effect module can obtain all the dynamic effect resources from the storage location of the dynamic effect resources, and can determine the corresponding dynamic effect according to the corresponding relationship between the dynamic effect resource identifier and the layer identifier included in the information of the dynamic effect layer The layer for the animation effect of the resource. Wherein, the electronic device can distinguish different dynamic effect layers corresponding to different dynamic effect resources through the identification of the dynamic effect resources. For example, it is determined that the animation effect corresponding to resource 1 is played on layer 1.
在一些实施例中,开发者在配置应用程序动效的过程中,可以配置动效中的特定 位置的触摸焦点,该触摸焦点用于表示预设动效互动位置对应的触控区域,用户可以通过该触控区域与动效进行交互,如指示停止播放动效、重新播放动效等。进一步的,还可以配置触摸焦点对应的命令含义。那么后续,电子设备在播放动效的过程中,检测到用户在触摸焦点上的操作后,则执行对应的命令。进一步的,电子设备检测到用户在未配置触摸焦点的位置上的操作(即在触控区域以外的区域上的操作),导致焦点击穿,动效模块确定需要停止动效播放,穿透触摸焦点执行触摸位置对应的桌面控件对应的命令,从而降低动效对桌面操作的干扰。In some embodiments, during the process of configuring the application animation, the developer can configure the touch focus at a specific position in the animation. The touch focus is used to indicate the touch area corresponding to the preset animation interaction position. The user can Interact with the animation effect through the touch area, such as instructing to stop playing the animation effect, replay the animation effect, etc. Furthermore, the command meaning corresponding to the touch focus can also be configured. Then, after the electronic device detects the user's operation on the touch focus during the process of playing the dynamic effect, it executes the corresponding command. Furthermore, the electronic device detects the user's operation on a position where the touch focus is not configured (that is, an operation on an area other than the touch area), which causes the focus to break through. The focus executes the command corresponding to the desktop control corresponding to the touch position, thereby reducing the interference of motion effects on desktop operations.
示例性的,对应于图6所示场景,如图7所示,动效图层中预设有多个触摸焦点,包括显示的花心中的触摸焦点,重播触摸焦点,关闭触摸焦点。比如,电子设备在播放动效的过程中,检测到用户点击花心触摸焦点71的操作后,通过动效模块控制该朵花显示相应的动效,如旋转花瓣等。又比如,电子设备检测到用户点击重播触摸焦点72的操作后,通过动效模块重新播放动效。又比如,电子设备检测到用户点击关闭触摸焦点73的操作后,通过动效模块退出动效播放,显示桌面。再比如,如图6中(c)所示界面602,电子设备播放动效的过程中,不会影响用户查看桌面显示元素。那么,电子设备检测到用户点击附图标记61所示位置的操作,确定用户操作位置非动效图层预设触摸焦点位置,则通过动效模块退出动效。进一步的,电子设备确定用户操作位置对应于桌面图层中显示的卡片C的位置,可确定用户需要启动卡片C对应的应用,则启动该应用。即动效模块播放动效不会影响用户对桌面的操作,在增加交互性的同时,不会影响用户使用体验。Exemplarily, corresponding to the scene shown in FIG. 6 , as shown in FIG. 7 , multiple touch focuses are preset in the dynamic effect layer, including the touch focus in the displayed flower center, replaying the touch focus, and closing the touch focus. For example, when the electronic device detects that the user clicks on the center of the flower and touches the focus 71 during the playback of the dynamic effect, the electronic device controls the flower to display corresponding dynamic effects through the dynamic effect module, such as rotating petals. For another example, after the electronic device detects the user's operation of clicking the replay touch focus 72, the motion effect is played again through the motion effect module. For another example, after the electronic device detects that the user clicks to close the touch focus 73, it exits the dynamic playback through the dynamic effect module and displays the desktop. For another example, in the interface 602 shown in (c) of FIG. 6 , during the electronic device playing the dynamic effect, it will not affect the user's view of the desktop display elements. Then, the electronic device detects that the user clicks the position indicated by reference numeral 61 , determines that the user's operation position is not the preset touch focus position of the dynamic effect layer, and then exits the dynamic effect through the dynamic effect module. Further, the electronic device determines that the user's operation position corresponds to the position of the card C displayed on the desktop layer, determines that the user needs to start the application corresponding to the card C, and starts the application. That is, the dynamic effect played by the dynamic effect module will not affect the user's operation on the desktop, and will not affect the user experience while increasing interactivity.
在一些实施例中,应用程序中还可以配置有其他触摸焦点对应的函数,以实现不同的操作效果,如预设播放下一个动效的触摸焦点等。动效模块在检测到在非自定义触摸焦点的其他触摸焦点的触摸操作后,将该触摸事件发送至应用程序模块,由应用程序确定该触摸操作的对应的函数,将对应的动效资源发送至动效模块。动效模块在接收到触摸操作对应的触摸资源后,播放相应的动效。可选的,应用程序可能在发送动效的动效资源时已经发送了包含触摸操作对应的动效资源的全部动效资源,那么应用程序在接收到触摸事件后,不必再向动效模块发送动效资源,而是发送动效指示,用于指示动效模块基于哪些动效资源播放动效。In some embodiments, other functions corresponding to the touch focus can also be configured in the application program to achieve different operation effects, such as presetting the touch focus for playing the next animation effect. After the dynamic effect module detects the touch operation of other touch focus points other than the custom touch focus, it sends the touch event to the application program module, and the application program determines the corresponding function of the touch operation, and sends the corresponding dynamic effect resource to the animation module. After receiving the touch resource corresponding to the touch operation, the dynamic effect module plays the corresponding dynamic effect. Optionally, the application may have sent all the dynamic resources including the dynamic resources corresponding to the touch operation when sending the dynamic resource of the dynamic effect, then the application does not need to send the dynamic effect module to the dynamic effect module after receiving the touch event. Instead, it sends a dynamic effect indication, which is used to instruct the dynamic effect module to play the dynamic effect based on which dynamic effect resources.
在一些实施例中,预设退出动效的操作,电子设备在检测到退出动效的操作后,通过动效模块停止动效播放。退出动效的操作可以包括点击关闭触摸焦点(如图7所示关闭触摸焦点73)的操作,该关闭触摸焦点可以为应用程序定义也可以为动效模块定义。退出动效的操作还可以包括在显示的动效中除预设的触摸焦点以外位置的预设手势操作。比如,电子设备在触摸焦点以外位置检测到点击操作,可通过动效模块退出动效播放。又比如,电子设备在触摸焦点以外位置检测到用户的预设手势操作(如双击操作),可通过动效模块退出动效播放,以避免用户误触导致的动效退出。进一步的,动效模块在确定退出动效后,还可以在退出的过程中播放退出动效。其中,退出动效可以为动效模块定义或者应用程序定义。如包括淡出、侧滑出显示屏、应用程序自定义动效等。In some embodiments, the operation of exiting the motion effect is preset, and after the electronic device detects the operation of exiting the motion effect, the motion effect module stops playing the motion effect. The operation of exiting the dynamic effect may include the operation of clicking to close the touch focus (as shown in FIG. 7 , closing the touch focus 73 ), and the closing touch focus may be defined by an application program or by a dynamic effect module. The operation of exiting the dynamic effect may also include a preset gesture operation at a position other than the preset touch focus in the displayed dynamic effect. For example, if the electronic device detects a click operation at a position other than the touch focus, the dynamic effect playback can be exited through the dynamic effect module. For another example, if the electronic device detects the user's preset gesture operation (such as a double-tap operation) at a position other than the touch focus, it can exit the animation playback through the animation module, so as to avoid the animation exit caused by the user's mistaken touch. Furthermore, after the animation module determines the exit animation, it can also play the exit animation during the exit process. Wherein, the exit animation can be defined by an animation module or an application program. Such as including fading out, side sliding out of the display screen, application custom dynamic effects, etc.
如此,电子设备在播放动效的过程中,通过触摸焦点实现与用户进行交互,提高用户参与感,提升用户使用体验。In this way, during the process of playing the dynamic effect, the electronic device can interact with the user by touching the focus, so as to improve the user's sense of participation and user experience.
在一些实施例中,开发者在配置应用程序动效的过程中,可以配置应用程序动效是否可以联动其他应用程序、以及是否需要联动电子设备的硬件功能。比如,若可以联动其他应用程序,可预先与可以联动的应用程序的开发者确定联动的动效播放效果,将对应的联动动效配置到联动的应用程序中,并且在本应用程序中配置联动动效指示。那么,后续在应用程序在请求播放动效的过程中,可以向动效模块发送携带联动动效指示的动效请求,并且联动指示中包括需要联动的应用程序的标识(如应用ID)。动效模块在接收到动效请求后,可以根据其中的联动指示确定需要播放联动动效,并根据标识将联动动效指示转发至对应的应用程序。那么该需要联动的应用程序根据联动动效指示,向动效模块发送联动动效请求,进而实现播放联动动效。又比如,若需要联动电子设备的硬件功能,开发者在应用程序动效中配置需要的硬件。那么后续在动效请求过程中,动效模块可以获知请求播放的动效需要哪些硬件功能,可向launcher请求调用硬件功能,如请求音频模块播放动效声音。其中,联动的应用程序的数量可以为一个或多个。In some embodiments, during the process of configuring the animation of the application, the developer can configure whether the animation of the application can be linked with other applications, and whether it needs to be linked with the hardware function of the electronic device. For example, if other applications can be linked, you can determine the linkage animation playback effect with the developer of the application that can be linked in advance, configure the corresponding linkage animation in the linkage application, and configure the linkage in this application Animation instructions. Then, in the process of requesting to play the animation effect, the application program can send a motion effect request carrying a linkage animation indication to the animation module, and the linkage indication includes the identification (such as the application ID) of the application program that needs linkage. After the motion effect module receives the motion effect request, it can determine that the motion effect needs to be played according to the linkage indication, and forward the linkage motion effect indication to the corresponding application program according to the identification. Then the application program that needs linkage sends a linkage animation request to the animation module according to the linkage animation indication, so as to realize the linkage animation playback. For another example, if the hardware function of the linked electronic device is required, the developer configures the required hardware in the application animation. Then, during the subsequent animation request process, the animation module can know which hardware functions are required for the requested animation, and can request the launcher to call hardware functions, such as requesting the audio module to play the animation sound. Wherein, the number of linked application programs may be one or more.
进一步的,若电子设备中未安装应用程序可以联动的应用程序,那么动效模块可以单独播放应用程序动效,而不播放联动动效;或者,动效模块不播放应用程序动效。若电子设备中未配置需要联动的硬件,那么动效模块可以单独播放应用程序动效,而不联动相关硬件;或者,动效模块不播放应用程序动效。可选的,动效模块接收到应用程序发送的动效请求中包括联动请求,判断电子设备不具备联动条件,则向应用程序发送联动失败响应,由应用程序中判断是否播放动效以及如何播放动效。其中,应用程序判断规则为开发者在应用程序开发过程中配置的预设规则。或者,动效模块在接收到应用程序发送的动效请求后,向该应用程序发送桌面元素和硬件能力。应用程序根据桌面元素,确定电子设备中是否安装有需要联动的应用程序,在确定电子设备安装有需要联动的应用程序后,再向动效模块发送联动动效指示,以播放联动动效。同样的,应用程序还根据接收到的电子设备的硬件能力,判断电子设备是否能够具有需要联动的硬件能力,如具有对应的能力,再向动效模块发送联动动效指示,以启动对应的硬件。Further, if there is no application installed in the electronic device that can be linked with the application, the animation module can play the animation of the application alone without playing the animation of the linkage; or, the animation module does not play the animation of the application. If the electronic device is not equipped with hardware that needs to be linked, then the animation module can play the animation of the application alone without linking the relevant hardware; or, the animation module does not play the animation of the application. Optionally, the animation module receives the animation request sent by the application including the linkage request, and if it determines that the electronic device does not meet the linkage conditions, it sends a linkage failure response to the application, and the application determines whether to play the animation and how to play it. Motion. Wherein, the application judging rule is a preset rule configured by the developer during the application development process. Alternatively, the dynamic effect module sends the desktop elements and hardware capabilities to the application program after receiving the motion effect request sent by the application program. According to the desktop elements, the application program determines whether there is an application program that needs linkage installed in the electronic device, and then sends a linkage animation effect instruction to the animation module to play the linkage animation effect after it is determined that the electronic device has the application program that needs linkage installed. Similarly, the application program also judges whether the electronic device has the hardware capability that needs to be linked according to the received hardware capability of the electronic device. If it has the corresponding capability, it sends a linkage animation instruction to the animation module to start the corresponding hardware. .
示例性的,如图8中(a)所示界面801,假设电子设备中应用A(对应于卡片A)配置有动效,且该动效可以联动应用C(对应于卡片C)共同显示联动动效。动效模块接收到应用A发送的动效请求,获取桌面元素信息(显示有卡片C),并将桌面元素信息发送至应用A。应用A根据桌面元素信息,确定电子设备安装有应用C,则将联动动效对应的联动动效指示和动效资源信息(如包括动效资源的存储位置)发送至动效模块,动效模块将其中的联动动效指示转发至应用C,再由应用C确定是否显示联动动效。若应用C确定播放联动动效,可向动效模块发送动效请求。那么假设联动动效包括在卡片A上添加表情和花环、卡片C变化显示位置、以及由卡片C向卡片A献花。那么,动效模块根据接收到的应用A发送的动效资源信息和应用C发送的动效资源信息,绘制动效后,显示如图8中(b)所示界面802,在界面802上播放应用A和应用C对应的动效。进一步的,应用A的动效还可以包括硬件支持,如需在动效播放过程中播放音乐。那么,应用A在动效请求中加入硬件支持请求,动效模块根据动效请求,向launcher请求调用电子设备的音频模块播放音乐,从而实现在播放如界面802所示 的动效的过程中,播放音乐。Exemplarily, as shown in the interface 801 in (a) of FIG. 8 , it is assumed that application A (corresponding to card A) in the electronic device is configured with a motion effect, and the motion effect can be linked with application C (corresponding to card C) to jointly display the linkage Motion. The dynamic effect module receives the dynamic effect request sent by application A, obtains the desktop element information (displayed with card C), and sends the desktop element information to application A. Application A determines that application C is installed on the electronic device according to the desktop element information, then sends the linkage animation indication corresponding to the linkage animation effect and the animation resource information (such as including the storage location of the animation resource) to the animation module, and the animation module The linkage motion effect indication therein is forwarded to application C, and then application C determines whether to display the linkage motion effect. If the application C determines to play the linked motion effect, it can send a motion effect request to the motion effect module. Then assume that the linkage effect includes adding emoticons and garlands on card A, changing the display position of card C, and presenting flowers from card C to card A. Then, the dynamic effect module draws the dynamic effect according to the received dynamic effect resource information sent by application A and the dynamic effect resource information sent by application C, and displays the interface 802 shown in (b) in FIG. 8 , and plays on the interface 802 Dynamic effects corresponding to application A and application C. Further, the animation effect of application A may also include hardware support, for example, music needs to be played during the playback of the animation effect. Then, application A adds a hardware support request to the motion effect request, and the motion effect module requests the launcher to call the audio module of the electronic device to play music according to the motion effect request, so that in the process of playing the motion effect shown in interface 802, play music.
又示例性的,应用程序动效中预配置的联动动效可以不明确具体联动的应用程序,而是指示联动该应用程序对应的桌面显示的卡片或图标附件的桌面元素。比如,在上述图8所示场景中,应用A的动效中未配置联动应用C,而是配置联动应用A对应的卡片A附近的卡片显示联动动效。如应用A在接收到桌面元素信息后,获得桌面上显示的各个元素的显示位置,根据显示位置确定卡片C位于卡片A附近,满足联动动效播放条件,则在联动请求中请求联动卡片C播放联动动效,并且卡片C联动动效的动效资源预配置在应用A中。那么,动效模块在接收到动效请求后,可以向应用C请求允许播放动效或者不必向应用C请求允许播放动效,而是直接通过launcher控制卡片C显示联动动效。As another example, the pre-configured linkage animation in the application animation may not specify the specific linkage application, but indicate linkage with the desktop element attached to the card or icon displayed on the desktop corresponding to the application. For example, in the scenario shown in FIG. 8 above, linkage application C is not configured in the animation effect of application A, but a linkage animation effect is configured to display a card near card A corresponding to linkage application A. For example, after receiving the desktop element information, application A obtains the display position of each element displayed on the desktop, determines that card C is located near card A according to the display position, and satisfies the linkage animation playback conditions, then requests linkage card C to play in the linkage request Linkage animation effect, and the animation resource of card C linkage animation effect is pre-configured in application A. Then, after the motion effect module receives the motion effect request, it can request application C to allow the play of the motion effect, or it does not need to request the permission of the application C to play the motion effect, but directly controls the card C to display the linkage motion effect through the launcher.
又示例性的,如上文所述,应用程序可以请求动效模块提供的一个或多个动效图层中的部分或全部图层用于播放动效。那么,如上述图8所示场景,假设动效模块提供3个动效图层,应用A选择全部3个动效图层用于播放动效。那么,应用A在向动效模块发送动效请求时,可在动效请求中携带动效图层信息,包括请求使用哪些动效图层,以及需要在各个动效图层中显示的内容。动效模块根据应用A发送的动效请求,确定动效播放需求,在相应的图层播放所需动效。比如,如图9所示,动效模块在底层图层901播放动效中的献花动作(包括手和花朵,该动效以及动效图层也可以为应用C请求的),在桌面图层播902放动效中的卡片C的移动位置动效(该动效以及动效图层也可以为应用C请求的),在顶部图层903播放动效中的其他动效,从而在动效图层叠加显示后,能够播放完整的动效。As another example, as mentioned above, the application program may request some or all of the one or more layers of the animation effect provided by the animation module to play the animation effect. Then, as in the scenario shown in Figure 8 above, assuming that the animation module provides three animation layers, application A selects all three animation layers for playing the animation. Then, when application A sends a dynamic effect request to the dynamic effect module, it can carry the dynamic effect layer information in the dynamic effect request, including which dynamic effect layers are requested to be used, and the content to be displayed in each dynamic effect layer. The motion effect module determines the motion effect playback requirement according to the motion effect request sent by application A, and plays the required motion effect on the corresponding layer. For example, as shown in FIG. 9 , the dynamic effect module plays the flower presentation action in the dynamic effect (including hands and flowers, the dynamic effect and the dynamic effect layer can also be requested by application C) on the bottom layer 901, and on the desktop layer Play 902 the moving position dynamic effect of card C in the dynamic effect (the dynamic effect and the dynamic effect layer can also be requested by the application C), and play other dynamic effects in the dynamic effect on the top layer 903, so that the dynamic effect After the layers are superimposed and displayed, the complete animation can be played.
在一些实施例中,应用程序播放动效需要获得电子设备动效播放的权限,动效模块在确定应用程序具有动效播放权限后,可播放动效。比如,动效模块在接收到应用程序发送的动效请求后,确定该应用程序不具备动效播放权限,则显示提示信息,用于提示用户确认是否允许该应用程序播放动效。若用户允许,则获得动效播放权限(即获得用户授权),还可以保存该动效播放权限。又比如,电子设备在设置应用中提供动效播放权限设置入口,允许用户对动效播放权限进行设置。再比如,在应用程序中预置动效播放权限设置入口,允许用户在应用程序中对该应用程序的动效播放权限进行设置。可选的,动效模块每一次在接收到动效请求后,均需对应用程序动效播放权限进行确定,避免由于用户更改设置导致的动效播放权限变化,保存的动效播放权限与用户设置的动效播放权限不同,出现异常,影响用户使用体验。In some embodiments, the application program needs to obtain the permission to play the animation effect of the electronic device, and the animation effect module can play the animation effect after determining that the application program has the permission to play the animation effect. For example, after receiving the motion effect request sent by the application program, the motion effect module determines that the application program does not have the permission to play the motion effect, and then displays a prompt message for prompting the user to confirm whether to allow the application program to play the motion effect. If the user allows it, the permission to play the dynamic effect is obtained (that is, authorized by the user), and the permission to play the dynamic effect can also be saved. For another example, the electronic device provides a dynamic effect playback permission setting entry in the setting application, allowing the user to set the dynamic effect playback permission. For another example, an entry for setting the animation playback permission is preset in the application, allowing the user to set the animation playback permission of the application in the application. Optionally, each time the animation module receives an animation request, it needs to determine the application animation playback permission to avoid changes in the animation playback permission caused by the user changing the settings, and the saved animation playback permission is consistent with the user's The set animation playback permissions are different, and abnormalities occur, which affect the user experience.
示例性的,假设应用A正在请求播放桌面动效,如图10所示界面1001,电子设备显示提示信息101,用于提示用户确认是否允许应用A播放桌面动效。若检测到用户点击允许控件102的操作,可确定用户允许播放应用A的桌面动效,通过动效模块播放动效。若检测到用户点击不允许控件103的操作,可确定用户不允许播放应用A的桌面动效,可取消播放对应的动效。Exemplarily, assuming that application A is requesting to play desktop animation, as shown in interface 1001 in FIG. 10 , the electronic device displays prompt information 101 for prompting the user to confirm whether application A is allowed to play desktop animation. If it is detected that the user clicks the operation of the allow control 102, it can be determined that the user allows to play the desktop animation of application A, and the animation can be played through the animation module. If it is detected that the user clicks the disallowed control 103, it can be determined that the user does not allow the desktop animation of application A to be played, and the corresponding animation can be canceled.
又示例性的,假设用户通过设置应用,设置动效播放权限。如图11中(a)所示界面1101,电子设备显示权限管理设置选项,检测到用户点击动效控件111的操作,显示如图11中(b)所示界面1102。在界面1102上用户可对电子设备中安装的应用程序的动效播放权限进行设置,如界面1102所示,应用A具有动效播放权限,应用B 不具有动效播放权限。电子设备检测到用户点击控件112的操作,确定用户需要对应用B的动效播放权限进行设置,可显示如图11中(c)所示界面1103。电子设备检测到用户点击允许控件113的操作后,确定用户开启应用B的动效播放权限,可显示显示如图11中(d)所示界面1104,以提示用户应用B的动效播放权限已开启。For another example, assume that the user sets the animation playback permission through the setting application. In the interface 1101 shown in (a) of FIG. 11 , the electronic device displays rights management setting options, detects the user's operation of clicking the dynamic control 111 , and displays the interface 1102 shown in (b) in FIG. 11 . On the interface 1102, the user can set the animation play permission of the application program installed in the electronic device. As shown in the interface 1102, the application A has the animation playback permission, and the application B does not have the animation playback permission. The electronic device detects the user's operation of clicking the control 112 and determines that the user needs to set the animation play permission of application B, and may display an interface 1103 as shown in (c) in FIG. 11 . After the electronic device detects that the user clicks the operation of the permission control 113, it determines that the user has enabled the dynamic effect playback permission of application B, and may display an interface 1104 as shown in (d) in FIG. open.
在一些实施例中,动效模块维护一个动效播放队列,用于对待播放的动效进行排序。动效播放过程满足生产者消费模式,其中生产者为请求播放动效的应用程序,缓存区用于保存动效播放队列,消费者为动效模块。比如,动效模块维护两个线程(如线程1和线程2),线程1用于根据应用程序发送的动效请求,生成对应的动效事件并将动效事件放入动效播放队列中,线程2用于从动效播放队列的队头取出动效事件,以实现动效播放。具体的,动效模块在接收到动效请求后,生成对应的动效事件置于动效播放队列的队尾(如动效播放队列为空,则生成的动效事件放入动效播放队列后位于队头)。之后,动效模块再接收到动效请求后,按照接收动效请求的顺序,依次在动效播放队列中排列对应的动效事件。动效模块按照动效播放队列中动效事件的顺序,从位于队头的动效事件开始,依次确定是否播放对应的动效。在确定播放某动效时,可将该动效对应的动效事件移出动效播放队列。从而动效模块在开始播放一个动效后,可以查看动效播放队列是否为空,若不为空,则确定当前队头动效是否可以播放,若可以播放,可移出该队头动效并播放。即每一次动效模块都是在确定位于队头的动效是否可以播放。In some embodiments, the dynamic effect module maintains a dynamic effect play queue for sorting the dynamic effects to be played. The animation playback process satisfies the producer consumption mode, where the producer is the application program that requests to play animation effects, the buffer area is used to save the animation playback queue, and the consumer is the animation module. For example, the animation module maintains two threads (such as thread 1 and thread 2). Thread 1 is used to generate corresponding animation events according to the animation request sent by the application and put the animation events into the animation playback queue. Thread 2 is used to take out the dynamic effect event from the head of the dynamic effect playback queue to realize the dynamic effect playback. Specifically, after the animation module receives the animation request, it generates a corresponding animation event and places it at the end of the animation playback queue (if the animation playback queue is empty, the generated animation event is placed in the animation playback queue at the head of the queue). Afterwards, after the animation effect module receives the animation effect request, it arranges the corresponding animation effect events in the animation effect playback queue in sequence according to the order in which the animation effect request is received. The dynamic effect module determines whether to play the corresponding dynamic effect sequentially starting from the dynamic effect event at the head of the queue according to the sequence of the dynamic effect events in the dynamic effect playback queue. When it is determined to play a certain motion effect, the motion effect event corresponding to the motion effect may be removed from the motion effect playback queue. Therefore, after the dynamic effect module starts to play a dynamic effect, it can check whether the dynamic effect playback queue is empty. If it is not empty, determine whether the current queue head animation can be played. If it can be played, the queue head animation can be removed and play. That is, each animation module is to determine whether the animation at the head of the queue can be played.
一些实施例中,动效事件可以包括对应的上报动效的应用信息(如应用标识等),动效的最晚播放时间,动效播放实例,关联的应用程序的信息等中的一项或多项。其中,动效播放实例可以包括动效事件对应的动效请求中请求播放的各个动效的相对播放时间(如图9所示场景中,献花动作动效、卡片C的移动位置动效以及其他动效的播放时间间隔)、播放区域(如包括播放位置和动效图层)、动效资源存储位置(如动效资源链接)、播放时长、触摸焦点信息等。可选的,动效事件中可以不包括动效播放实例,而是在确定需要播放该动效事件对应的动效时,再向对应的应用程序请求获取对应的动效播放实例。In some embodiments, the motion event may include one or more of the corresponding application information (such as application identification, etc.) that reported the motion effect, the latest play time of the motion effect, the animation play instance, and the information of the associated application program, etc. multiple. Among them, the dynamic effect playback example may include the relative playback time of each dynamic effect requested to be played in the dynamic effect request corresponding to the dynamic effect event (in the scene shown in FIG. The playback time interval of the animation), the playback area (for example, including the playback position and the animation layer), the storage location of the animation resource (such as the link of the animation resource), the playback duration, touch focus information, etc. Optionally, the dynamic effect event may not include the dynamic effect playback instance, but when it is determined that the animation effect corresponding to the animation effect event needs to be played, the corresponding application program is requested to acquire the corresponding dynamic effect playback instance.
一些实施例中,动效模块可以根据动效播放条件确定当前是否具有动效播放环境,即是否可以播放对应的动效,动效播放条件包括电子设备显示桌面、对应的应用程序具有动效播放权限、当前桌面元素(如显示的图标、卡片等)不影响动效的播放、桌面正在播放的动效与请求播放的动效互不影响、以及动效播放时限未超时等。比如,正在播放的动效的位置或者桌面卡片位置影响队头动效的播放位置,可暂时不播放该动效。进一步的可以将该动效移至播放队列队尾,以确定是否可以播放下一动效,提高动效播放效率。又比如,动效具有时效性且当前不满足播放条件,则应用程序可取消播放该动效。In some embodiments, the dynamic effect module can determine whether there is currently a dynamic effect playback environment according to the dynamic effect playback conditions, that is, whether the corresponding dynamic effect can be played. The dynamic effect playback conditions include that the electronic device displays the desktop, and the corresponding application has a dynamic effect playback Permissions, current desktop elements (such as displayed icons, cards, etc.) do not affect the playback of animation effects, the animation effects being played on the desktop and the animation effects requested to play do not affect each other, and the animation playback time limit has not expired, etc. For example, if the position of the dynamic effect being played or the position of the table card affects the playback position of the dynamic effect of the head of the queue, the dynamic effect can not be played temporarily. Further, the animation effect can be moved to the end of the playback queue to determine whether the next animation effect can be played, so as to improve the efficiency of animation playback. For another example, if the animation effect is time-sensitive and currently does not meet the playing conditions, the application program can cancel playing the animation effect.
需要说明的是,动效模块可以在桌面播放一个或多个动效。比如,动效模块确定动效播放队列的队头为动效A,且动效A具有动效播放条件,则播放动效A并将动效A移出动效播放队列。之后,动效模块确定动效播放队列的队头为动效B,且动效B具有动效播放条件(包括动效A的播放与动效B播放互不影响),则在播放动效A的过程中播放动效B,并将动效B移出动效播放队列。It should be noted that the dynamic effect module can play one or more dynamic effects on the desktop. For example, the dynamic effect module determines that the head of the dynamic effect playback queue is the dynamic effect A, and the dynamic effect A has the condition of dynamic effect playback, then plays the dynamic effect A and removes the dynamic effect A from the dynamic effect playback queue. Afterwards, the animation module determines that the head of the animation playback queue is animation B, and animation B has the animation playback conditions (including the playback of animation A and the playback of animation B do not affect each other), then the playback of animation A Play animation B during the process, and remove animation B from the animation playback queue.
一些实施例中,可以预先配置动效的关键区域。比如,若请求播放的动效与正在播放的动效,互不影响关键区域的动效播放,可确定动效播放过程互不影响,可以同时播放动效。即动效模块可以根据动效的关键区域,确定是否具有动效播放环境,是否可以播放当前待播放的动效。可选的,动效的关键区域预配置在应用程序中,应用程序在发送动效请求时,可以在动效请求中携带动效的关键区域的信息。其中,动效的关键区域小于或等于动效所占用的区域,动效的关键区域的数量可以为一个或多个,动效的关键区域可以为动效播放过程中用户能够进行交互操作的触控区域。可选的,部分动效也可以没有关键区域(如占用桌面显示区域较小的动效等)。In some embodiments, the key areas of the animation can be pre-configured. For example, if the animation effect requested to be played and the animation effect being played do not affect the animation playback in the key area, it can be determined that the animation playback process does not affect each other, and the animation effects can be played at the same time. That is, the motion effect module can determine whether there is a motion effect playback environment and whether the current motion effect to be played can be played according to the key area of the motion effect. Optionally, the key area of the animation is pre-configured in the application, and when the application sends the animation request, the information of the key area of the animation can be carried in the animation request. Wherein, the key area of the animation effect is less than or equal to the area occupied by the animation effect, the number of the key area of the animation effect can be one or more, and the key area of the animation effect can be the touch area where the user can perform interactive operations during the playback of the animation effect. control area. Optionally, some animation effects may also have no key area (such as animation effects occupying a small display area of the desktop, etc.).
示例性的,假设动效A的播放区域为a,关键区域为a1;动效B的播放区域为b,关键区域为b1。动效模块在播放动效A的过程中,确定需要播放动效B。动效模块确定播放区域b不影响关键区域a1,播放区域a不影响关键区域b1,那么动效模块可在播放动效A的过程中播放动效B。Exemplarily, it is assumed that the play area of motion effect A is a, and the key area is a1; the play area of motion effect B is b, and the key area is b1. During the playback of animation effect A, the animation module determines that animation B needs to be played. The dynamic effect module determines that the playback area b does not affect the key area a1, and the playback area a does not affect the key area b1, then the dynamic effect module can play the animation effect B during the playback of the animation effect A.
在一些实施例中,动效模块在确定没有联动动效的播放环境时,可以将联动的多个动效对应的动效事件置于动效播放队列中,并标记。那么后续动效模块可以根据标记,确定需要联动播放的多个动效。可选的,联动动效对应的多个动效事件在动效播放队列中可以位于相邻位置,也可以位于不相邻的位置。In some embodiments, when the dynamic effect module determines that there is no playing environment with linked dynamic effects, it can place the dynamic effect events corresponding to the multiple linked dynamic effects in the dynamic effect playback queue and mark them. Then the follow-up animation module can determine multiple animation effects that need to be played in linkage according to the mark. Optionally, the multiple animation events corresponding to the linkage animation may be located in adjacent positions in the animation playback queue, or may be located in non-adjacent positions.
示例性的,假设应用A请求播放动效A,并请求与应用B播放联动动效。相应的,应用B根据联动动效指示,向动效模块发送动效B的动效请求。那么,动效模块将动效A对应的动效事件A和动效B对应的动效事件B置于动效播放队列中,并均添加标记0。后续,假设动效模块确定位于队头的动效事件为动效事件A,根据标记0确定需要联动动效事件B,可同时确定这两个动效事件对应的动效是否满足动效播放条件,进而实现播放联动动效。Exemplarily, assume that application A requests to play animation A, and requests to play a linked animation with application B. Correspondingly, application B sends a motion effect request of motion effect B to the motion effect module according to the linkage motion effect instruction. Then, the dynamic effect module puts the dynamic effect event A corresponding to the dynamic effect A and the dynamic effect event B corresponding to the dynamic effect B in the dynamic effect playback queue, and adds a mark 0 to both. Next, assuming that the dynamic effect module determines that the dynamic effect event at the head of the queue is the dynamic effect event A, and according to the mark 0, it is determined that the dynamic effect event B needs to be linked, and it can be determined at the same time whether the dynamic effects corresponding to the two dynamic effect events meet the dynamic effect playback conditions , and then realize the playback linkage effect.
在一些实施例中,电子设备切换显示桌面(如由锁屏状态解锁后显示桌面、退出应用程序界面显示桌面等),或者刷新桌面(如应用程序请求刷新桌面以显示动效、或者桌面定时刷新桌面等)后,动效模块可获取到动效播放队列,确认动效播放队列是否为空,若不为空,则需要按照上述方法确定是否需要播放动效。其中,在电子设备未显示桌面的过程中,应用程序检测到触发事件后,可向动效模块发送动效请求,动效模块确定当前未显示桌面,不满足动效播放条件,则确定动效请求对应的动效事件,并将动效事件置于动效播放队列队尾。In some embodiments, the electronic device switches to display the desktop (such as displaying the desktop after being unlocked from the lock screen state, exiting the application program interface to display the desktop, etc.), or refreshing the desktop (such as the application program requests to refresh the desktop to display dynamic effects, or the desktop is regularly refreshed. desktop, etc.), the animation module can obtain the animation playback queue, and check whether the animation playback queue is empty. If it is not empty, you need to determine whether to play the animation according to the above method. Among them, when the electronic device does not display the desktop, after the application detects the trigger event, it can send a dynamic effect request to the dynamic effect module. Request the corresponding animation event, and put the animation event at the end of the animation playback queue.
示例性的,如图12中(a)所示界面1201,用于显示桌面,包括聊天软件B对应的卡片B以及购物软件C对应卡片的C。假设聊天软件B接收到包含商品链接的消息,聊天软件B确定接收该消息的事件为触发事件,可向动效模块发送动效请求。假设动效播放队列为空,动效模块接收到该动效请求后,将对应的动效事件置于队头,判断该触发事件是否满足播放条件,如满足,可获取聊天软件B提供的动效资源。如图12中(b)所示界面1202,动效模块在桌面上播放如附图标记121指示的卡片B的动效。Exemplarily, the interface 1201 shown in (a) of FIG. 12 is used to display the desktop, including the card B corresponding to the chat software B and the card C corresponding to the shopping software C. Assuming that chat software B receives a message containing a product link, chat software B determines that the event of receiving the message is a trigger event, and can send a motion effect request to the motion effect module. Assuming that the animation play queue is empty, after receiving the animation request, the animation module puts the corresponding animation event at the head of the queue, and judges whether the trigger event satisfies the playback conditions. efficient resources. As shown in interface 1202 in (b) of FIG. 12 , the dynamic effect module plays the dynamic effect of card B indicated by reference numeral 121 on the desktop.
又示例性的,如上述图12中(a)和(b)所示场景,假设聊天软件B中预置了该触发事件与购物软件C的联动动效。那么,聊天软件B在发送动效请求后接收到桌面元素信息,能够根据桌面元素信息,确定桌面上显示有购物软件C的卡片C,可向动效模块发送联动动效指示,动效模块将联动动效转发至购物软件C。购物软件C在接 收到联动动效指示后,向动效模块发送动效请求。动效模块在接收到购物软件C发送的动效请求后,确定用于请求显示与聊天软件B的动效共同播放实现联动动效,可不论动效播放队列中是否存在其他动效事件,均将购物软件C对应的动效事件置于动效播放队列中聊天软件B动效对应的动效事件之后,(或者若动效模块已经播放聊天软件B对应的动效,则对应的动效事件已移出动效播放队列,因此将购物软件C动效对应的动效事件置于动效播放队列的队头;或者不将购物软件C动效对应的动效事件置于动效播放队列中,直接播放该联动动效),从而如图12中(c)所示界面1203,实现在桌面上播放聊天软件B和购物软件C的联动动效。如界面1203中附图标记122所示,在购物软件C对应的卡片C上显示指示箭头、文字(如“商品在此”)以及手指指示动效,用于配合卡片B的动效,实现联动动效,以提示用户聊天软件B接收到的商品链接可以通过购物软件C查看。As another example, as in the scenarios shown in (a) and (b) in FIG. 12 , it is assumed that the chat software B has a preset linkage effect between the trigger event and the shopping software C. Then, after the chat software B receives the desktop element information after sending the motion effect request, it can determine that the card C of the shopping software C is displayed on the desktop according to the desktop element information, and can send a linkage motion effect instruction to the motion effect module, and the motion effect module will The linkage animation effect is forwarded to the shopping software C. Shopping software C sends a motion effect request to the motion effect module after receiving the linkage motion effect instruction. After receiving the dynamic effect request sent by shopping software C, the dynamic effect module determines that it is used to request the display to be played together with the dynamic effect of chat software B to realize the linkage dynamic effect, regardless of whether there are other dynamic effect events in the dynamic effect playback queue. Put the dynamic effect event corresponding to the shopping software C after the dynamic effect event corresponding to the dynamic effect of the chat software B in the dynamic effect playback queue, (or if the dynamic effect module has played the corresponding dynamic effect of the chat software B, then the corresponding dynamic effect event It has been removed from the animation playback queue, so the animation event corresponding to the animation of shopping software C is placed at the head of the animation playback queue; or the animation event corresponding to the animation of shopping software C is not placed in the animation playback queue, directly play the linkage animation effect), so that the interface 1203 shown in (c) in FIG. 12 realizes the linkage animation effect of playing chat software B and shopping software C on the desktop. As indicated by the reference numeral 122 in the interface 1203, on the card C corresponding to the shopping software C, an indication arrow, text (such as "the product is here") and a finger pointing motion effect are displayed, which are used to cooperate with the motion effect of the card B to realize linkage A dynamic effect to remind the user that the product link received by the chat software B can be viewed through the shopping software C.
如此,通过全屏桌面动效,能够为用户显示更多的应用程序对应的信息,并且能够实现智能联动,帮助用户更加简便的使用电子设备,提升用户使用体验。In this way, through the full-screen desktop dynamic effect, more information corresponding to the application program can be displayed for the user, and intelligent linkage can be realized to help the user use the electronic device more easily and improve the user experience.
可选的,在如图12中(c)所示联动动效播放场景,应用程序B向动效模块发送的联动动效指示中还可以包括检测到的购物链接,购物软件C中预配置的用于根据购物链接搜索商品的函数。那么,购物软件C在接收到联动动效指示后,还可以根据预配置的函数实现自动搜索商品,并在动效播放过程中显示商品信息。如图12中(d)所示界面1204,购物软件搜索到商品信息后,向动效模块发送的动效资源中包括该商品信息。那么,动效模块在播放联动动效的过程中,还可以显示如附图标记123所示的商品信息,那么用户不必启动购物软件C搜索商品,即可在桌面动效中直接查看商品信息,进一步的提升用户的使用体验。但是,由于显示商品信息占用的显示位置较大,如界面1204所示影响原桌面元素的显示(即商品信息覆盖了原桌面显示的卡片、图标,影响用户查看原桌面元素)。因此,预置关闭触摸焦点124,电子设备检测到用户点击关闭触摸焦点124的操作后,通过动效模块不再显示商品信息,以便用户查看被商品信息覆盖的原桌面元素。或者,预置商品信息的播放时长,动效模块在显示时长满足预置时长后,可自动停止播放商品信息。Optionally, in the linked animation playback scene shown in (c) in Figure 12, the linked animation indication sent by the application program B to the animation module may also include the detected shopping link, and the shopping link preconfigured in the shopping software C Function to search for items based on shopping links. Then, the shopping software C can automatically search for products according to the pre-configured function after receiving the linkage motion effect indication, and display product information during the motion effect playback process. As shown in interface 1204 in (d) of FIG. 12 , after the shopping software searches for commodity information, the dynamic effect resource sent to the dynamic effect module includes the commodity information. Then, the dynamic effect module can also display product information as shown by reference numeral 123 during the process of playing the linked dynamic effect, so the user can directly view the product information in the desktop dynamic effect without starting the shopping software C to search for the product. Further enhance the user experience. However, due to the relatively large display position occupied by displaying product information, as shown in interface 1204, the display of the original desktop elements is affected (that is, the product information covers the cards and icons displayed on the original desktop, affecting the user to view the original desktop elements). Therefore, the touch focus 124 is preset to be closed. After the electronic device detects that the user clicks to close the touch focus 124, the product information will no longer be displayed through the dynamic effect module, so that the user can view the original desktop elements covered by the product information. Alternatively, the playback duration of the commodity information is preset, and the dynamic effect module can automatically stop playing the commodity information after the display duration meets the preset duration.
在一些实施例中,联动动效包括如上述场景中所述的联动桌面显示的卡片对应的应用程序,还可以包括联动桌面显示的运行应用服务的应用程序图标对应的应用程序。其中,应用图标可以直接显示于桌面,还可以显示在桌面文件夹内。In some embodiments, the linked motion effect includes the application corresponding to the card displayed on the linked desktop as described in the above scenario, and may also include the application corresponding to the icon of the application running the application service displayed on the linked desktop. Wherein, the application icon can be directly displayed on the desktop, and can also be displayed in a desktop folder.
示例性的,对应于图12所示场景,如图13所示界面1301,桌面上显示有购物软件C的图标,假设购物软件C运行应用服务(如购物软件C正在后台运行)。动效模块在接收到聊天软件B发送的联动动效指示,将联动动效指示转发至购物软件C。之后,如附图标记131所示,动效模块接收到购物软件C的图标对应的动效资源,并播放动效。Exemplarily, corresponding to the scene shown in FIG. 12 , the interface 1301 shown in FIG. 13 shows the icon of the shopping software C on the desktop, assuming that the shopping software C runs application services (for example, the shopping software C is running in the background). The dynamic effect module forwards the linked dynamic effect instruction to the shopping software C after receiving the linked dynamic effect instruction sent by the chat software B. Afterwards, as indicated by reference numeral 131, the dynamic effect module receives the dynamic effect resource corresponding to the icon of the shopping software C, and plays the dynamic effect.
又示例性的,对应于图12所示场景,如图14中(a)所示界面1401,桌面上显示有购物软件文件夹。假设购物软件文件夹内包含购物软件C,购物软件C运行应用服务(如购物软件C正在后台运行)。动效模块在接收到聊天软件B发送的联动动效指示,将联动动效指示转发至购物软件C。之后,如附图标记141所示,动效模块接收到购物软件C发送的动效资源后,在购物软件文件夹上播放动效。进一步的,电子 设备在检测到用户点击购物软件文件夹的操作后,打开文件夹,显示如图14中(b)所示界面1402,在购物软件文件夹内的购物软件C的图标上显示如附图标记142所示的动效。Also exemplary, corresponding to the scene shown in FIG. 12 , the interface 1401 shown in (a) of FIG. 14 shows a shopping software folder on the desktop. Assume that the shopping software folder contains shopping software C, and shopping software C runs application services (for example, shopping software C is running in the background). The dynamic effect module forwards the linked dynamic effect instruction to the shopping software C after receiving the linked dynamic effect instruction sent by the chat software B. Afterwards, as shown by reference numeral 141, after receiving the dynamic effect resource sent by the shopping software C, the dynamic effect module plays the dynamic effect on the shopping software folder. Further, after the electronic device detects that the user clicks on the shopping software folder, it opens the folder and displays an interface 1402 as shown in (b) in FIG. The motion effect shown by reference numeral 142 .
需要说明的是,动效模块如确定待联动的应用程序(如购物软件C)未运行应用服务,可以唤醒该应用程序,以播放联动动效。或者,动效模块将该待联动的应用程序未运行应用服务的情况发送至请求播放联动动效的应用程序(如聊天软件B),由请求播放联动动效的应用程序确定是否取消播放联动动效。若请求播放联动动效的应用程序确定取消播放联动动效,那么动效模块可只播放请求播放联动动效的应用程序的动效,或者取消播放请求播放联动动效的应用程序对应的全部动效(该决策由应用程序确定,动效模块执行)。若请求播放联动动效的应用程序确定不取消播放联动动效,可指示动效模块唤醒待联动的应用程序;或者请求播放联动动效的应用程序中预置有联动动效的动效资源,可将联动动效的动效资源发送至动效模块,以实现播放联动动效。It should be noted that, if the motion effect module determines that the application program to be linked (such as shopping software C) is not running the application service, it can wake up the application program to play the linked motion effect. Or, the dynamic effect module sends the situation that the application program to be linked does not run the application service to the application program (such as chat software B) that requests to play the linked animation effect, and the application program that requests to play the linked animation effect determines whether to cancel the playback of the linked animation effect. effect. If the application program that requests to play the linked animation effect decides to cancel the playback of the linked animation effect, the animation module can only play the animation effect of the application program that requests to play the linked animation effect, or cancel playing all the animations corresponding to the application program that requests to play the linked animation effect. effect (the decision is determined by the application and executed by the animation module). If the application program that requests to play the linked animation effect determines not to cancel the playback of the linked animation effect, it can instruct the animation module to wake up the application program to be linked; or the application program that requests to play the linked animation effect presets the animation resource of the linked animation effect, The dynamic effect resources of the linkage animation can be sent to the animation module to realize the linkage animation playback.
在一些实施例中,运行应用服务的桌面元素(如卡片、图标等)可以联动显示在桌面上的同一界面中的运行应用服务的桌面元素(如图12所示场景中,卡片B和卡片C的联动动效),还可以联动显示在桌面上的不同界面中的运行应用服务的桌面元素。In some embodiments, desktop elements running application services (such as cards, icons, etc.) can be displayed in conjunction with desktop elements running application services in the same interface on the desktop (in the scenario shown in Figure 12, card B and card C Linkage animation effect), and desktop elements running application services displayed in different interfaces on the desktop may also be linked.
示例性的,对应于图12所示场景,如图15中(a)所示界面1501,桌面显示的界面1501上显示有聊天软件B的卡片B,聊天软件B与购物软件C预设有联动动效。聊天软件B接收到动效模块发送的桌面元素信息后,确定界面1501上未显示购物软件C对应的桌面元素,但是在桌面的其他界面上显示了购物软件C对应的桌面元素,那么在向动效模块发送的动效资源中可以包括如附图标记151所示的动效资源。动效模块通过显示指示箭头,用于提示用户能够查看商品的应用程序在其他界面显示,并指明所在界面方向。电子设备在检测到用户点击附图标记151所示箭头的操作或者用于显示箭头所示界面的滑动操作后,显示如图15中(b)所示界面1502,该界面用于显示与聊天软件B联动的购物软件C的卡片,动效模块可以在界面1502上播放联动动效。Exemplarily, corresponding to the scene shown in FIG. 12 , the interface 1501 shown in (a) in FIG. 15 , the interface 1501 displayed on the desktop displays the card B of the chat software B, and the chat software B and the shopping software C are preset to be linked. Motion. After the chat software B receives the desktop element information sent by the dynamic effect module, it determines that the desktop element corresponding to the shopping software C is not displayed on the interface 1501, but the desktop element corresponding to the shopping software C is displayed on other interfaces of the desktop. The dynamic effect resource sent by the effect module may include the dynamic effect resource shown by reference numeral 151. The dynamic effect module is used to prompt the user to display the application that can view the product on other interfaces by displaying the indicating arrow, and indicate the direction of the interface. After the electronic device detects that the user clicks the arrow indicated by reference numeral 151 or slides the interface indicated by the arrow, it displays an interface 1502 as shown in (b) in FIG. 15 , which is used for displaying and chatting software The card of B's linked shopping software C, the dynamic effect module can play the linked dynamic effect on the interface 1502 .
如此,即使存在联动关系的多个应用程序的桌面元素未显示在桌面上的同一个界面中,也可以播放联动动效,为用户提供更好的使用体验。In this way, even if the desktop elements of multiple application programs that have a linkage relationship are not displayed in the same interface on the desktop, the linkage animation effect can be played to provide a better user experience for the user.
在一些实施例中,应用程序中预配置的动效触发事件的数量为一个或多个,不同动效触发事件对应的动效相同或不同,每一触发事件对应的动效的数量为一个或多个。可选的,应用程序向动效模块发送动效请求,用于请求播放对应的一个或多个动效,动效模块生成的动效事件对应于该一个或多个动效。In some embodiments, the number of motion trigger events pre-configured in the application is one or more, the motion effects corresponding to different motion trigger events are the same or different, and the number of motion effects corresponding to each trigger event is one or more. Multiple. Optionally, the application program sends a motion effect request to the motion effect module for requesting to play one or more corresponding motion effects, and the motion effect event generated by the motion effect module corresponds to the one or more motion effects.
示例性的,如图16中(a)所示界面1601,聊天软件B的卡片161接收到聊天消息,如***表情,聊天软件B确定该事件为预置的动效触发事件,则向动效模块发送对应的动效请求,用于请求播放两个动效,这两个动效为配合动效。其中一个动效包括在卡片B 161上放大显示***表情以及在桌面元素(如图标、卡片)上显示惊讶的表情,另一个动效为在桌面上全屏播放***动效。之后,动效模块根据动效请求,播放如图16中(b)所示界面1602显示的动效、以及播放如图16中(c)所示界面1603显示的全屏***动效。进一步的,全屏***动效还可以请求联动电子设备的音频模块播放***声,那么动效模块根据联动动效指示,通过launcher联动电子设备音频模块 在播放全屏***动效的同时播放***声。可选的,动效请求中可以包括动效播放实例,在动效播放实例中包括上述两个动效的播放时间间隔(如在界面1602所示动效的3秒后,播放界面1603所示的全屏***动效),两个动效的播放时长(如实现在播放全屏***动效的过程中,保持显示界面1602所示动效)等。Exemplarily, in the interface 1601 shown in (a) in FIG. The module sends a corresponding motion effect request, which is used to request to play two motion effects, and these two motion effects are coordinated motion effects. One of the animation effects includes zooming in on the card B 161 to display an explosion expression and displaying a surprised expression on desktop elements (such as icons, cards), and the other animation effect is to play the explosion animation in full screen on the desktop. Afterwards, the dynamic effect module plays the dynamic effect displayed on the interface 1602 shown in (b) of FIG. 16 and plays the full-screen explosion dynamic effect displayed on the interface 1603 shown in FIG. 16 (c) according to the motion effect request. Furthermore, the full-screen explosion animation effect can also request the audio module of the linked electronic device to play the explosion sound, then the animation module plays the explosion sound while playing the full-screen explosion animation effect through the launcher linkage electronic equipment audio module according to the linkage animation effect instruction. Optionally, the dynamic effect request may include a dynamic effect playback instance, which includes the playback time interval of the above two dynamic effects (as shown in the playback interface 1603 after 3 seconds of the dynamic effect shown in the interface 1602 The full-screen explosion animation effect), the playing duration of the two animation effects (for example, during the playback of the full-screen explosion animation effect, the animation effect shown in the display interface 1602 is maintained), etc.
在一些实施例中,应用程序可以在动效中预设应用启动触摸焦点,检测到用户点击该触摸焦点的操作后,能够直接启动对应的应用程序,并显示对应的功能界面。In some embodiments, the application program can preset the application start touch focus in the dynamic effect, and after detecting the user's operation of clicking the touch focus, the corresponding application program can be directly launched and the corresponding function interface can be displayed.
示例性的,如图16中(b)所示界面1602,电子设备检测到用户点击到预设的应用启动触摸焦点162(如聊天对话框)的操作,启动聊天软件B,并显示如图16中(d)所示界面1604,界面1604为聊天软件B中接收到的***表情对应的聊天界面。Exemplarily, on the interface 1602 shown in (b) in FIG. 16, the electronic device detects that the user clicks on the preset application to start the operation of the touch focus 162 (such as a chat dialog box), starts the chat software B, and displays as shown in FIG. 16 The interface 1604 shown in (d) is the chat interface corresponding to the explosion expression received in the chat software B.
如此,通过预设应用启动触摸焦点,用户能够通过该触摸焦点直达应用程序中动效对应的功能界面。从而用户能够不必通过一步步的操作再查看动效对应的功能界面,降低用户操作难度,提升用户使用体验。In this way, by starting the touch focus through the preset application, the user can directly access the functional interface corresponding to the dynamic effect in the application through the touch focus. In this way, the user can view the functional interface corresponding to the dynamic effect without having to go through step-by-step operations, which reduces the difficulty of user operation and improves the user experience.
在一些实施例中,部分动效播放具有时效性,超出时限再播放动效则不具备提醒的意义,影响用户使用体验。因此,动效模块在确定桌面具有动效播放环境(如桌面元素不影响动效播放),向应用程序发送桌面元素信息的过程中,还会向应用程序发送时效确认请求,用于请求确认当前待播放的动效是否超出时限要求。应用程序在接收到时限确认请求后,如确认已超出时限要求,可取消对应的全部或部分动效(如请求多个动效,可取消其中的部分动效)。比如,电子设备在未显示桌面的情况下接收到动效请求,动效模块将其加入动效播放队列。那么后续,电子设备在显示桌面时,动效播放队列中的部分或全部动效可能已经超出了时限要求,则应用程序可以取消播放对应的动效。其中,具有时限的动效如包括日程动效,消息动效等。可选的,动效请求中包括最晚播放时间,动效模块在接收到动效请求后,将该最晚播放时间添加到对应的动效事件中。那么,后续动效模块在获得动效播放队列中的队头动效事件后,确定当前时间晚于或等于最晚播放时间,可向对应的应用程序发送时效确认请求,以确认是否还需要播放该动效。In some embodiments, the playback of some animation effects is time-sensitive, and playback of animation effects beyond the time limit does not serve as a reminder, which affects user experience. Therefore, when the dynamic effect module determines that the desktop has a dynamic playback environment (for example, desktop elements do not affect dynamic playback), and sends desktop element information to the application, it will also send a timeliness confirmation request to the application for confirmation of the current Whether the animation effect to be played exceeds the time limit requirement. After the application program receives the time limit confirmation request, if it is confirmed that the time limit has been exceeded, all or part of the corresponding animation effects can be canceled (if multiple animation effects are requested, some of the animation effects can be canceled). For example, when the electronic device receives a motion effect request without displaying the desktop, the motion effect module adds it to the motion effect play queue. Then, later, when the electronic device is displaying the desktop, some or all of the animation effects in the animation playback queue may have exceeded the time limit requirement, and the application program can cancel playing the corresponding animation effects. Among them, dynamic effects with a time limit include, for example, schedule dynamic effects, message dynamic effects, and the like. Optionally, the motion effect request includes the latest play time, and the motion effect module adds the latest play time to the corresponding motion effect event after receiving the motion effect request. Then, after the subsequent animation module obtains the head animation event in the animation playback queue, it determines that the current time is later than or equal to the latest playback time, and can send a timeliness confirmation request to the corresponding application to confirm whether it needs to be played The animation.
示例性的,如图16所示场景,聊天软件B接收到消息具有时效性。比如,消息在超出一定时限后,不具备时效性,提醒的作用减少,因此聊天软件B可以取消播放动效。又比如,在***表情后,又接收到其他消息,如又触发其他动效,那么播放***表情对应的动效的作用减小,因此聊天软件B可以取消播放动效。那么,聊天软件B中可以预置消息时限,在接收到时限确认请求的时间超出消息时限要求后,可取消动效播放。比如,假设消息时限为10分钟。若聊天软件B在发送动效请求后的10分钟内,接收到时限确认请求,则确认未超出时限,可以播放动效。若聊天软件B在发送动效请求后的10分钟后,接收到时限确认请求,则确认已经超出时限,可以取消播放动效,可向动效模块发送动效取消指示,用于指示动效模块取消当前动效播放。动效模块在接收到动效取消指示后,则将该动效对应的动效事件移除动效播放队列。Exemplarily, in the scenario shown in FIG. 16 , the message received by the chat software B is time-sensitive. For example, after the message exceeds a certain time limit, it does not have timeliness, and the function of reminder is reduced, so the chat software B can cancel the playback animation effect. For another example, if other messages are received after the explosion emoticon, if other animation effects are triggered, the effect of playing the animation effect corresponding to the explosion emoticon will be reduced, so the chat software B can cancel the playback of the animation effect. Then, the message time limit can be preset in the chat software B, and after the time of receiving the time limit confirmation request exceeds the message time limit requirement, the animation playback can be canceled. For example, suppose the message time limit is 10 minutes. If chat software B receives a time limit confirmation request within 10 minutes after sending the motion effect request, it will confirm that the time limit is not exceeded and the motion effect can be played. If the chat software B receives a time limit confirmation request 10 minutes after sending the motion effect request, it is confirmed that the time limit has been exceeded, and the playback of the motion effect can be canceled, and a motion effect cancellation instruction can be sent to the motion effect module to instruct the motion effect module Cancel the current animation playback. After the motion effect module receives the motion effect cancellation instruction, it removes the motion effect event corresponding to the motion effect from the motion effect playback queue.
进一步的,如上述图16所示场景,如图16中(c)所示界面1603所示的全屏***动效全屏播放提示效果较强,而如图16中(b)所示界面1602所示的动效影响范围较小,因此聊天软件B可以分别为两个动效设置不同的消息时限,比如不限制界面1602所示动效的时限,而进限制全屏***动效的消息时限为10分钟。那么,聊天软件B 在发送动效请求后的10分钟后,接收到时限确认请求,则确认已经全屏***动效超出时限。那么相应的,动效模块仅显示如图16中(b)所示界面1602所示动效,而取消显示如图16中(c)所示的全屏***动效。Further, as shown in the scene shown in FIG. 16 above, the full-screen explosion dynamic effect shown in the interface 1603 shown in (c) in FIG. The impact range of the animation effect is small, so the chat software B can set different message time limits for the two animation effects, for example, the time limit for the animation effect shown in interface 1602 is not limited, and the message time limit for the full-screen explosion animation effect is limited to 10 minutes . Then, chat software B receives the time limit confirmation request 10 minutes after sending the motion effect request, and then confirms that the full-screen explosion motion effect has exceeded the time limit. Correspondingly, the dynamic effect module only displays the dynamic effect shown in the interface 1602 shown in (b) in FIG. 16 , and cancels the display of the full-screen explosion dynamic effect shown in (c) in FIG. 16 .
在一些实施例中,动效模块在返回显示桌面或刷新桌面后,确认动效播放队列不为空,那么并不能确认动效播放队列中待播放的动效是否超出时限要求,因此需要对动效时限进行确认。可选的,应用程序在发送动效请求时,可以在动效请求中携带时限标识,动效模块根据时限标识确定对应动效具有时限要求,需要进行时效确认。In some embodiments, after the dynamic effect module returns to display the desktop or refreshes the desktop, and confirms that the dynamic effect play queue is not empty, it cannot confirm whether the dynamic effects to be played in the dynamic effect play queue exceed the time limit requirement, so it is necessary to Validity period is confirmed. Optionally, when an application program sends a motion effect request, it may carry a time limit identifier in the motion effect request, and the motion effect module determines that the corresponding motion effect has a time limit requirement according to the time limit identifier, and a time limit confirmation is required.
在一些实施例中,部分应用程序请求播放的动效具有较强的时效性,如日历应用中设置日程提醒为在某日的某个时刻的某个日程的提醒,超出该时刻再播放动效,则提醒作用降低。因此,应用程序可以在此类动效对应的动效请求中携带优先播放标签,动效模块在显示桌面的过程中,接收到此类请求,根据标签信息,将对应的动效事件置于动效播放队列队头,以实现尽快播放动效。即动效模块不再按照接收顺序将对应的动效事件置于动效播放队列队尾。可选的,动效模块在未显示桌面的过程中,接收到携带优先播放标签的动效请求,可以直接将对应的动效事件置于动效播放队列队头,之后在显示桌面时再确认是否超出时限要求。或者,动效模块在未显示桌面的过程中,接收到携带优先播放标签的动效请求后,向应用程序发送暂时无法播放信号,用于通知应用程序当前电子设备不具备动效播放环境,以确认是否取消播放动效。In some embodiments, the dynamic effect requested by some applications has strong timeliness, such as setting the schedule reminder in the calendar application as a reminder of a certain schedule at a certain time on a certain day, and then playing the dynamic effect after that time , the reminder effect is reduced. Therefore, the application can carry the priority playback tag in the motion request corresponding to this type of motion effect. The motion effect module receives such a request during the process of displaying the desktop, and according to the tag information, puts the corresponding motion event on the The head of the effect playback queue to play the animation effect as soon as possible. That is, the animation module no longer puts the corresponding animation events at the end of the animation playback queue in the order of receiving them. Optionally, when the animation module receives an animation request with a priority playback tag while the desktop is not displayed, it can directly place the corresponding animation event at the head of the animation playback queue, and then confirm when the desktop is displayed Whether the time limit requirement is exceeded. Or, when the desktop is not displayed, the dynamic effect module sends a temporarily unplayable signal to the application program after receiving the dynamic effect request with the priority playback tag, which is used to notify the application program that the current electronic device does not have a dynamic effect playback environment, so as to Confirm whether to cancel the playback animation.
示例性的,假设某公司在今天中午12:00-下午1:00将举办一场内购会,用户A为该公司员工,在日历应用中设置12:00的日程提醒,并设置提前5分钟提醒。如图17所示界面1701所示,桌面上显示有日历卡片和时钟卡片。日历应用能够获取时间信息,根据用户A的日程设置,在相应时间向动效模块发送动效请求,并在动效请求中携带优先级标签。若动效模块在显示桌面的过程中接收到该动效请求,则将该动效请求对应的动效事件置于动效播放队列队头。并且动效模块向日历应用发送桌面元素,日历应用根据接收到的桌面元素,能够确定桌面上显示有时钟卡片,以及时钟卡片的显示位置,可向动效模块发送联动动效指示。那么时钟应用接收到动效模块转发的联动动效指示后,确定是否显示联动动效。如确定显示,向动效模块发送动效请求。动效模块根据时钟应用的动效请求,向时钟应用发送桌面元素,那么时钟应用能够根据桌面元素,确定桌面上显示有日历卡片,以及日历卡片的显示位置。那么后续,动效模块在获取到日历应用和时钟应用提供的动效资源后,显示如界面1701中附图标记171所示的动效,如时钟卡片手指日历卡片(该动效可以为日历应用和时钟应用对应的联动动效),以便用户A在较为醒目的动效注意到日历卡片显示的日程设置。For example, suppose a company will hold an in-app purchase event from 12:00 noon to 1:00 pm today, user A is an employee of the company, and sets a 12:00 schedule reminder in the calendar application and sets it 5 minutes in advance remind. As shown in the interface 1701 shown in FIG. 17 , a calendar card and a clock card are displayed on the desktop. The calendar application can obtain time information, and according to user A's schedule settings, send a motion effect request to the motion effect module at the corresponding time, and carry a priority tag in the motion effect request. If the motion effect module receives the motion effect request during the process of displaying the desktop, it places the motion effect event corresponding to the motion effect request at the head of the motion effect play queue. And the dynamic effect module sends the desktop element to the calendar application, and the calendar application can determine that there is a clock card displayed on the desktop and the display position of the clock card according to the received desktop element, and can send a linkage motion effect instruction to the dynamic effect module. Then the clock application determines whether to display the linkage animation effect after receiving the linkage animation indication forwarded by the animation module. If it is confirmed to be displayed, send a dynamic effect request to the dynamic effect module. The motion effect module sends the desktop element to the clock application according to the motion effect request of the clock application, and then the clock application can determine the calendar card displayed on the desktop and the display position of the calendar card according to the desktop element. Then, after the dynamic effect module obtains the dynamic effect resources provided by the calendar application and the clock application, it displays the dynamic effect shown by reference numeral 171 in the interface 1701, such as a clock card finger calendar card (the dynamic effect can be a calendar application The linkage motion effect corresponding to the clock application), so that user A can notice the schedule settings displayed on the calendar card in the more eye-catching motion effect.
可选的,上述图17所示场景也可以不实现为联动动效场景。比如,日历应用根据发送动效请求后获取到的桌面元素,确定桌面上显示有时钟卡片,并能够确定时钟卡片的位置,日历应用中预置有如图17所示界面1701中附图标记171所示的动效的动效资源。那么,动效模块在获取到动效资源的存储位置后,能够直接显示如图17所示的动效。Optionally, the scene shown in FIG. 17 above may not be implemented as a scene with linkage animation effects. For example, the calendar application determines that there is a clock card displayed on the desktop according to the desktop elements obtained after sending the dynamic effect request, and can determine the position of the clock card. The animation resource for the animation shown. Then, after the dynamic effect module acquires the storage location of the dynamic effect resource, it can directly display the dynamic effect as shown in FIG. 17 .
在一些实施例中,应用程序中预设有动效播放时长,在播放动效的时间满足动效播放时长后,动效模块可停止播放对应动效。从而防止资源占用时间过长,影响后续动效的播放。或者,占用桌面显示空间,影响桌面元素显示。其中,动效中包括的各 个动效的动效播放时长可以相同或不相同。可选的,部分动效所需的播放面积较小,不影响桌面元素的显示,或者对桌面元素的影响较小。那么,这些动效可以不预设动效播放时长,动效模块在检测到用户关闭动效的操作之前,可以在桌面上保持播放这些动效。即在应用程序中预设此类动效为常驻动效。进一步的,应用程序在动效请求中携带对应标签,以便于动效模块区分此类动效。其中,常驻动效在每次切换显示桌面或桌面刷新新,动效模块都会将其加入到动效播放队列的中,以实现常驻显示。In some embodiments, the application program has a preset duration for playing the animation effect, and the animation module may stop playing the corresponding animation effect after the duration of playing the animation effect satisfies the duration of the animation effect. This prevents resources from taking too long and affecting the playback of subsequent animation effects. Or, occupy the display space of the desktop and affect the display of desktop elements. Wherein, the duration of each animation included in the animation may be the same or different. Optionally, some animation effects require a smaller playing area, and do not affect the display of the desktop elements, or have less impact on the desktop elements. Then, the playback duration of these animation effects may not be preset, and the animation module can keep playing these animation effects on the desktop before detecting the user's operation to close the animation effects. That is, this kind of animation effect is preset in the application as a permanent animation effect. Further, the application program carries a corresponding tag in the motion effect request, so that the motion effect module can distinguish such motion effects. Among them, the resident dynamic effect will add it to the dynamic effect playback queue every time the display desktop is switched or the desktop is refreshed, so as to realize the resident display.
示例性的,如图18所示界面1801,桌面上显示有天气卡片,对应的天气应用中可以预置对应于实时天气的动效,并将该动效设置为常驻动效。如界面1801所示,动效模块在桌面上一直播放如附图标记181所示的动效。进一步的,天气应用程序在获知桌面元素包括在天气卡片下方显示有其他卡片(如时钟卡片)。并且天气应用确定当前天气为小雨,则可在显示小雨动效的过程中,在时钟卡片上方显示水花四溅的动效(该动效可以为天气应用与时钟应用的联动动效,或者可以为天气应用中预置的一个应用程序控制的两个动效的配合动效),以配合小雨动效。从而为用户提供更具趣味性的动效,提升用户使用体验。Exemplarily, as shown in the interface 1801 in FIG. 18 , there is a weather card displayed on the desktop, and a motion effect corresponding to real-time weather can be preset in the corresponding weather application, and the motion effect can be set as a resident motion effect. As shown in interface 1801 , the dynamic effect module keeps playing the dynamic effect shown by reference numeral 181 on the desktop. Further, the weather application program includes displaying other cards (such as a clock card) under the weather card after learning the desktop elements. And the weather application determines that the current weather is light rain, then in the process of displaying the animation effect of light rain, the animation effect of splashing water can be displayed on the top of the clock card (this animation effect can be a linkage animation effect between the weather application and the clock application, or it can be a The combination of two motion effects controlled by an application preset in the weather application) to match the light rain motion effect. Thereby providing users with more interesting dynamic effects and improving user experience.
在一些实施例中,电子设备未全屏显示桌面,动效模块可在显示桌面的显示屏上播放动效。比如,电子设备分屏显示,动效模块在其中的显示桌面的显示屏上播放动效。In some embodiments, the electronic device does not display the desktop in full screen, and the motion effect module can play the motion effect on the screen displaying the desktop. For example, the electronic device is displayed in split screens, and the dynamic effect module plays the dynamic effect on the display screen displaying the desktop.
示例性的,如图19中(a)所示分屏界面,其中界面1901用于显示聊天应用界面,界面1902用于显示桌面,并且在桌面上显示有音乐卡片。音乐应用检测到触发事件向动效模块发送动效请求,那么如图19中(b)所示,动效模块在界面1902(即显示桌面的界面)上播放动效,而未显示桌面的界面1901上仍显示聊天应用界面,不播放动效。Exemplarily, as shown in (a) of FIG. 19 , the interface 1901 is used to display a chat application interface, and the interface 1902 is used to display a desktop with music cards displayed on the desktop. The music application detects the trigger event and sends a motion effect request to the motion effect module, then as shown in (b) in Figure 19, the motion effect module plays the motion effect on the interface 1902 (that is, the interface displaying the desktop), but does not display the desktop interface The chat application interface is still displayed on the 1901, and no animation is played.
如此,在分屏场景中,电子设备也可以播放动效,满足用户在分屏场景中的动效播放需求,提升用户使用体验。In this way, in the split-screen scene, the electronic device can also play animation effects, which meets the user's demand for playing animation effects in the split-screen scene, and improves the user experience.
在一些实施例中,在智慧多窗场景中,电子设备也可以根据应用程序发送的动效请求,在显示桌面的窗口中显示动效。In some embodiments, in the smart multi-window scenario, the electronic device may also display the motion effect in the window displaying the desktop according to the motion effect request sent by the application program.
示例性的,如图20中(a)所示界面2001,在动效模块显示天气应用对应的动效的过程中,电子设备检测到用户拖出智慧多窗应用栏的操作,在界面2001右侧边显示智慧多窗应用栏201,之后检测到用户点击计算器图标202的操作,启动悬浮窗,显示如图20中(b)所示界面2002,在悬浮窗203中显示计算器应用界面。其中,电子设备将悬浮窗203显示于不会影响天气应用对应的动效的位置。进一步的,动效模块还可以将悬浮窗的位置等信息发送至天气应用,由天气应用确定是否继续播放动效。可选的,电子设备检测到用户移动悬浮窗203的操作,若移动后的悬浮窗203的显示位置覆盖天气应用对应的动效,那么电子设备可以通过动效模块在悬浮窗203下方继续播放动效(若悬浮窗203完全覆盖动效,则用户不可见动效),即悬浮窗203的显示位置移动、或开启、或关闭,不影响桌面动效的播放。或者,电子设备在显示悬浮窗后,若确定悬浮窗不影响动效播放则继续播放动效;若确定悬浮窗影响动效播放,则停止播放动效,或停止非常驻动效的播放。Exemplarily, in the interface 2001 shown in (a) of FIG. The smart multi-window application bar 201 is displayed on the side, and then the operation of clicking the calculator icon 202 by the user is detected, the floating window is activated, and the interface 2002 shown in (b) in FIG. 20 is displayed, and the calculator application interface is displayed in the floating window 203 . Wherein, the electronic device displays the floating window 203 at a position that will not affect the dynamic effect corresponding to the weather application. Furthermore, the dynamic effect module can also send information such as the position of the floating window to the weather application, and the weather application determines whether to continue playing the dynamic effect. Optionally, the electronic device detects the user's operation of moving the floating window 203, and if the display position of the moved floating window 203 covers the dynamic effect corresponding to the weather application, the electronic device can continue to play the dynamic effect under the floating window 203 through the dynamic effect module. (If the floating window 203 completely covers the dynamic effect, the user cannot see the dynamic effect), that is, the display position of the floating window 203 is moved, opened, or closed, without affecting the playback of the desktop dynamic effect. Alternatively, after the electronic device displays the floating window, if it is determined that the floating window does not affect the playing of the dynamic effect, the electronic device continues to play the moving effect; if it is determined that the floating window affects the playing of the moving effect, then stop playing the moving effect, or stop playing the non-resident moving effect.
如此,在智慧多窗场景中,电子设备也可以播放动效,满足用户在智慧多窗场景 中的动效播放需求,提升用户使用体验。In this way, in the smart multi-window scene, the electronic device can also play motion effects to meet the user's needs for playing motion effects in the smart multi-window scene and improve the user experience.
示例性地,图21为本申请实施例提供的一种桌面动效显示方法示意图。如图21所示,该方法可以包括S2101-S2113:Exemplarily, FIG. 21 is a schematic diagram of a desktop dynamic display method provided in an embodiment of the present application. As shown in Figure 21, the method may include S2101-S2113:
S2101、应用程序检测到触发事件。S2101. The application program detects a trigger event.
在一些实施例中,触发事件为开发者预先设置在应用程序中的动效触发事件。比如,如上述图12所示场景,聊天软件B接收到商品链接的事件为触发事件。又比如,如上述图17所示场景,日历应用检测到时间为用户设置的日程提醒时间的事件为触发事件。In some embodiments, the triggering event is a dynamic effect triggering event preset by the developer in the application. For example, as shown in the scenario shown in FIG. 12 above, the event that chat software B receives a product link is a trigger event. For another example, as shown in the scenario shown in FIG. 17 above, the event that the calendar application detects that the time is the schedule reminder time set by the user is a trigger event.
S2102、应用程序向动效模块发送动效请求。S2102. The application program sends a motion effect request to the motion effect module.
在一些实施例中,应用程序检测到触发事件后,可向动效模块发送动效请求。相应的,动效模块接收该动效请求。In some embodiments, after the application detects the trigger event, it can send a motion effect request to the motion effect module. Correspondingly, the motion effect module receives the motion effect request.
S2103、动效模块确定应用程序是否具有动效播放权限。若是,则执行步骤S2104;若否,则不显示对应的动效(图21中未示出,如应用程序向动效模块发送未授权信号)。S2103. The dynamic effect module determines whether the application program has the permission to play dynamic effects. If yes, execute step S2104; if not, do not display the corresponding animation (not shown in FIG. 21, for example, the application program sends an unauthorized signal to the animation module).
在一些实施例中,动效模块在接收到动效请求后,需要确认对应的应用程序是否具有动效播放权限。如确定无动效播放权限,则需要用户授权,若用户不授权,则不会显示对应的动效。In some embodiments, after receiving the motion effect request, the motion effect module needs to confirm whether the corresponding application has permission to play the motion effect. If it is determined that there is no animation playback permission, user authorization is required. If the user does not authorize, the corresponding animation will not be displayed.
示例性的,如图10所示界面1001,电子设备显示提示信息,以获得用户授权。电子设备检测到用户授的权操作后,将授权信号发送至动效模块,动效模块确定应用程序具有动效播放权限。Exemplarily, as shown in interface 1001 in FIG. 10 , the electronic device displays prompt information to obtain user authorization. After the electronic device detects the authorization operation authorized by the user, it sends an authorization signal to the dynamic effect module, and the dynamic effect module determines that the application program has the authorization to play the dynamic effect.
S2104、动效模块向应用程序发送桌面元素信息、动效图层信息。S2104. The dynamic effect module sends the desktop element information and the dynamic effect layer information to the application program.
S2105、应用程序确定动效资源。S2105. The application program determines the dynamic effect resource.
在一些实施例中,在步骤S2104和步骤S2105中,动效模块确定应用程序具有动效播放权限后,向应用程序发送桌面元素信息和动效图层信息,以便应用程序确定对应的动效资源。In some embodiments, in step S2104 and step S2105, after the dynamic effect module determines that the application program has the permission to play dynamic effect, it sends the desktop element information and dynamic effect layer information to the application program, so that the application program can determine the corresponding dynamic effect resource .
示例性的,如上述图8和图9所示场景,应用程序A(对应于卡片A)根据桌面元素信息,确定利用卡片C实现播放联动动效。并且,应用程序A根据动效图层信息,确定选择其中的三个动效图层,用于播放动效,并确定每一动效图层对应的动效资源。Exemplarily, as shown in the scenarios shown in FIG. 8 and FIG. 9 above, the application program A (corresponding to the card A) determines to use the card C to realize the playback linkage effect according to the desktop element information. Moreover, the application A determines to select three of the dynamic effect layers for playing the dynamic effect according to the dynamic effect layer information, and determines the corresponding dynamic effect resource of each dynamic effect layer.
S2106、应用程序向动效模块发送动效资源。S2106. The application program sends the dynamic effect resource to the dynamic effect module.
在一些实施例中,应用程序在确定动效资源后,可向动效模块发送动效资源。相应的,动效模块接收动效资源。In some embodiments, after the application program determines the dynamic effect resource, it can send the dynamic effect resource to the dynamic effect module. Correspondingly, the dynamic effect module receives dynamic effect resources.
在一些实施例中,动效模块维护一个动效播放队列,在上述步骤S2102、步骤S2103以及步骤S2106中的任一步骤后,动效模块均可以将对应的动效事件置于动效播放队列中,如置于队尾。并且,若在其中的某一步骤中动效模块已经在动效播放队列中新增对应的动效事件,则后续步骤可不必再添加对应的动效事件,避免重复添加。In some embodiments, the dynamic effect module maintains a dynamic effect play queue. After any of the above steps S2102, S2103 and S2106, the dynamic effect module can put the corresponding dynamic effect event in the dynamic effect play queue In, such as placed at the end of the queue. Moreover, if the animation module has added a corresponding animation event in the animation playback queue in one of the steps, then the subsequent steps do not need to add the corresponding animation event to avoid repeated addition.
比如,动效模块在接收到动效请求后(即步骤S2102后),将对应的动效事件置于动效播放队列的队尾。那么后续,在该动效事件位于队头时(即待显示时),需要确定动效播放权限,若确定不具有动效播放权限,可将该动效事件移出动效播放队列。或者,动效模块将对应的动效事件置于动效播放队列的队尾后,直接确认是否具有动效权限,是否需要移出动效播放队列。For example, after the motion effect module receives the motion effect request (ie after step S2102), it puts the corresponding motion effect event at the end of the motion effect play queue. Then, later, when the dynamic effect event is at the head of the queue (that is, when it is to be displayed), it is necessary to determine the dynamic effect playback permission. If it is determined that the dynamic effect playback permission is not available, the dynamic effect event can be removed from the dynamic effect playback queue. Alternatively, after the animation module puts the corresponding animation event at the end of the animation playback queue, it directly confirms whether it has the animation permission and whether it needs to be removed from the animation playback queue.
又比如,动效模块在确认动效具有动效播放权限后(即步骤S2103后),将对应的动效事件置于动效播放队列的队尾。那么后续,在该动效事件位于队头时(即待显示时),需要获取对应的动效资源,若动效资源获取失败,可将该动效事件移出动效播放队列。或者,动效模块将对应的动效事件置于动效播放队列的队尾后,直接确认是否具有对应的动效资源,是否需要移出动效播放队列。For another example, after confirming that the animation has the permission to play the animation (ie after step S2103 ), the animation module places the corresponding animation event at the end of the animation playback queue. Then, later, when the dynamic effect event is at the head of the queue (that is, when it is to be displayed), the corresponding dynamic effect resource needs to be obtained. If the dynamic effect resource acquisition fails, the dynamic effect event can be removed from the dynamic effect playback queue. Alternatively, after the dynamic effect module puts the corresponding dynamic effect event at the end of the dynamic effect playback queue, it directly confirms whether there is a corresponding dynamic effect resource and whether it needs to be removed from the dynamic effect playback queue.
再比如,动效模块在接收到动效资源后(即步骤S2106后),将对应的动效事件置于动效播放队列的队尾。那么后续,在该动效事件位于队头时(即待显示时),直接确定当前是否具有动效播放环境(参见下述步骤S2108),若具有动效播放环境,可直接调用动效资源,实现动效播放。For another example, after the dynamic effect module receives the dynamic effect resource (ie after step S2106), it puts the corresponding dynamic effect event at the end of the dynamic effect playback queue. Then, later, when the dynamic effect event is at the head of the queue (that is, when it is to be displayed), directly determine whether there is a dynamic effect playback environment (see the following step S2108), if there is a dynamic effect playback environment, you can directly call the dynamic effect resource, Realize dynamic playback.
S2107、动效模块显示桌面。S2107. The dynamic effect module displays the desktop.
在一些实施例中,动效模块显示桌面用于表示动效模块通过launcher显示桌面,包括切换显示桌面,或者应用程序通知刷新显示桌面。In some embodiments, the dynamic effect module displaying the desktop is used to indicate that the dynamic effect module displays the desktop through the launcher, including switching to display the desktop, or notifying the application program to refresh the displayed desktop.
示例性的,假设开发者设置音乐应用对应的动效为不同类型的音乐对应于不同音符的掉落动效以及桌面元素的跳跃动效。如图22中(a)所示音乐应用界面2201,电子设备在音乐应用界面检测到用户返回桌面的操作(假设未退出音乐应用),显示如图22中(b)所示界面2202,界面2202用于显示桌面,桌面上可显示音乐动效。Exemplarily, it is assumed that the developer sets the animation effect corresponding to the music application to be the falling animation effect corresponding to different musical notes and the jumping animation effect of the desktop element corresponding to different types of music. The music application interface 2201 shown in (a) in Figure 22, the electronic device detects the operation of the user returning to the desktop on the music application interface (assuming that the music application has not been exited), and displays the interface 2202 shown in Figure 22 (b), the interface 2202 It is used to display the desktop, and music dynamic effects can be displayed on the desktop.
又示例性的,假设运动健康应用预设运动目标为10000步,用户实现运动目标后,动效为全屏喝彩动效。如图23所示界面2301,在电子设备显示桌面的过程中,运动健康应用在确定用户今日累计步数达到1000步时,向动效模块发送动效请求,并请求刷新桌面,以播放全屏桌面动效;或者动效模块在上述步骤S2106中接收到对应的动效资源后,自动刷新显示桌面。For another example, assume that the preset exercise goal of the sports health application is 10,000 steps, and after the user achieves the exercise goal, the animation effect is a full-screen cheering animation effect. As shown in the interface 2301 in Figure 23, when the electronic device is displaying the desktop, the sports health application sends a dynamic effect request to the dynamic effect module and requests to refresh the desktop to play the full-screen desktop Dynamic effect; or the dynamic effect module automatically refreshes and displays the desktop after receiving the corresponding dynamic effect resource in the above step S2106.
S2108、动效模块获取动效播放队列,确定是否具有动效播放环境。若是,则执行步骤S2109;若否,则执行步骤S2110。S2108. The dynamic effect module obtains the dynamic effect playing queue, and determines whether there is a dynamic effect playing environment. If yes, execute step S2109; if not, execute step S2110.
在一些实施例中,电子设备在切换显示桌面或刷新显示桌面后,获取保存的动效播放队列,并确定位于队头的动效,确定当前桌面是否具有该动效的动效播放环境。比如,正在播放的一个或多个动效是否影响该动效的播放,和/或,该动效的播放是否影响正在播放的一个或多个动效的播放。In some embodiments, after switching or refreshing the displayed desktop, the electronic device acquires the stored dynamic effect play queue, determines the dynamic effect at the head of the queue, and determines whether the current desktop has a dynamic effect playback environment for the dynamic effect. For example, whether one or more dynamic effects being played affect the playing of the dynamic effect, and/or, whether the playing of the dynamic effect affects the playing of one or more dynamic effects being played.
S2109、动效模块播放动效。S2109. The dynamic effect module plays the dynamic effect.
在一些实施例中,若动效模块确定动效具有动效播放环境,则播放动效播放队列的队头动效,并将该动效移出动效播放队列。In some embodiments, if the motion effect module determines that the motion effect has a motion effect playing environment, it plays the motion effect at the head of the motion effect playing queue and removes the motion effect from the motion effect playing queue.
在一些实施例中,播放动效包括播放联动动效。比如,如图22中(b)所示界面2202,音乐卡片联动时钟卡片显示联动动效。其中,联动动效包括音乐卡片的音符掉落动效,以及时钟动效的舞动动效。具体的联动动效实现方式可参见上述实施例的相关介绍(如图12-图15所示场景),在此不再赘述。In some embodiments, playing the motion effect includes playing a linkage motion effect. For example, in the interface 2202 shown in (b) of FIG. 22 , the music card is linked to the clock card to display a linkage effect. Among them, the linkage motion effect includes the note falling motion effect of the music card, and the dancing motion effect of the clock motion effect. For the specific implementation of the linkage motion effect, please refer to the relevant introduction of the above-mentioned embodiments (scenes shown in FIGS. 12-15 ), which will not be repeated here.
在一些实施例中,应用程序的动效中可以预置触摸焦点,用户能够通过触摸焦点与实现动效交互。比如,如图23所示界面,电子设备检测到用户点击重播触摸焦点2301的操作后,重复播放对应的动效。又比如,如图23所示界面,电子设备检测到用户点击关闭触摸焦点2302的操作后,退出对应的动效的播放,进一步的还可以显示退出动效。In some embodiments, the touch focus can be preset in the animation effect of the application program, and the user can interact with the animation effect by touching the focus focus. For example, on the interface shown in FIG. 23 , after the electronic device detects that the user clicks on the replay touch focus 2301 , the corresponding motion effect is played repeatedly. For another example, on the interface shown in FIG. 23 , after the electronic device detects that the user clicks to close the touch focus 2302 , it exits the playback of the corresponding motion effect, and may further display the exit motion effect.
S2110、动效模块向应用程序延迟播放请求。S2110. The motion effect module delays the play request to the application program.
在一些实施例中,若动效模块确定动效不具有动效播放环境,则向对应的应用程序发送延迟播放请求,用于确认该动效是否可以延迟播放。相应的应用程序接收动效模块发送的延迟播放请求。In some embodiments, if the motion effect module determines that the motion effect does not have a motion effect playback environment, it sends a delayed play request to the corresponding application program to confirm whether the motion effect can be played in a delayed manner. The corresponding application program receives the delayed playback request sent by the dynamic effect module.
S2111、应用程序确定是否延迟播放。S2111. The application program determines whether to delay playing.
S2112、应用程序向动效模块发送延迟播放响应。S2112. The application program sends a delayed playback response to the dynamic effect module.
在一些实施例中,在步骤S2111和步骤S2112中,应用程序根据延迟播放请求,确定对应的动效是否为具有播放时限要求。如无播放时限要求,可在延迟播放响应中携带同意延迟信号;若有播放时限要求,则在延迟播放响应中携带不同意延迟信号。进一步的,若应用程序确认该动效具有播放时限要求并且必须播放,则在延迟播放响应中还可以携带强制播放信号。In some embodiments, in step S2111 and step S2112, the application program determines whether the corresponding animation effect has a playback time limit requirement according to the delayed playback request. If there is no playback time limit requirement, the delayed playback response can carry a delayed playback approval signal; if there is a playback time limit requirement, a delayed playback response can be carried with a non-agreeable delay signal. Furthermore, if the application confirms that the animation has a playback time limit and must be played, the delayed playback response may also carry a forced playback signal.
示例性的,如图22所示音乐播放场景,音乐应用中可以不设置播放时限要求,那么音乐应用向动效模块发送的延迟播放响应中携带同意延迟信号。Exemplarily, in the music playing scene shown in Figure 22, the music application may not set a playback time limit requirement, then the delayed playback response sent by the music application to the animation module carries a delay-approving signal.
又示例性的,如上述图17所示场景,日历应用中设置有该动效对应的播放时限要求,则日历应用向动效模块发送的延迟播放响应中携带不同意延迟信号。进一步的,延迟播放响应中还可以携带强制播放信号。For another example, as shown in the above-mentioned scenario in FIG. 17 , the calendar application is set with a playback time limit requirement corresponding to the animation effect, and the delayed playback response sent by the calendar application to the animation module carries a delay delay signal. Further, the delayed playback response may also carry a forced playback signal.
S2113、若确定延迟播放,则动效模块将该动效移动至动效播放队列的队尾;若确定不延迟播放,则动效模块移除该动效播放队列的队头动效。S2113. If it is determined to delay the playback, the animation module moves the animation effect to the end of the animation playback queue; if it is determined not to delay the playback, the animation module removes the animation effect from the head of the animation playback queue.
在一些实施例中,动效模块接收应用程序发送的延迟播放响应。若延迟播放响应中携带同意延迟信号,则确定延迟播放动效,动效模块将该动效移动至动效播放队列队尾,等待后续再次确认是否可以播放。若延迟播放响应中携带不同意延迟信号,则动效模块移除该动效播放队列的队头动效,即取消该动效的播放。进一步的,若携带不同意延迟信号的延迟播放响应中还携带强制播放信号,则动效模块不论当前播放环境如何,均强制播放该动效,以避免错过重要事项,影响用户体验。In some embodiments, the dynamic effect module receives the delayed playback response sent by the application program. If the delayed playback response carries a delay-approved signal, it is determined to delay the playback of the animation effect, and the animation module moves the animation effect to the end of the animation playback queue, and waits to confirm whether it can be played again later. If the delayed playback response carries a delay delay signal, the animation module removes the animation at the head of the animation playback queue, that is, cancels the playback of the animation. Furthermore, if the delayed playback response carrying the delay signal of disapproval also carries a forced playback signal, the animation module will force the animation to be played regardless of the current playback environment, so as to avoid missing important items and affecting user experience.
示例性的,如上述图17所示场景,动效模块可以根据强制播放信号,强制播放日历应用的动效,以避免用户错过内购会。进一步的,若在需要强制播放动效时,电子设备处于休眠状态,则动效模块可以强制唤醒电子设备以显示动效。若在需要强制播放动效时,电子设备显示其他应用界面,则动效模块无法显示对应动效,可通过消息提醒的方式提醒用户对应的事项,在用户退出应用界面后,再显示动效。Exemplarily, as shown in the scene shown in FIG. 17 above, the dynamic effect module can forcibly play the dynamic effect of the calendar application according to the forced play signal, so as to prevent the user from missing the in-app purchase event. Further, if the electronic device is in a dormant state when it is necessary to forcibly play the motion effect, the motion effect module can forcibly wake up the electronic device to display the motion effect. If the electronic device displays other application interfaces when the animation needs to be played forcibly, the animation module cannot display the corresponding animation effects, and the user can be reminded of the corresponding matters through a message reminder, and then display the animation effects after the user exits the application interface.
可选的,上述步骤S2107-步骤S2113为循环步骤,动效模块在播放动效后,会将该动效播放队列的队头动效取出。若队头动效取出后,动效播放队列不为空,则确定下一队头动效是否具有播放环境,顺次播放动效播放队列中的全部动效。若桌面显示的过程中未能播放完动效播放队列中的全部动效,则保存动效播放队列,下次再显示桌面后,再从队头依次确定是否能够播放动效。Optionally, the above step S2107-step S2113 is a loop step, after the animation effect module plays the animation effect, it will take out the animation effect at the head of the animation effect playing queue. If the animation effect at the head of the queue is taken out and the animation playback queue is not empty, then determine whether the animation at the next head of the queue has a playback environment, and play all the animations in the animation playback queue in sequence. If all the animation effects in the animation playback queue cannot be played during the display of the desktop, save the animation playback queue, and after displaying the desktop next time, determine whether the animation effects can be played in turn from the queue head.
如此,通过播放全屏动效,在电子设备在显示桌面的过程中,也能够为用户提供更多的应用程序信息。并且,通过播放全屏动效能够增加用户的交互体验,提升用户的使用体验。In this way, by playing the full-screen dynamic effect, more application program information can be provided to the user when the electronic device is displaying the desktop. Moreover, by playing full-screen animation effects, the user's interactive experience can be increased and the user's experience can be improved.
示例性地,图24为本申请实施例提供的又一种桌面动效显示方法示意图。如图24所示,该方法可以包括S2401-S2403:Exemplarily, FIG. 24 is a schematic diagram of another desktop dynamic display method provided in the embodiment of the present application. As shown in Figure 24, the method may include S2401-S2403:
S2401、电子设备显示桌面,桌面包括第一桌面元素。S2401. The electronic device displays a desktop, where the desktop includes a first desktop element.
在一些实施例中,电子设备显示桌面,桌面包括的桌面元素例如包括应用图标、卡片、文件夹、状态栏等。其中,播放第一动效的第一桌面元素可以是桌面元素中包括的第一桌面元素对应的第一应用的卡片和/或图标。In some embodiments, the electronic device displays a desktop, and the desktop elements included in the desktop include, for example, application icons, cards, folders, status bars, and the like. Wherein, the first desktop element playing the first motion effect may be a card and/or icon of the first application corresponding to the first desktop element included in the desktop element.
示例性的,如图8所示场景,第一桌面元素可以为如图8中(a)所示界面801中所示的卡片A。Exemplarily, in the scenario shown in FIG. 8 , the first desktop element may be the card A shown in the interface 801 shown in (a) of FIG. 8 .
S2402、电子设备确定播放第一桌面元素的第一动效。S2402. The electronic device determines to play the first motion effect of the first desktop element.
在一些实施例中,第一桌面元素对应的第一应用运行应用服务,第一应用才能够检测到动效触发事件,请求播放动效。In some embodiments, the first application corresponding to the first desktop element runs the application service, so that the first application can detect the triggering event of the motion effect and request to play the motion effect.
在一些实施例中,在确定播放第一动效之前,需要确定第一桌面元素对应的第一应用是否具有动效播放权限。如果具有动效播放权限,才允许播放第一动效;如果不具有动效播放权限,需要再获得用户的授权后,才允许播放第一动效。In some embodiments, before determining to play the first animation effect, it needs to be determined whether the first application corresponding to the first desktop element has the permission to play the animation effect. If you have the permission to play animation effects, you are allowed to play the first animation effect; if you do not have permission to play animation effects, you need to obtain authorization from the user before you are allowed to play the first animation effect.
示例性的,动效播放权限的相关内容可以参考上述图10和图11所示的相关内容,在此不再赘述。Exemplarily, the relevant content of the animation play permission can refer to the relevant content shown in the above-mentioned FIG. 10 and FIG. 11 , which will not be repeated here.
在一些实施例中,在确定播放第一动效之前,确定是否具有播放第一动效的动效播放环境。如电子设备确定具有播放第一动效的动效播放环境后可进行动效播放。其中,动效播放环境包括桌面上不存在第一内容和/或第二内容,第一内容为影响第一动效的播放效果的内容,第二内容为显示效果会被第一动效的播放所影响的内容。可选的,显示第一内容的第二区域与第一区域中的第一关键区域相交,第一区域与显示第二内容的第三区域中的第二关键区域相交。可选的,第一内容或第二内容为悬浮窗口显示的内容或在桌面播放的动效内容。可选的,关键区域可以为用户能够与动效进行交互的触控区域。部分动效可能全部显示区域均为关键区域,或者不存在关键区域。In some embodiments, before determining to play the first motion effect, it is determined whether there is a motion effect playing environment for playing the first motion effect. For example, the electronic device can play the dynamic effect after determining the dynamic effect playing environment capable of playing the first dynamic effect. Wherein, the dynamic effect playback environment includes that the first content and/or the second content do not exist on the desktop, the first content is content that affects the playback effect of the first dynamic effect, and the second content is that the display effect will be played by the first dynamic effect affected content. Optionally, the second area displaying the first content intersects the first key area in the first area, and the first area intersects the second key area in the third area displaying the second content. Optionally, the first content or the second content is the content displayed in the floating window or the dynamic content played on the desktop. Optionally, the key area may be a touch area where the user can interact with the dynamic effect. For some animation effects, all display areas may be key areas, or there may be no key areas.
示例性的,假设动效A的播放区域为a,关键区域为a1;动效B的播放区域为b,关键区域为b1。动效模块在播放动效A的过程中,确定需要播放动效B。动效模块确定播放区域b不影响关键区域a1,播放区域a不影响关键区域b1,那么动效模块可在播放动效A的过程中播放动效B。Exemplarily, it is assumed that the play area of motion effect A is a, and the key area is a1; the play area of motion effect B is b, and the key area is b1. During the playback of animation effect A, the animation module determines that animation B needs to be played. The dynamic effect module determines that the playback area b does not affect the key area a1, and the playback area a does not affect the key area b1, then the dynamic effect module can play the animation effect B during the playback of the animation effect A.
另一些实施例中,若桌面包括第二桌面元素,电子设备在获取到播放第二桌面元素的第二动效的需求时,确定不具有播放第二桌面元素的第二动效的动效播放环境,电子设备不播放所述第二动效,或者在确定第二动效延迟播放时推迟至具有播放第二动效的动效播放环境时播放第二动效。In some other embodiments, if the desktop includes a second desktop element, when the electronic device obtains the demand for playing the second motion effect of the second desktop element, it determines that there is no motion effect playback for playing the second motion effect of the second desktop element. environment, the electronic device does not play the second animation effect, or delays playing the second animation effect when it is determined that the second animation effect is delayed until the second animation effect is played in a animation playback environment that has the second animation effect played.
可选的,电子设备接收到第二桌面元素的动效请求后,可确定获取到播放第二桌面元素的第二动效的需求。或者,电子设备获取到动效播放队列中的位于队头的动效事件,确定该动效事件为第二桌面元素的第二动效对应的动效事件,那么电子设备可确定获取到播放第二桌面元素的第二动效的需求。那么之后,电子设备可确定是否具有播放第二桌面元素的动效的播放环境,以确定是否可以播放动效。如确定当前暂不能播放第二动效,可确定第二动效是否具有时限要求。比如,第二动效具有时限要求,超出时限要求再播放动效不具备提醒用户的意义,可不再播放第二动效。或者,第二动效不具有时限要求,或者还未到时限要求的时限,可延迟播放。Optionally, after receiving the motion effect request of the second desktop element, the electronic device may determine to acquire a need to play the second motion effect of the second desktop element. Or, the electronic device obtains the dynamic effect event at the head of the dynamic effect playing queue, and determines that the dynamic effect event is the dynamic effect event corresponding to the second dynamic effect of the second desktop element, then the electronic device can determine that the dynamic effect event obtained to play the first 2. Requirements for the second animation effect of desktop elements. Afterwards, the electronic device can determine whether there is a playing environment for playing the dynamic effect of the second desktop element, so as to determine whether the dynamic effect can be played. If it is determined that the second animation effect cannot be played temporarily, it can be determined whether the second animation effect has a time limit requirement. For example, the second animation effect has a time limit requirement. Playing the animation effect beyond the time limit does not have the meaning of reminding the user, so the second animation effect can no longer be played. Or, the second motion effect does not have a time limit requirement, or the time limit required by the time limit has not yet been reached, and the playback can be delayed.
在一些实施例中,在确定播放第一动效之前,电子设备还获取第一动效的动效资 源信息。动效资源信息包括第一动效的动效资源的存储位置和/或第一动效对应的动效图层的信息。动效图层的数量为一层或多层,动效资源包括一个或多个资源,动效图层的信息包括一层或多层动效图层与一个或多个资源的对应关系。动效资源信息为第一桌面元素对应的第一应用根据桌面包括的桌面元素和可选图层确定,可选图层包括第一应用确定的一层或多层动效图层。其中,动效资源的存储位置用于获取动效资源,动效图层的信息用于确定播放第一动效的图层。In some embodiments, before determining to play the first animation effect, the electronic device also acquires the animation resource information of the first animation effect. The dynamic effect resource information includes the storage location of the dynamic effect resource of the first dynamic effect and/or the information of the dynamic effect layer corresponding to the first dynamic effect. The number of dynamic effect layers is one or more layers, the dynamic effect resources include one or more resources, and the information of the dynamic effect layers includes the corresponding relationship between one or more layers of dynamic effect layers and one or more resources. The dynamic effect resource information is that the first application corresponding to the first desktop element is determined according to the desktop elements and optional layers included in the desktop, and the optional layers include one or more dynamic effect layers determined by the first application. Wherein, the storage location of the dynamic effect resource is used to obtain the dynamic effect resource, and the information of the dynamic effect layer is used to determine the layer for playing the first dynamic effect.
示例性的,动效图层的相关内容可以参考上述图6和图9所示的相关内容,在此不再赘述。Exemplarily, the relevant content of the dynamic effect layer can refer to the relevant content shown in the above-mentioned FIG. 6 and FIG. 9 , which will not be repeated here.
S2403、电子设备在桌面的第一区域播放第一动效,该第一区域包括第一桌面元素所占区域以外的区域。S2403. The electronic device plays the first motion effect on the first area of the desktop, where the first area includes an area other than the area occupied by the first desktop element.
在一些实施例中,电子设备能够获取存储位置存储的动效资源。根据一层或多层动效图层与动效资源的对应关系,在桌面的第一区域播放第一动效。In some embodiments, the electronic device can acquire the dynamic effect resource stored in the storage location. According to the corresponding relationship between one or more layers of animation effects and animation resources, the first animation effect is played on the first area of the desktop.
在一些实施例中,动效中预配置有用户可以进行交互操作的触控区域。比如,在播放第一动效的过程中,检测到用户对第一动效中包括的第一触控区域的操作,停止播放第一动效。又比如,在播放第一动效的过程中,检测到用户对第一动效中包括的第二触控区域的操作,重新播放第一动效。可选的,触控区域用于表示预设的动效互动位置对应的区域。In some embodiments, the motion effect is pre-configured with a touch area where the user can perform interactive operations. For example, during the process of playing the first motion effect, it is detected that the user's operation on the first touch area included in the first motion effect stops playing the first motion effect. For another example, in the process of playing the first motion effect, it is detected that the user operates the second touch area included in the first motion effect, and the first motion effect is played again. Optionally, the touch area is used to indicate an area corresponding to a preset dynamic interaction position.
示例性的,联动动效的相关内容可以参考上述图7所示的相关内容,在此不再赘述。Exemplarily, for the related content of the linkage motion effect, reference may be made to the related content shown in FIG. 7 above, which will not be repeated here.
在一些实施例中,应用程序中预设有动效播放时长,在播放动效的时间满足动效播放时长后,动效模块可停止播放对应动效。从而防止资源占用时间过长,影响后续动效的播放。或者,占用桌面显示空间,影响桌面元素显示。比如,在桌面的第一区域播放预设时长的第一动效。In some embodiments, the application program has a preset duration for playing the animation effect, and the animation module may stop playing the corresponding animation effect after the duration of playing the animation effect satisfies the duration of the animation effect. This prevents resources from taking too long and affecting the playback of subsequent animation effects. Or, occupy the display space of the desktop and affect the display of desktop elements. For example, the first motion effect with a preset duration is played on the first area of the desktop.
在一些实施例中,电子设备维护动效播放队列,动效播放队列用于保存待播放的动效对应的动效事件,动效事件包括待播放的动效对应的应用的标识、待播放的动效的最晚播放时间、待播放的动效的联动动效对应的动效事件的标记、待播放的动效的动效资源信息中的一项或多项内容。In some embodiments, the electronic device maintains a dynamic effect play queue, and the dynamic effect play queue is used to store the dynamic effect events corresponding to the dynamic effects to be played, and the dynamic effect events include the identification of the application corresponding to the dynamic effects to be played, the One or more of the latest play time of the animation effect, the mark of the animation event corresponding to the linkage animation effect of the animation effect to be played, and the animation resource information of the animation effect to be played.
可选的,电子设备在确定播放第一动效后,将第一动效对应的动效事件移出动效播放队列。Optionally, after determining to play the first motion effect, the electronic device removes the motion effect event corresponding to the first motion effect out of the motion effect playing queue.
在一些实施例中,确定第一动效与第三桌面元素预配置有联动动效。那么,在第一区域播放第一动效的过程中,在桌面的第四区域播放第三桌面元素的第三动效。可选的,第四区域包括第三桌面元素所占的区域以外的区域。In some embodiments, it is determined that the first motion effect and the third desktop element are pre-configured with a linkage motion effect. Then, during the process of playing the first motion effect in the first area, the third motion effect of the third desktop element is played in the fourth area of the desktop. Optionally, the fourth area includes an area other than the area occupied by the third desktop element.
示例性的,联动动效的相关内容可以参考上述图8,图12-图15,以及图17所示的相关内容,在此不再赘述。Exemplarily, the relevant content of the linkage motion effect can refer to the above-mentioned related content shown in FIG. 8 , FIG. 12-FIG. 15 , and FIG. 17 , which will not be repeated here.
如此,本申请实施例提供的桌面动效显示方法,在应用程序图标或卡片所在的区域以外的区域也可以显示应用的相关信息,如显示应用的全屏动效,使得桌面动效可以包含更多的应用程序信息,并且支持开发者自定义动效显示效果,能够增加用户的交互性,提升用户使用体验。In this way, the desktop dynamic effect display method provided by the embodiment of the present application can also display application-related information in areas other than the area where the application icon or card is located, such as displaying the full-screen dynamic effect of the application, so that the desktop dynamic effect can contain more application information, and supports developers to customize dynamic display effects, which can increase user interactivity and improve user experience.
以上结合图5-图24详细说明了本申请实施例提供的桌面动效显示方法。以下结 合图25详细说明本申请实施例提供的桌面动效显示装置。The desktop animation display method provided by the embodiment of the present application has been described in detail above with reference to FIGS. 5-24 . The desktop dynamic effect display device provided by the embodiment of the present application will be described in detail below with reference to FIG. 25 .
在一种可能的设计中,图25为本申请实施例提供的电子设备的结构示意图。如图25所示,电子设备2500可以包括:显示单元2501和处理单元2502。电子设备2500可用于实现上述方法实施例中涉及的电子设备的功能。In a possible design, FIG. 25 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As shown in FIG. 25 , an electronic device 2500 may include: a display unit 2501 and a processing unit 2502 . The electronic device 2500 may be used to implement the functions of the electronic device involved in the foregoing method embodiments.
可选地,显示单元2501,用于支持电子设备2500显示界面内容;和/或,支持电子设备2500执行图21中的S2107;和/或,支持电子设备2500执行图24中的S2401和S2403。Optionally, the display unit 2501 is configured to support the electronic device 2500 to display interface content; and/or support the electronic device 2500 to execute S2107 in FIG. 21 ; and/or support the electronic device 2500 to execute S2401 and S2403 in FIG. 24 .
可选地,处理单元2502,用于支持电子设备2500执行图21中的S2101-S2106、以及S2108-S2113;和/或,支持电子设备2500执行图24中的S2402。Optionally, the processing unit 2502 is configured to support the electronic device 2500 to execute S2101-S2106 and S2108-S2113 in FIG. 21 ; and/or, support the electronic device 2500 to execute S2402 in FIG. 24 .
可选地,电子设备2500还可以包括收发单元(图25中未示出),该收发单元可以接收用户在桌面上的触摸操作。其中,收发单元可以包括接收单元和发送单元,可以由收发器或收发器相关电路组件实现,可以为收发器或收发模块。电子设备2500中的各个单元的操作和/或功能分别为了实现上述方法实施例中所述的桌面动效显示方法的相应流程,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能单元的功能描述,为了简洁,在此不再赘述。Optionally, the electronic device 2500 may further include a transceiver unit (not shown in FIG. 25 ), which can receive a user's touch operation on the desktop. Wherein, the transceiving unit may include a receiving unit and a transmitting unit, may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The operation and/or function of each unit in the electronic device 2500 is to realize the corresponding flow of the desktop dynamic effect display method described in the above method embodiment, and all relevant content of each step involved in the above method embodiment can be referred to the corresponding For the sake of brevity, the description of the functions of the functional units will not be repeated here.
可选地,图25所示的电子设备2500还可以包括存储单元(图25中未示出),该存储单元中存储有程序或指令。当显示单元2501以及处理单元2502执行该程序或指令时,使得图25所示的电子设备2500可以执行上述方法实施例中所述的桌面动效显示方法。Optionally, the electronic device 2500 shown in FIG. 25 may further include a storage unit (not shown in FIG. 25 ), where programs or instructions are stored. When the display unit 2501 and the processing unit 2502 execute the program or instruction, the electronic device 2500 shown in FIG. 25 can execute the method for displaying the desktop with dynamic effects described in the above method embodiments.
图25所示的电子设备2500的技术效果可以参考上述方法实施例中所述的桌面动效显示方法的技术效果,此处不再赘述。The technical effect of the electronic device 2500 shown in FIG. 25 can refer to the technical effect of the method for displaying desktop dynamic effects described in the above method embodiments, which will not be repeated here.
除了以电子设备2500的形式以外,本申请提供的技术方案也可以为电子设备中的功能单元或者芯片,或者与电子设备匹配使用的装置。In addition to being in the form of the electronic device 2500, the technical solution provided in this application may also be a functional unit or a chip in the electronic device, or a device matched with the electronic device.
本申请实施例还提供一种芯片***,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片***实现上述任一方法实施例中的方法。The embodiment of the present application also provides a chip system, including: a processor, the processor is coupled with a memory, and the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the The system on chip implements the method in any one of the foregoing method embodiments.
可选地,该芯片***中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。Optionally, there may be one or more processors in the chip system. The processor can be realized by hardware or by software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented by software, the processor may be a general-purpose processor implemented by reading software codes stored in a memory.
可选地,该芯片***中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请实施例并不限定。示例性地,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型,以及存储器与处理器的设置方式不作具体限定。Optionally, there may be one or more memories in the chip system. The memory may be integrated with the processor, or may be configured separately from the processor, which is not limited in this embodiment of the present application. Exemplarily, the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips. The arrangement manner of the memory and the processor is not specifically limited.
示例性地,该芯片***可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(AP设备plication specific integrated circuit,ASIC),还可以是***芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以 是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。Exemplarily, the chip system may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated chip (AP device application specific integrated circuit, ASIC), or a system on chip (system on chip, SoC ), it can also be a central processing unit (central processor unit, CPU), it can also be a network processor (network processor, NP), it can also be a digital signal processing circuit (digital signal processor, DSP), it can also be a microcontroller (micro controller unit, MCU), can also be a programmable controller (programmable logic device, PLD) or other integrated chips.
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。It should be understood that each step in the foregoing method embodiments may be implemented by an integrated logic circuit of hardware in a processor or instructions in the form of software. The method steps disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当该计算机程序在计算机上上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的桌面动效显示方法。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is run on the computer, the computer is made to perform the above-mentioned related steps, so as to realize the above-mentioned embodiment. The desktop animation display method.
本申请实施例还提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的桌面动效显示方法。An embodiment of the present application further provides a computer program product, which, when running on a computer, causes the computer to execute the above-mentioned related steps, so as to realize the method for displaying the desktop with dynamic effects in the above-mentioned embodiment.
另外,本申请实施例还提供一种装置。该装置具体可以是组件或模块,该装置可包括相连的一个或多个处理器和存储器。其中,存储器用于存储计算机程序。当该计算机程序被一个或多个处理器执行时,使得装置执行上述各方法实施例中的桌面动效显示方法。In addition, the embodiment of the present application further provides a device. The apparatus may specifically be a component or a module, and the apparatus may include one or more processors and memory associated therewith. Among them, the memory is used to store computer programs. When the computer program is executed by one or more processors, the device is made to execute the method for displaying the desktop with dynamic effects in the above method embodiments.
其中,本申请实施例提供的装置、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法。因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the apparatus, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding method provided above. Therefore, the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
结合本申请实施例公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应地软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read only memory,ROM)、可擦除可编程只读存储器(erasable programmable ROM,EPROM)、电可擦可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于专用集成电路(AP设备plication specific integrated circuit,ASIC)中。The steps of the methods or algorithms described in connection with the disclosure of the embodiments of the present application may be implemented in the form of hardware, or may be implemented in the form of a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (random access memory, RAM), flash memory, read only memory (read only memory, ROM), erasable programmable read-only memory ( erasable programmable ROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM), registers, hard disk, removable hard disk, CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may be located in an application specific integrated circuit (AP device application specific integrated circuit, ASIC).
通过以上的实施方式的描述,本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明。实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成;即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the above description of the implementation, those skilled in the art can clearly understand that, for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to needs; that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. For the specific working process of the above-described system, device, and unit, reference may be made to the corresponding process in the foregoing method embodiments, and details are not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的。例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式;例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed method may be implemented in other ways. The device embodiments described above are illustrative only. For example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored, or not. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules or units may be in electrical, mechanical or other forms.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
计算机可读存储介质包括但不限于以下的任意一种:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Computer-readable storage media include but are not limited to any of the following: U disk, mobile hard disk, read-only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, etc. Various media that can store program code.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the protection scope of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the application should be covered within the protection scope of the application . Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (22)

  1. 一种桌面动效显示方法,其特征在于,应用于电子设备,所述方法包括:A desktop dynamic effect display method, characterized in that it is applied to electronic equipment, and the method includes:
    显示桌面,所述桌面包括第一桌面元素;displaying a desktop, the desktop including a first desktop element;
    确定播放所述第一桌面元素的第一动效;determining to play the first motion effect of the first desktop element;
    在所述桌面的第一区域播放所述第一动效,所述第一区域包括所述第一桌面元素所占区域以外的区域。Playing the first motion effect in a first area of the desktop, where the first area includes an area other than the area occupied by the first desktop element.
  2. 根据权利要求1所述的方法,其特征在于,在所述确定播放所述第一动效之前,所述方法还包括:The method according to claim 1, wherein before said determining to play said first dynamic effect, said method further comprises:
    确定具有播放所述第一动效的动效播放环境;所述动效播放环境包括桌面上不存在第一内容和/或第二内容,所述第一内容为影响所述第一动效的播放效果的内容,所述第二内容为显示效果会被所述第一动效的播放所影响的内容。Determining a dynamic playback environment that plays the first dynamic effect; the dynamic playback environment includes that there is no first content and/or second content on the desktop, and the first content affects the first dynamic effect The content of the playback effect, the second content is the content that the display effect will be affected by the playback of the first animation effect.
  3. 根据权利要求2所述的方法,其特征在于,显示所述第一内容的第二区域与所述第一区域中的第一关键区域相交,所述第一区域与显示所述第二内容的第三区域中的第二关键区域相交。The method of claim 2, wherein a second region displaying the first content intersects a first key region in the first region, the first region intersects a region displaying the second content The second critical region intersects in the third region.
  4. 根据权利要求2或3所述的方法,其特征在于,所述第一内容或所述第二内容为悬浮窗口显示的内容或在所述桌面播放的动效内容。The method according to claim 2 or 3, wherein the first content or the second content is content displayed in a floating window or dynamic content played on the desktop.
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述桌面还包括第二桌面元素,所述方法还包括:The method according to any one of claims 2-4, wherein the desktop further comprises a second desktop element, and the method further comprises:
    获取播放所述第二桌面元素的第二动效的需求;Acquiring the requirement of playing the second motion effect of the second desktop element;
    若不具有播放所述第二动效的动效播放环境,所述电子设备不播放所述第二动效,或者在确定所述第二动效延迟播放时推迟至具有播放所述第二动效的动效播放环境时播放所述第二动效。If there is no dynamic effect playing environment for playing the second dynamic effect, the electronic device does not play the second dynamic effect, or postpones playing the second dynamic effect until it is determined that the second dynamic effect is delayed. The second animation effect is played when the animation effect playing environment is played.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述桌面还包括第三桌面元素,所述方法还包括:The method according to any one of claims 1-5, wherein the desktop further comprises a third desktop element, and the method further comprises:
    确定所述第一动效与所述第三桌面元素预配置有联动动效;It is determined that the first dynamic effect and the third desktop element are pre-configured with a linkage dynamic effect;
    在所述第一区域播放所述第一动效的过程中,在所述桌面的第四区域播放所述第三桌面元素的第三动效。During the process of playing the first motion effect in the first area, the third motion effect of the third desktop element is played in the fourth area of the desktop.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,在所述确定播放所述第一桌面元素的动效之前,所述方法还包括:The method according to any one of claims 1-6, wherein before said determining to play the dynamic effect of said first desktop element, said method further comprises:
    确定所述第一桌面元素对应的第一应用具有动效播放权限。It is determined that the first application corresponding to the first desktop element has the dynamic play permission.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述在所述桌面的第一区域播放所述第一动效之前,所述方法还包括:The method according to any one of claims 1-7, wherein before playing the first dynamic effect in the first area of the desktop, the method further comprises:
    获取所述第一动效的动效资源信息;所述动效资源信息包括所述第一动效的动效资源的存储位置和/或所述第一动效对应的动效图层的信息;所述动效图层的数量为一层或多层,所述动效资源包括一个或多个资源,所述动效图层的信息包括一层或多层动效图层与一个或多个资源的对应关系;其中,所述动效资源的存储位置用于获取所述动效资源,所述动效图层的信息用于确定播放所述第一动效的图层。Acquiring the dynamic effect resource information of the first dynamic effect; the dynamic effect resource information includes the storage location of the dynamic effect resource of the first dynamic effect and/or the information of the dynamic effect layer corresponding to the first dynamic effect ; The number of dynamic effect layers is one or more layers, the dynamic effect resources include one or more resources, and the information of the dynamic effect layers includes one or more layers of dynamic effect layers and one or more The corresponding relationship of resources; wherein, the storage location of the dynamic effect resource is used to obtain the dynamic effect resource, and the information of the dynamic effect layer is used to determine the layer for playing the first dynamic effect.
  9. 根据权利要求8所述的方法,其特征在于,所述动效资源信息为所述第一桌面元素对应的第一应用根据所述桌面包括的桌面元素和可选图层确定,所述可选图层包 括所述第一应用确定的所述一层或多层动效图层。The method according to claim 8, wherein the dynamic effect resource information is determined by the first application corresponding to the first desktop element according to the desktop elements and optional layers included in the desktop, and the optional The layers include the one or more layers of dynamic effect layers determined by the first application.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-9, wherein the method further comprises:
    在播放所述第一动效的过程中,检测到用户对所述第一动效中包括的第一触控区域的操作,停止播放所述第一动效。During the process of playing the first motion effect, the user's operation on the first touch area included in the first motion effect is detected, and the playing of the first motion effect is stopped.
  11. 根据权利要求1-9任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-9, wherein the method further comprises:
    在播放所述第一动效的过程中,检测到用户对所述第一动效中包括的第二触控区域的操作,重新播放所述第一动效。During the process of playing the first motion effect, the user's operation on the second touch area included in the first motion effect is detected, and the first motion effect is played again.
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述在所述桌面的第一区域播放所述第一动效,包括:The method according to any one of claims 1-11, wherein playing the first dynamic effect in the first area of the desktop comprises:
    在所述桌面的所述第一区域播放预设时长的所述第一动效。Playing the first motion effect for a preset duration in the first area of the desktop.
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述第一桌面元素包括所述第一桌面元素对应的第一应用的卡片和/或图标。The method according to any one of claims 1-12, wherein the first desktop element includes a card and/or icon of a first application corresponding to the first desktop element.
  14. 根据权利要求1-13任一项所述的方法,其特征在于,所述电子设备维护动效播放队列,所述动效播放队列用于保存待播放的动效对应的动效事件,所述动效事件包括待播放的动效对应的应用的标识、待播放的动效的最晚播放时间、待播放的动效的联动动效对应的动效事件的标记、待播放的动效的动效资源信息中的一项或多项内容。The method according to any one of claims 1-13, wherein the electronic device maintains a dynamic effect play queue, and the dynamic effect play queue is used to save a dynamic effect event corresponding to a dynamic effect to be played, and the The motion event includes the identification of the application corresponding to the motion effect to be played, the latest play time of the motion effect to be played, the mark of the motion event corresponding to the linkage motion effect of the motion effect to be played, and the animation time of the motion effect to be played. One or more items in the effective resource information.
  15. 根据权利要求14所述的方法,其特征在于,在所述确定播放所述第一桌面元素的第一动效之后,所述方法还包括:The method according to claim 14, wherein after said determining to play the first motion effect of said first desktop element, said method further comprises:
    将所述第一动效对应的动效事件移出所述动效播放队列。Moving the motion effect event corresponding to the first motion effect out of the motion effect play queue.
  16. 一种桌面动效显示方法,其特征在于,应用于电子设备,所述电子设备的桌面上显示有第一应用对应的第一桌面元素;所述方法包括:A desktop dynamic effect display method, characterized in that it is applied to an electronic device, and a first desktop element corresponding to a first application is displayed on the desktop of the electronic device; the method includes:
    检测到播放所述第一应用的第一动效的触发事件;Detecting a trigger event of playing the first motion effect of the first application;
    确定所述第一动效的动效资源信息;所述动效资源信息包括所述第一动效的动效资源的存储位置和/或所述第一动效对应的动效图层的信息;所述动效图层的数量为一层或多层,所述动效资源包括一个或多个资源,所述动效图层的信息包括一层或多层动效图层与一个或多个资源的对应关系;所述动效资源信息用于在所述桌面的第一区域播放所述第一动效,所述第一区域包括所述第一桌面元素所占区域以外的区域。Determine the dynamic effect resource information of the first dynamic effect; the dynamic effect resource information includes the storage location of the dynamic effect resource of the first dynamic effect and/or the information of the dynamic effect layer corresponding to the first dynamic effect ; The number of dynamic effect layers is one or more layers, the dynamic effect resources include one or more resources, and the information of the dynamic effect layers includes one or more layers of dynamic effect layers and one or more The corresponding relationship between resources; the dynamic effect resource information is used to play the first dynamic effect in the first area of the desktop, and the first area includes the area other than the area occupied by the first desktop element.
  17. 根据权利要求16所述的方法,其特征在于,所述动效资源信息为所述第一桌面元素对应的第一应用根据所述桌面包括的桌面元素和可选图层确定,所述可选图层包括所述第一应用确定的所述一层或多层动效图层。The method according to claim 16, wherein the dynamic effect resource information is determined by the first application corresponding to the first desktop element according to the desktop elements and optional layers included in the desktop, and the optional The layers include the one or more layers of dynamic effect layers determined by the first application.
  18. 根据权利要求16或17所述的方法,其特征在于,所述第一应用具有动效播放权限。The method according to claim 16 or 17, characterized in that the first application has permission to play dynamic effects.
  19. 根据权利要求16-18任一项所述的方法,其特征在于,所述第一桌面元素包括所述第一应用的卡片和/或图标。The method according to any one of claims 16-18, wherein the first desktop element includes a card and/or icon of the first application.
  20. 一种电子设备,其特征在于,包括:处理器、存储器和触摸屏,所述存储器、所述触摸屏与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,使得所述电子设备执行如权利要求1-15中任意一项所述的方法;或者,使得所述电子设备执 行如权利要求16-19中任意一项所述的方法。An electronic device, characterized in that it includes: a processor, a memory, and a touch screen, the memory and the touch screen are coupled to the processor, the memory is used to store computer program codes, and the computer program codes include computer instructions , when the processor reads the computer instructions from the memory, the electronic device executes the method according to any one of claims 1-15; or, the electronic device executes the method according to the claim The method described in any one of 16-19.
  21. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1-15中任意一项所述的方法;或者,使得所述电子设备执行如权利要求16-19中任意一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium includes a computer program, and when the computer program runs on an electronic device, the electronic device executes any one of claims 1-15. The method described in claim 1; or, causing the electronic device to execute the method described in any one of claims 16-19.
  22. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-15中任意一项所述的方法;或者,使得所述计算机执行如权利要求16-19中任意一项所述的方法。A computer program product, characterized in that, when the computer program product is run on a computer, the computer is made to execute the method according to any one of claims 1-15; or, the computer is made to execute the method as described in The method of any one of claims 16-19.
PCT/CN2022/116535 2021-09-18 2022-09-01 Method for displaying dynamic effect on desktop, and electronic device WO2023040670A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111113324.2 2021-09-18
CN202111113324.2A CN115840610A (en) 2021-09-18 2021-09-18 Desktop dynamic effect display method and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023040670A1 true WO2023040670A1 (en) 2023-03-23

Family

ID=85574532

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/116535 WO2023040670A1 (en) 2021-09-18 2022-09-01 Method for displaying dynamic effect on desktop, and electronic device

Country Status (2)

Country Link
CN (1) CN115840610A (en)
WO (1) WO2023040670A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117389496A (en) * 2023-09-19 2024-01-12 荣耀终端有限公司 Folding screen display method, electronic equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030169303A1 (en) * 2002-02-15 2003-09-11 Canon Kabushiki Kaisha Representing a plurality of independent data items
CN109117219A (en) * 2018-07-16 2019-01-01 北京奇元科技有限公司 Prompting implementation method and device in intelligent terminal
CN110769120A (en) * 2019-10-22 2020-02-07 广州华多网络科技有限公司 Method, device, equipment and storage medium for message reminding
CN111182343A (en) * 2019-12-09 2020-05-19 腾讯科技(深圳)有限公司 Method and apparatus for playing animation material, storage medium, and electronic apparatus
CN112148982A (en) * 2020-09-29 2020-12-29 维沃移动通信有限公司 Display method, display device and electronic equipment
CN112181572A (en) * 2020-09-28 2021-01-05 北京达佳互联信息技术有限公司 Interactive special effect display method and device, terminal and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030169303A1 (en) * 2002-02-15 2003-09-11 Canon Kabushiki Kaisha Representing a plurality of independent data items
CN109117219A (en) * 2018-07-16 2019-01-01 北京奇元科技有限公司 Prompting implementation method and device in intelligent terminal
CN110769120A (en) * 2019-10-22 2020-02-07 广州华多网络科技有限公司 Method, device, equipment and storage medium for message reminding
CN111182343A (en) * 2019-12-09 2020-05-19 腾讯科技(深圳)有限公司 Method and apparatus for playing animation material, storage medium, and electronic apparatus
CN112181572A (en) * 2020-09-28 2021-01-05 北京达佳互联信息技术有限公司 Interactive special effect display method and device, terminal and storage medium
CN112148982A (en) * 2020-09-29 2020-12-29 维沃移动通信有限公司 Display method, display device and electronic equipment

Also Published As

Publication number Publication date
CN115840610A (en) 2023-03-24

Similar Documents

Publication Publication Date Title
WO2021027747A1 (en) Interface display method and device
WO2020108356A1 (en) Application display method and electronic device
CN110839096B (en) Touch method of equipment with folding screen and folding screen equipment
WO2020103764A1 (en) Voice control method and electronic device
CN110602273B (en) Message display method, electronic equipment and computer readable storage medium
WO2021036770A1 (en) Split-screen processing method and terminal device
US20230244508A1 (en) Application starting method and apparatus, and electronic device
JP7268275B2 (en) Method and electronic device for presenting video on electronic device when there is an incoming call
CN114363462B (en) Interface display method, electronic equipment and computer readable medium
CN111208925A (en) Method for establishing application combination and electronic equipment
WO2020155875A1 (en) Display method for electronic device, graphic user interface and electronic device
CN112068907A (en) Interface display method and electronic equipment
CN115328358A (en) Display method and related device
WO2023040670A1 (en) Method for displaying dynamic effect on desktop, and electronic device
WO2023029985A1 (en) Method for displaying dock bar in launcher and electronic device
WO2022252816A1 (en) Display method and electronic device
CN113805771B (en) Notification reminding method, terminal equipment and computer readable storage medium
US20240036696A1 (en) Inter-Interface Conversion Method, Device, and System
CN113835802A (en) Device interaction method, system, device and computer readable storage medium
WO2023045774A1 (en) Display method and electronic device
WO2023103974A1 (en) Content collaboration method, electronic device, and computer readable storage medium
WO2024060925A1 (en) Notification message processing system, method and apparatus
WO2023020339A1 (en) Interface display method and electronic device
WO2024094046A1 (en) Application display method, electronic device, and storage medium
WO2024037346A1 (en) Page management method and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22869041

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE